@sml_check_flag=external local_unnamed_addr global i32
@_SMLZN16SMLSharp__Runtime6SysErrE=external local_unnamed_addr global i8*
@_SMLZN6TextIO6stdErrE=external local_unnamed_addr global i8*
@_SMLZN7Control12printCommandE=external local_unnamed_addr global i8*
@a=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils7newFileE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils7newFileE_120 to void(...)*),i32 -2147483647}>,align 8
@b=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i8*)*@_SMLFN9CoreUtils9testExistE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils9testExistE_121 to void(...)*),i32 -2147483647}>,align 8
@c=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i8*)*@_SMLFN9CoreUtils7testDirE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils7testDirE_122 to void(...)*),i32 -2147483647}>,align 8
@d=private unnamed_addr constant<{[4x i8],i32,[7x i8]}><{[4x i8]zeroinitializer,i32 -2147483641,[7x i8]c"rm -f \00"}>,align 8
@e=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils4rm__fE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils4rm__fE_123 to void(...)*),i32 -2147483647}>,align 8
@f=private unnamed_addr constant<{[4x i8],i32,[7x i8]}><{[4x i8]zeroinitializer,i32 -2147483641,[7x i8]c"mkdir \00"}>,align 8
@g=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils5mkdirE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils5mkdirE_124 to void(...)*),i32 -2147483647}>,align 8
@h=private unnamed_addr constant<{[4x i8],i32,[7x i8]}><{[4x i8]zeroinitializer,i32 -2147483641,[7x i8]c"rmdir \00"}>,align 8
@i=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils7rmdir__fE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils7rmdir__fE_125 to void(...)*),i32 -2147483647}>,align 8
@j=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils12makeTextFileE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils12makeTextFileE_126 to void(...)*),i32 -2147483647}>,align 8
@k=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils11makeBinFileE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils11makeBinFileE_127 to void(...)*),i32 -2147483647}>,align 8
@l=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN9CoreUtils13makeTextFile_GE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils13makeTextFile_GE_129 to void(...)*),i32 -2147483647}>,align 8
@m=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN9CoreUtils12readTextFileE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils12readTextFileE_130 to void(...)*),i32 -2147483647}>,align 8
@n=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN9CoreUtils11readBinFileE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils11readBinFileE_131 to void(...)*),i32 -2147483647}>,align 8
@o=private unnamed_addr constant<{[4x i8],i32,[4x i8]}><{[4x i8]zeroinitializer,i32 -2147483644,[4x i8]c"cp \00"}>,align 8
@p=private unnamed_addr constant<{[4x i8],i32,[2x i8]}><{[4x i8]zeroinitializer,i32 -2147483646,[2x i8]c" \00"}>,align 8
@q=private unnamed_addr constant<{[4x i8],i32,[2x i8]}><{[4x i8]zeroinitializer,i32 -2147483646,[2x i8]c"\0A\00"}>,align 8
@r=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN9CoreUtils2cpE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils2cpE_133 to void(...)*),i32 -2147483647}>,align 8
@s=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN9CoreUtils3catE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils3catE_135 to void(...)*),i32 -2147483647}>,align 8
@t=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLLLN9CoreUtils5chdirE_116 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils5chdirE_136 to void(...)*),i32 -2147483647}>,align 8
@u=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i32,i32)*@_SMLFN9CoreUtils5chdirE to void(...)*),void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLLLN9CoreUtils5chdirE_137 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN9CoreUtils7newFileE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@a,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils9testExistE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@b,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils7testDirE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@c,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils4rm__fE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@e,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils5mkdirE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@g,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils7rmdir__fE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@i,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils5chdirE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@u,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils12makeTextFileE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@j,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils11makeBinFileE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@k,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils13makeTextFile_GE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@l,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils12readTextFileE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@m,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils11readBinFileE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@n,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils2cpE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@r,i64 0,i32 2)to i8*)
@_SMLZN9CoreUtils3catE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@s,i64 0,i32 2)to i8*)
@_SML_ftabbda7a2fa42fa5d88_CoreUtils=external global i8
@v=private unnamed_addr global i8 0
declare void@llvm.gcroot(i8**,i8*)#0
declare i8*@sml_alloc(i32 inreg)local_unnamed_addr#0
declare void@sml_check(i32 inreg)local_unnamed_addr
declare void@sml_gcroot(i8*,void()*,i8*,i8*)local_unnamed_addr#0
declare i32@sml_personality(...)#0
declare void@sml_raise(i8*inreg)local_unnamed_addr#1
declare i32@_SMLFN11Word8Vector6lengthE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN16SMLSharp__Runtime9errorNameE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN18SMLSharp__OSFileSys5chDirE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN18SMLSharp__OSFileSys5isDirE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN18SMLSharp__OSFileSys5mkDirE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN18SMLSharp__OSFileSys5rmDirE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN18SMLSharp__OSFileSys6getDirE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN18SMLSharp__OSFileSys6removeE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN18SMLSharp__OSFileSys8fileSizeE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN5BinIO10openAppendE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN5BinIO6inputNE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN5BinIO6outputE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN5BinIO7closeInE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN5BinIO8closeOutE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN5BinIO8inputAllE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN6String1_ZE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN6TextIO6inputNE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN6TextIO6outputE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN6TextIO7closeInE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN6TextIO8closeOutE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN6TextIO8inputAllE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN8Filename5BinIO6openInE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN8Filename5BinIO7openOutE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN8Filename6TextIO6openInE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN8Filename6TextIO7openOutE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN8Filename8toStringE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_maine08a2a3237fbaf1b_Word8Vector()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_mainb802741546ad758e_SMLSharp_OSFileSys()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main00d884c96265bfea_SMLSharp_Runtime()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main21c7617ebc9dc739_bin_io()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main1ef93e13728790b1_String()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main3446b7b079949ccf_text_io()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main1a3c7df0529f4f3d_Control()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_maine29d9c3af819282f_Filename()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_loade08a2a3237fbaf1b_Word8Vector(i8*)local_unnamed_addr
declare void@_SML_loadb802741546ad758e_SMLSharp_OSFileSys(i8*)local_unnamed_addr
declare void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*)local_unnamed_addr
declare void@_SML_load21c7617ebc9dc739_bin_io(i8*)local_unnamed_addr
declare void@_SML_load1ef93e13728790b1_String(i8*)local_unnamed_addr
declare void@_SML_load3446b7b079949ccf_text_io(i8*)local_unnamed_addr
declare void@_SML_load1a3c7df0529f4f3d_Control(i8*)local_unnamed_addr
declare void@_SML_loade29d9c3af819282f_Filename(i8*)local_unnamed_addr
define private void@_SML_tabbbda7a2fa42fa5d88_CoreUtils()#3{
unreachable
}
define void@_SML_loadbda7a2fa42fa5d88_CoreUtils(i8*%a)local_unnamed_addr#0{
%b=load i8,i8*@v,align 1
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 1,i8*@v,align 1
tail call void@_SML_loade08a2a3237fbaf1b_Word8Vector(i8*%a)#0
tail call void@_SML_loadb802741546ad758e_SMLSharp_OSFileSys(i8*%a)#0
tail call void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*%a)#0
tail call void@_SML_load21c7617ebc9dc739_bin_io(i8*%a)#0
tail call void@_SML_load1ef93e13728790b1_String(i8*%a)#0
tail call void@_SML_load3446b7b079949ccf_text_io(i8*%a)#0
tail call void@_SML_load1a3c7df0529f4f3d_Control(i8*%a)#0
tail call void@_SML_loade29d9c3af819282f_Filename(i8*%a)#0
tail call void@sml_gcroot(i8*%a,void()*@_SML_tabbbda7a2fa42fa5d88_CoreUtils,i8*@_SML_ftabbda7a2fa42fa5d88_CoreUtils,i8*null)#0
ret void
}
define void@_SML_mainbda7a2fa42fa5d88_CoreUtils()local_unnamed_addr#2 gc"smlsharp"{
%a=load i8,i8*@v,align 1
%b=and i8%a,2
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 3,i8*@v,align 1
tail call void@_SML_maine08a2a3237fbaf1b_Word8Vector()#2
tail call void@_SML_mainb802741546ad758e_SMLSharp_OSFileSys()#2
tail call void@_SML_main00d884c96265bfea_SMLSharp_Runtime()#2
tail call void@_SML_main21c7617ebc9dc739_bin_io()#2
tail call void@_SML_main1ef93e13728790b1_String()#2
tail call void@_SML_main3446b7b079949ccf_text_io()#2
tail call void@_SML_main1a3c7df0529f4f3d_Control()#2
tail call void@_SML_maine29d9c3af819282f_Filename()#2
br label%d
}
define fastcc void@_SMLFN9CoreUtils7newFileE(i8*inreg%a)#2 gc"smlsharp"{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
store i8*null,i8**%b,align 8
%j=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%h)
%k=call fastcc i8*@_SMLFN5BinIO10openAppendE(i8*inreg%j)
tail call fastcc void@_SMLFN5BinIO8closeOutE(i8*inreg%k)
ret void
}
define fastcc i32@_SMLFN9CoreUtils9testExistE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
store i8*null,i8**%b,align 8
%j=invoke fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%h)
to label%k unwind label%m
k:
%l=invoke fastcc i32@_SMLFN18SMLSharp__OSFileSys8fileSizeE(i8*inreg%j)
to label%aq unwind label%m
m:
%n=landingpad{i8*,i8*}
catch i8*null
%o=extractvalue{i8*,i8*}%n,1
%p=bitcast i8*%o to i8**
%q=load i8*,i8**%p,align 8
store i8*%q,i8**%b,align 8
%r=bitcast i8*%q to i8**
%s=load i8*,i8**%r,align 8
%t=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%u=icmp eq i8*%s,%t
br i1%u,label%v,label%a8
v:
%w=getelementptr inbounds i8,i8*%q,i64 16
%x=bitcast i8*%w to i8**
%y=load i8*,i8**%x,align 8
%z=getelementptr inbounds i8,i8*%y,i64 8
%A=bitcast i8*%z to i8**
%B=load i8*,i8**%A,align 8
%C=icmp eq i8*%B,null
br i1%C,label%D,label%L
D:
%E=call i8*@sml_alloc(i32 inreg 60)#0
%F=getelementptr inbounds i8,i8*%E,i64 -4
%G=bitcast i8*%F to i32*
store i32 1342177336,i32*%G,align 4
%H=getelementptr inbounds i8,i8*%E,i64 56
%I=bitcast i8*%H to i32*
store i32 1,i32*%I,align 4
%J=load i8*,i8**%b,align 8
%K=bitcast i8*%E to i8**
store i8*%J,i8**%K,align 8
call void@sml_raise(i8*inreg%E)#1
unreachable
L:
%M=bitcast i8*%B to i32*
%N=load i32,i32*%M,align 4
%O=call fastcc i8*@_SMLFN16SMLSharp__Runtime9errorNameE(i32 inreg%N)
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
%R=load i32,i32*%Q,align 4
%S=trunc i32%R to i28
switch i28%S,label%a0[
i28 6,label%as
i28 7,label%T
]
T:
%U=load i8,i8*%O,align 1
%V=icmp eq i8%U,101
br i1%V,label%W,label%a0
W:
%X=getelementptr inbounds i8,i8*%O,i64 1
%Y=load i8,i8*%X,align 1
%Z=icmp eq i8%Y,102
br i1%Z,label%aa,label%a0
aa:
%ab=getelementptr inbounds i8,i8*%O,i64 2
%ac=load i8,i8*%ab,align 1
%ad=icmp eq i8%ac,97
br i1%ad,label%ae,label%a0
ae:
%af=getelementptr inbounds i8,i8*%O,i64 3
%ag=load i8,i8*%af,align 1
%ah=icmp eq i8%ag,117
br i1%ah,label%ai,label%a0
ai:
%aj=getelementptr inbounds i8,i8*%O,i64 4
%ak=load i8,i8*%aj,align 1
%al=icmp eq i8%ak,108
br i1%al,label%am,label%a0
am:
%an=getelementptr inbounds i8,i8*%O,i64 5
%ao=load i8,i8*%an,align 1
%ap=icmp eq i8%ao,116
br i1%ap,label%aq,label%a0
aq:
%ar=phi i32[0,%aG],[0,%am],[1,%aW],[1,%k]
ret i32%ar
as:
%at=load i8,i8*%O,align 1
switch i8%at,label%a0[
i8 97,label%aK
i8 110,label%au
]
au:
%av=getelementptr inbounds i8,i8*%O,i64 1
%aw=load i8,i8*%av,align 1
%ax=icmp eq i8%aw,111
br i1%ax,label%ay,label%a0
ay:
%az=getelementptr inbounds i8,i8*%O,i64 2
%aA=load i8,i8*%az,align 1
%aB=icmp eq i8%aA,101
br i1%aB,label%aC,label%a0
aC:
%aD=getelementptr inbounds i8,i8*%O,i64 3
%aE=load i8,i8*%aD,align 1
%aF=icmp eq i8%aE,110
br i1%aF,label%aG,label%a0
aG:
%aH=getelementptr inbounds i8,i8*%O,i64 4
%aI=load i8,i8*%aH,align 1
%aJ=icmp eq i8%aI,116
br i1%aJ,label%aq,label%a0
aK:
%aL=getelementptr inbounds i8,i8*%O,i64 1
%aM=load i8,i8*%aL,align 1
%aN=icmp eq i8%aM,99
br i1%aN,label%aO,label%a0
aO:
%aP=getelementptr inbounds i8,i8*%O,i64 2
%aQ=load i8,i8*%aP,align 1
%aR=icmp eq i8%aQ,99
br i1%aR,label%aS,label%a0
aS:
%aT=getelementptr inbounds i8,i8*%O,i64 3
%aU=load i8,i8*%aT,align 1
%aV=icmp eq i8%aU,101
br i1%aV,label%aW,label%a0
aW:
%aX=getelementptr inbounds i8,i8*%O,i64 4
%aY=load i8,i8*%aX,align 1
%aZ=icmp eq i8%aY,115
br i1%aZ,label%aq,label%a0
a0:
%a1=call i8*@sml_alloc(i32 inreg 60)#0
%a2=getelementptr inbounds i8,i8*%a1,i64 -4
%a3=bitcast i8*%a2 to i32*
store i32 1342177336,i32*%a3,align 4
%a4=getelementptr inbounds i8,i8*%a1,i64 56
%a5=bitcast i8*%a4 to i32*
store i32 1,i32*%a5,align 4
%a6=load i8*,i8**%b,align 8
%a7=bitcast i8*%a1 to i8**
store i8*%a6,i8**%a7,align 8
call void@sml_raise(i8*inreg%a1)#1
unreachable
a8:
%a9=call i8*@sml_alloc(i32 inreg 60)#0
%ba=getelementptr inbounds i8,i8*%a9,i64 -4
%bb=bitcast i8*%ba to i32*
store i32 1342177336,i32*%bb,align 4
%bc=getelementptr inbounds i8,i8*%a9,i64 56
%bd=bitcast i8*%bc to i32*
store i32 1,i32*%bd,align 4
%be=load i8*,i8**%b,align 8
%bf=bitcast i8*%a9 to i8**
store i8*%be,i8**%bf,align 8
call void@sml_raise(i8*inreg%a9)#1
unreachable
}
define fastcc i32@_SMLFN9CoreUtils7testDirE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
store i8*null,i8**%b,align 8
%j=invoke fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%h)
to label%k unwind label%m
k:
%l=invoke fastcc i32@_SMLFN18SMLSharp__OSFileSys5isDirE(i8*inreg%j)
to label%aq unwind label%m
m:
%n=landingpad{i8*,i8*}
catch i8*null
%o=extractvalue{i8*,i8*}%n,1
%p=bitcast i8*%o to i8**
%q=load i8*,i8**%p,align 8
store i8*%q,i8**%b,align 8
%r=bitcast i8*%q to i8**
%s=load i8*,i8**%r,align 8
%t=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%u=icmp eq i8*%s,%t
br i1%u,label%v,label%a8
v:
%w=getelementptr inbounds i8,i8*%q,i64 16
%x=bitcast i8*%w to i8**
%y=load i8*,i8**%x,align 8
%z=getelementptr inbounds i8,i8*%y,i64 8
%A=bitcast i8*%z to i8**
%B=load i8*,i8**%A,align 8
%C=icmp eq i8*%B,null
br i1%C,label%D,label%L
D:
%E=call i8*@sml_alloc(i32 inreg 60)#0
%F=getelementptr inbounds i8,i8*%E,i64 -4
%G=bitcast i8*%F to i32*
store i32 1342177336,i32*%G,align 4
%H=getelementptr inbounds i8,i8*%E,i64 56
%I=bitcast i8*%H to i32*
store i32 1,i32*%I,align 4
%J=load i8*,i8**%b,align 8
%K=bitcast i8*%E to i8**
store i8*%J,i8**%K,align 8
call void@sml_raise(i8*inreg%E)#1
unreachable
L:
%M=bitcast i8*%B to i32*
%N=load i32,i32*%M,align 4
%O=call fastcc i8*@_SMLFN16SMLSharp__Runtime9errorNameE(i32 inreg%N)
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
%R=load i32,i32*%Q,align 4
%S=trunc i32%R to i28
switch i28%S,label%a0[
i28 6,label%as
i28 7,label%T
]
T:
%U=load i8,i8*%O,align 1
%V=icmp eq i8%U,101
br i1%V,label%W,label%a0
W:
%X=getelementptr inbounds i8,i8*%O,i64 1
%Y=load i8,i8*%X,align 1
%Z=icmp eq i8%Y,102
br i1%Z,label%aa,label%a0
aa:
%ab=getelementptr inbounds i8,i8*%O,i64 2
%ac=load i8,i8*%ab,align 1
%ad=icmp eq i8%ac,97
br i1%ad,label%ae,label%a0
ae:
%af=getelementptr inbounds i8,i8*%O,i64 3
%ag=load i8,i8*%af,align 1
%ah=icmp eq i8%ag,117
br i1%ah,label%ai,label%a0
ai:
%aj=getelementptr inbounds i8,i8*%O,i64 4
%ak=load i8,i8*%aj,align 1
%al=icmp eq i8%ak,108
br i1%al,label%am,label%a0
am:
%an=getelementptr inbounds i8,i8*%O,i64 5
%ao=load i8,i8*%an,align 1
%ap=icmp eq i8%ao,116
br i1%ap,label%aq,label%a0
aq:
%ar=phi i32[0,%aG],[0,%am],[1,%aW],[%l,%k]
ret i32%ar
as:
%at=load i8,i8*%O,align 1
switch i8%at,label%a0[
i8 97,label%aK
i8 110,label%au
]
au:
%av=getelementptr inbounds i8,i8*%O,i64 1
%aw=load i8,i8*%av,align 1
%ax=icmp eq i8%aw,111
br i1%ax,label%ay,label%a0
ay:
%az=getelementptr inbounds i8,i8*%O,i64 2
%aA=load i8,i8*%az,align 1
%aB=icmp eq i8%aA,101
br i1%aB,label%aC,label%a0
aC:
%aD=getelementptr inbounds i8,i8*%O,i64 3
%aE=load i8,i8*%aD,align 1
%aF=icmp eq i8%aE,110
br i1%aF,label%aG,label%a0
aG:
%aH=getelementptr inbounds i8,i8*%O,i64 4
%aI=load i8,i8*%aH,align 1
%aJ=icmp eq i8%aI,116
br i1%aJ,label%aq,label%a0
aK:
%aL=getelementptr inbounds i8,i8*%O,i64 1
%aM=load i8,i8*%aL,align 1
%aN=icmp eq i8%aM,99
br i1%aN,label%aO,label%a0
aO:
%aP=getelementptr inbounds i8,i8*%O,i64 2
%aQ=load i8,i8*%aP,align 1
%aR=icmp eq i8%aQ,99
br i1%aR,label%aS,label%a0
aS:
%aT=getelementptr inbounds i8,i8*%O,i64 3
%aU=load i8,i8*%aT,align 1
%aV=icmp eq i8%aU,101
br i1%aV,label%aW,label%a0
aW:
%aX=getelementptr inbounds i8,i8*%O,i64 4
%aY=load i8,i8*%aX,align 1
%aZ=icmp eq i8%aY,115
br i1%aZ,label%aq,label%a0
a0:
%a1=call i8*@sml_alloc(i32 inreg 60)#0
%a2=getelementptr inbounds i8,i8*%a1,i64 -4
%a3=bitcast i8*%a2 to i32*
store i32 1342177336,i32*%a3,align 4
%a4=getelementptr inbounds i8,i8*%a1,i64 56
%a5=bitcast i8*%a4 to i32*
store i32 1,i32*%a5,align 4
%a6=load i8*,i8**%b,align 8
%a7=bitcast i8*%a1 to i8**
store i8*%a6,i8**%a7,align 8
call void@sml_raise(i8*inreg%a1)#1
unreachable
a8:
%a9=call i8*@sml_alloc(i32 inreg 60)#0
%ba=getelementptr inbounds i8,i8*%a9,i64 -4
%bb=bitcast i8*%ba to i32*
store i32 1342177336,i32*%bb,align 4
%bc=getelementptr inbounds i8,i8*%a9,i64 56
%bd=bitcast i8*%bc to i32*
store i32 1,i32*%bd,align 4
%be=load i8*,i8**%b,align 8
%bf=bitcast i8*%a9 to i8**
store i8*%be,i8**%bf,align 8
call void@sml_raise(i8*inreg%a9)#1
unreachable
}
define fastcc void@_SMLFN9CoreUtils4rm__fE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
k:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%b,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
store i8*null,i8**%b,align 8
%l=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%j)
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 20)#0
%n=getelementptr inbounds i8,i8*%m,i64 -4
%o=bitcast i8*%n to i32*
store i32 1342177296,i32*%o,align 4
%p=bitcast i8*%m to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[7x i8]}>,<{[4x i8],i32,[7x i8]}>*@d,i64 0,i32 2,i64 0),i8**%p,align 8
%q=load i8*,i8**%b,align 8
%r=getelementptr inbounds i8,i8*%m,i64 8
%s=bitcast i8*%r to i8**
store i8*%q,i8**%s,align 8
%t=getelementptr inbounds i8,i8*%m,i64 16
%u=bitcast i8*%t to i32*
store i32 3,i32*%u,align 4
%v=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%m)
store i8*%v,i8**%c,align 8
%w=load i32*,i32**bitcast(i8**@_SMLZN7Control12printCommandE to i32**),align 8
%x=load i32,i32*%w,align 4
%y=icmp eq i32%x,0
br i1%y,label%V,label%z
z:
%A=load i8*,i8**@_SMLZN6TextIO6stdErrE,align 8
store i8*%A,i8**%d,align 8
%B=call i8*@sml_alloc(i32 inreg 20)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177296,i32*%D,align 4
%E=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%F=bitcast i8*%B to i8**
store i8*%E,i8**%F,align 8
%G=getelementptr inbounds i8,i8*%B,i64 8
%H=bitcast i8*%G to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@q,i64 0,i32 2,i64 0),i8**%H,align 8
%I=getelementptr inbounds i8,i8*%B,i64 16
%J=bitcast i8*%I to i32*
store i32 3,i32*%J,align 4
%K=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%B)
store i8*%K,i8**%c,align 8
%L=call i8*@sml_alloc(i32 inreg 20)#0
%M=getelementptr inbounds i8,i8*%L,i64 -4
%N=bitcast i8*%M to i32*
store i32 1342177296,i32*%N,align 4
%O=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%P=bitcast i8*%L to i8**
store i8*%O,i8**%P,align 8
%Q=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%R=getelementptr inbounds i8,i8*%L,i64 8
%S=bitcast i8*%R to i8**
store i8*%Q,i8**%S,align 8
%T=getelementptr inbounds i8,i8*%L,i64 16
%U=bitcast i8*%T to i32*
store i32 3,i32*%U,align 4
call fastcc void@_SMLFN6TextIO6outputE(i8*inreg%L)
br label%W
V:
store i8*null,i8**%c,align 8
br label%W
W:
%X=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
invoke fastcc void@_SMLFN18SMLSharp__OSFileSys6removeE(i8*inreg%X)
to label%a2 unwind label%Y
Y:
%Z=landingpad{i8*,i8*}
catch i8*null
%aa=extractvalue{i8*,i8*}%Z,1
%ab=bitcast i8*%aa to i8**
%ac=load i8*,i8**%ab,align 8
store i8*%ac,i8**%b,align 8
%ad=bitcast i8*%ac to i8**
%ae=load i8*,i8**%ad,align 8
%af=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%ag=icmp eq i8*%ae,%af
br i1%ag,label%ah,label%bZ
ah:
%ai=getelementptr inbounds i8,i8*%ac,i64 16
%aj=bitcast i8*%ai to i8**
%ak=load i8*,i8**%aj,align 8
%al=getelementptr inbounds i8,i8*%ak,i64 8
%am=bitcast i8*%al to i8**
%an=load i8*,i8**%am,align 8
%ao=icmp eq i8*%an,null
br i1%ao,label%ap,label%ax
ap:
%aq=call i8*@sml_alloc(i32 inreg 60)#0
%ar=getelementptr inbounds i8,i8*%aq,i64 -4
%as=bitcast i8*%ar to i32*
store i32 1342177336,i32*%as,align 4
%at=getelementptr inbounds i8,i8*%aq,i64 56
%au=bitcast i8*%at to i32*
store i32 1,i32*%au,align 4
%av=load i8*,i8**%b,align 8
%aw=bitcast i8*%aq to i8**
store i8*%av,i8**%aw,align 8
call void@sml_raise(i8*inreg%aq)#1
unreachable
ax:
%ay=bitcast i8*%an to i32*
%az=load i32,i32*%ay,align 4
%aA=call fastcc i8*@_SMLFN16SMLSharp__Runtime9errorNameE(i32 inreg%az)
%aB=getelementptr inbounds i8,i8*%aA,i64 -4
%aC=bitcast i8*%aB to i32*
%aD=load i32,i32*%aC,align 4
%aE=trunc i32%aD to i28
switch i28%aE,label%bR[
i28 6,label%a3
i28 7,label%aF
]
aF:
%aG=load i8,i8*%aA,align 1
%aH=icmp eq i8%aG,101
br i1%aH,label%aI,label%bR
aI:
%aJ=getelementptr inbounds i8,i8*%aA,i64 1
%aK=load i8,i8*%aJ,align 1
%aL=icmp eq i8%aK,102
br i1%aL,label%aM,label%bR
aM:
%aN=getelementptr inbounds i8,i8*%aA,i64 2
%aO=load i8,i8*%aN,align 1
%aP=icmp eq i8%aO,97
br i1%aP,label%aQ,label%bR
aQ:
%aR=getelementptr inbounds i8,i8*%aA,i64 3
%aS=load i8,i8*%aR,align 1
%aT=icmp eq i8%aS,117
br i1%aT,label%aU,label%bR
aU:
%aV=getelementptr inbounds i8,i8*%aA,i64 4
%aW=load i8,i8*%aV,align 1
%aX=icmp eq i8%aW,108
br i1%aX,label%aY,label%bR
aY:
%aZ=getelementptr inbounds i8,i8*%aA,i64 5
%a0=load i8,i8*%aZ,align 1
%a1=icmp eq i8%a0,116
br i1%a1,label%a2,label%bR
a2:
ret void
a3:
%a4=load i8,i8*%aA,align 1
switch i8%a4,label%bR[
i8 97,label%bB
i8 105,label%bl
i8 110,label%a5
]
a5:
%a6=getelementptr inbounds i8,i8*%aA,i64 1
%a7=load i8,i8*%a6,align 1
%a8=icmp eq i8%a7,111
br i1%a8,label%a9,label%bR
a9:
%ba=getelementptr inbounds i8,i8*%aA,i64 2
%bb=load i8,i8*%ba,align 1
%bc=icmp eq i8%bb,101
br i1%bc,label%bd,label%bR
bd:
%be=getelementptr inbounds i8,i8*%aA,i64 3
%bf=load i8,i8*%be,align 1
%bg=icmp eq i8%bf,110
br i1%bg,label%bh,label%bR
bh:
%bi=getelementptr inbounds i8,i8*%aA,i64 4
%bj=load i8,i8*%bi,align 1
%bk=icmp eq i8%bj,116
br i1%bk,label%a2,label%bR
bl:
%bm=getelementptr inbounds i8,i8*%aA,i64 1
%bn=load i8,i8*%bm,align 1
%bo=icmp eq i8%bn,115
br i1%bo,label%bp,label%bR
bp:
%bq=getelementptr inbounds i8,i8*%aA,i64 2
%br=load i8,i8*%bq,align 1
%bs=icmp eq i8%br,100
br i1%bs,label%bt,label%bR
bt:
%bu=getelementptr inbounds i8,i8*%aA,i64 3
%bv=load i8,i8*%bu,align 1
%bw=icmp eq i8%bv,105
br i1%bw,label%bx,label%bR
bx:
%by=getelementptr inbounds i8,i8*%aA,i64 4
%bz=load i8,i8*%by,align 1
%bA=icmp eq i8%bz,114
br i1%bA,label%a2,label%bR
bB:
%bC=getelementptr inbounds i8,i8*%aA,i64 1
%bD=load i8,i8*%bC,align 1
%bE=icmp eq i8%bD,99
br i1%bE,label%bF,label%bR
bF:
%bG=getelementptr inbounds i8,i8*%aA,i64 2
%bH=load i8,i8*%bG,align 1
%bI=icmp eq i8%bH,99
br i1%bI,label%bJ,label%bR
bJ:
%bK=getelementptr inbounds i8,i8*%aA,i64 3
%bL=load i8,i8*%bK,align 1
%bM=icmp eq i8%bL,101
br i1%bM,label%bN,label%bR
bN:
%bO=getelementptr inbounds i8,i8*%aA,i64 4
%bP=load i8,i8*%bO,align 1
%bQ=icmp eq i8%bP,115
br i1%bQ,label%a2,label%bR
bR:
%bS=call i8*@sml_alloc(i32 inreg 60)#0
%bT=getelementptr inbounds i8,i8*%bS,i64 -4
%bU=bitcast i8*%bT to i32*
store i32 1342177336,i32*%bU,align 4
%bV=getelementptr inbounds i8,i8*%bS,i64 56
%bW=bitcast i8*%bV to i32*
store i32 1,i32*%bW,align 4
%bX=load i8*,i8**%b,align 8
%bY=bitcast i8*%bS to i8**
store i8*%bX,i8**%bY,align 8
call void@sml_raise(i8*inreg%bS)#1
unreachable
bZ:
%b0=call i8*@sml_alloc(i32 inreg 60)#0
%b1=getelementptr inbounds i8,i8*%b0,i64 -4
%b2=bitcast i8*%b1 to i32*
store i32 1342177336,i32*%b2,align 4
%b3=getelementptr inbounds i8,i8*%b0,i64 56
%b4=bitcast i8*%b3 to i32*
store i32 1,i32*%b4,align 4
%b5=load i8*,i8**%b,align 8
%b6=bitcast i8*%b0 to i8**
store i8*%b5,i8**%b6,align 8
call void@sml_raise(i8*inreg%b0)#1
unreachable
}
define fastcc void@_SMLFN9CoreUtils5mkdirE(i8*inreg%a)#2 gc"smlsharp"{
k:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%b,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
store i8*null,i8**%b,align 8
%l=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%j)
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 20)#0
%n=getelementptr inbounds i8,i8*%m,i64 -4
%o=bitcast i8*%n to i32*
store i32 1342177296,i32*%o,align 4
%p=bitcast i8*%m to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[7x i8]}>,<{[4x i8],i32,[7x i8]}>*@f,i64 0,i32 2,i64 0),i8**%p,align 8
%q=load i8*,i8**%b,align 8
%r=getelementptr inbounds i8,i8*%m,i64 8
%s=bitcast i8*%r to i8**
store i8*%q,i8**%s,align 8
%t=getelementptr inbounds i8,i8*%m,i64 16
%u=bitcast i8*%t to i32*
store i32 3,i32*%u,align 4
%v=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%m)
store i8*%v,i8**%c,align 8
%w=load i32*,i32**bitcast(i8**@_SMLZN7Control12printCommandE to i32**),align 8
%x=load i32,i32*%w,align 4
%y=icmp eq i32%x,0
br i1%y,label%V,label%z
z:
%A=load i8*,i8**@_SMLZN6TextIO6stdErrE,align 8
store i8*%A,i8**%d,align 8
%B=call i8*@sml_alloc(i32 inreg 20)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177296,i32*%D,align 4
%E=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%F=bitcast i8*%B to i8**
store i8*%E,i8**%F,align 8
%G=getelementptr inbounds i8,i8*%B,i64 8
%H=bitcast i8*%G to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@q,i64 0,i32 2,i64 0),i8**%H,align 8
%I=getelementptr inbounds i8,i8*%B,i64 16
%J=bitcast i8*%I to i32*
store i32 3,i32*%J,align 4
%K=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%B)
store i8*%K,i8**%c,align 8
%L=call i8*@sml_alloc(i32 inreg 20)#0
%M=getelementptr inbounds i8,i8*%L,i64 -4
%N=bitcast i8*%M to i32*
store i32 1342177296,i32*%N,align 4
%O=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%P=bitcast i8*%L to i8**
store i8*%O,i8**%P,align 8
%Q=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%R=getelementptr inbounds i8,i8*%L,i64 8
%S=bitcast i8*%R to i8**
store i8*%Q,i8**%S,align 8
%T=getelementptr inbounds i8,i8*%L,i64 16
%U=bitcast i8*%T to i32*
store i32 3,i32*%U,align 4
call fastcc void@_SMLFN6TextIO6outputE(i8*inreg%L)
br label%V
V:
%W=load i8*,i8**%b,align 8
tail call fastcc void@_SMLFN18SMLSharp__OSFileSys5mkDirE(i8*inreg%W)
ret void
}
define fastcc void@_SMLFN9CoreUtils7rmdir__fE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
k:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%b,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
store i8*null,i8**%b,align 8
%l=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%j)
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 20)#0
%n=getelementptr inbounds i8,i8*%m,i64 -4
%o=bitcast i8*%n to i32*
store i32 1342177296,i32*%o,align 4
%p=bitcast i8*%m to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[7x i8]}>,<{[4x i8],i32,[7x i8]}>*@h,i64 0,i32 2,i64 0),i8**%p,align 8
%q=load i8*,i8**%b,align 8
%r=getelementptr inbounds i8,i8*%m,i64 8
%s=bitcast i8*%r to i8**
store i8*%q,i8**%s,align 8
%t=getelementptr inbounds i8,i8*%m,i64 16
%u=bitcast i8*%t to i32*
store i32 3,i32*%u,align 4
%v=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%m)
store i8*%v,i8**%c,align 8
%w=load i32*,i32**bitcast(i8**@_SMLZN7Control12printCommandE to i32**),align 8
%x=load i32,i32*%w,align 4
%y=icmp eq i32%x,0
br i1%y,label%V,label%z
z:
%A=load i8*,i8**@_SMLZN6TextIO6stdErrE,align 8
store i8*%A,i8**%d,align 8
%B=call i8*@sml_alloc(i32 inreg 20)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177296,i32*%D,align 4
%E=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%F=bitcast i8*%B to i8**
store i8*%E,i8**%F,align 8
%G=getelementptr inbounds i8,i8*%B,i64 8
%H=bitcast i8*%G to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@q,i64 0,i32 2,i64 0),i8**%H,align 8
%I=getelementptr inbounds i8,i8*%B,i64 16
%J=bitcast i8*%I to i32*
store i32 3,i32*%J,align 4
%K=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%B)
store i8*%K,i8**%c,align 8
%L=call i8*@sml_alloc(i32 inreg 20)#0
%M=getelementptr inbounds i8,i8*%L,i64 -4
%N=bitcast i8*%M to i32*
store i32 1342177296,i32*%N,align 4
%O=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%P=bitcast i8*%L to i8**
store i8*%O,i8**%P,align 8
%Q=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%R=getelementptr inbounds i8,i8*%L,i64 8
%S=bitcast i8*%R to i8**
store i8*%Q,i8**%S,align 8
%T=getelementptr inbounds i8,i8*%L,i64 16
%U=bitcast i8*%T to i32*
store i32 3,i32*%U,align 4
call fastcc void@_SMLFN6TextIO6outputE(i8*inreg%L)
br label%W
V:
store i8*null,i8**%c,align 8
br label%W
W:
%X=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
invoke fastcc void@_SMLFN18SMLSharp__OSFileSys5rmDirE(i8*inreg%X)
to label%a1 unwind label%Y
Y:
%Z=landingpad{i8*,i8*}
catch i8*null
%aa=extractvalue{i8*,i8*}%Z,1
%ab=bitcast i8*%aa to i8**
%ac=load i8*,i8**%ab,align 8
store i8*%ac,i8**%b,align 8
%ad=bitcast i8*%ac to i8**
%ae=load i8*,i8**%ad,align 8
%af=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%ag=icmp eq i8*%ae,%af
br i1%ag,label%ah,label%b2
ah:
%ai=getelementptr inbounds i8,i8*%ac,i64 16
%aj=bitcast i8*%ai to i8**
%ak=load i8*,i8**%aj,align 8
%al=getelementptr inbounds i8,i8*%ak,i64 8
%am=bitcast i8*%al to i8**
%an=load i8*,i8**%am,align 8
%ao=icmp eq i8*%an,null
br i1%ao,label%ap,label%ax
ap:
%aq=call i8*@sml_alloc(i32 inreg 60)#0
%ar=getelementptr inbounds i8,i8*%aq,i64 -4
%as=bitcast i8*%ar to i32*
store i32 1342177336,i32*%as,align 4
%at=getelementptr inbounds i8,i8*%aq,i64 56
%au=bitcast i8*%at to i32*
store i32 1,i32*%au,align 4
%av=load i8*,i8**%b,align 8
%aw=bitcast i8*%aq to i8**
store i8*%av,i8**%aw,align 8
call void@sml_raise(i8*inreg%aq)#1
unreachable
ax:
%ay=bitcast i8*%an to i32*
%az=load i32,i32*%ay,align 4
%aA=call fastcc i8*@_SMLFN16SMLSharp__Runtime9errorNameE(i32 inreg%az)
%aB=getelementptr inbounds i8,i8*%aA,i64 -4
%aC=bitcast i8*%aB to i32*
%aD=load i32,i32*%aC,align 4
%aE=trunc i32%aD to i28
switch i28%aE,label%bU[
i28 6,label%bm
i28 7,label%aF
]
aF:
%aG=load i8,i8*%aA,align 1
switch i8%aG,label%bU[
i8 101,label%a2
i8 110,label%aH
]
aH:
%aI=getelementptr inbounds i8,i8*%aA,i64 1
%aJ=load i8,i8*%aI,align 1
%aK=icmp eq i8%aJ,111
br i1%aK,label%aL,label%bU
aL:
%aM=getelementptr inbounds i8,i8*%aA,i64 2
%aN=load i8,i8*%aM,align 1
%aO=icmp eq i8%aN,116
br i1%aO,label%aP,label%bU
aP:
%aQ=getelementptr inbounds i8,i8*%aA,i64 3
%aR=load i8,i8*%aQ,align 1
%aS=icmp eq i8%aR,100
br i1%aS,label%aT,label%bU
aT:
%aU=getelementptr inbounds i8,i8*%aA,i64 4
%aV=load i8,i8*%aU,align 1
%aW=icmp eq i8%aV,105
br i1%aW,label%aX,label%bU
aX:
%aY=getelementptr inbounds i8,i8*%aA,i64 5
%aZ=load i8,i8*%aY,align 1
%a0=icmp eq i8%aZ,114
br i1%a0,label%a1,label%bU
a1:
ret void
a2:
%a3=getelementptr inbounds i8,i8*%aA,i64 1
%a4=load i8,i8*%a3,align 1
%a5=icmp eq i8%a4,102
br i1%a5,label%a6,label%bU
a6:
%a7=getelementptr inbounds i8,i8*%aA,i64 2
%a8=load i8,i8*%a7,align 1
%a9=icmp eq i8%a8,97
br i1%a9,label%ba,label%bU
ba:
%bb=getelementptr inbounds i8,i8*%aA,i64 3
%bc=load i8,i8*%bb,align 1
%bd=icmp eq i8%bc,117
br i1%bd,label%be,label%bU
be:
%bf=getelementptr inbounds i8,i8*%aA,i64 4
%bg=load i8,i8*%bf,align 1
%bh=icmp eq i8%bg,108
br i1%bh,label%bi,label%bU
bi:
%bj=getelementptr inbounds i8,i8*%aA,i64 5
%bk=load i8,i8*%bj,align 1
%bl=icmp eq i8%bk,116
br i1%bl,label%a1,label%bU
bm:
%bn=load i8,i8*%aA,align 1
switch i8%bn,label%bU[
i8 97,label%bE
i8 110,label%bo
]
bo:
%bp=getelementptr inbounds i8,i8*%aA,i64 1
%bq=load i8,i8*%bp,align 1
%br=icmp eq i8%bq,111
br i1%br,label%bs,label%bU
bs:
%bt=getelementptr inbounds i8,i8*%aA,i64 2
%bu=load i8,i8*%bt,align 1
%bv=icmp eq i8%bu,101
br i1%bv,label%bw,label%bU
bw:
%bx=getelementptr inbounds i8,i8*%aA,i64 3
%by=load i8,i8*%bx,align 1
%bz=icmp eq i8%by,110
br i1%bz,label%bA,label%bU
bA:
%bB=getelementptr inbounds i8,i8*%aA,i64 4
%bC=load i8,i8*%bB,align 1
%bD=icmp eq i8%bC,116
br i1%bD,label%a1,label%bU
bE:
%bF=getelementptr inbounds i8,i8*%aA,i64 1
%bG=load i8,i8*%bF,align 1
%bH=icmp eq i8%bG,99
br i1%bH,label%bI,label%bU
bI:
%bJ=getelementptr inbounds i8,i8*%aA,i64 2
%bK=load i8,i8*%bJ,align 1
%bL=icmp eq i8%bK,99
br i1%bL,label%bM,label%bU
bM:
%bN=getelementptr inbounds i8,i8*%aA,i64 3
%bO=load i8,i8*%bN,align 1
%bP=icmp eq i8%bO,101
br i1%bP,label%bQ,label%bU
bQ:
%bR=getelementptr inbounds i8,i8*%aA,i64 4
%bS=load i8,i8*%bR,align 1
%bT=icmp eq i8%bS,115
br i1%bT,label%a1,label%bU
bU:
%bV=call i8*@sml_alloc(i32 inreg 60)#0
%bW=getelementptr inbounds i8,i8*%bV,i64 -4
%bX=bitcast i8*%bW to i32*
store i32 1342177336,i32*%bX,align 4
%bY=getelementptr inbounds i8,i8*%bV,i64 56
%bZ=bitcast i8*%bY to i32*
store i32 1,i32*%bZ,align 4
%b0=load i8*,i8**%b,align 8
%b1=bitcast i8*%bV to i8**
store i8*%b0,i8**%b1,align 8
call void@sml_raise(i8*inreg%bV)#1
unreachable
b2:
%b3=call i8*@sml_alloc(i32 inreg 60)#0
%b4=getelementptr inbounds i8,i8*%b3,i64 -4
%b5=bitcast i8*%b4 to i32*
store i32 1342177336,i32*%b5,align 4
%b6=getelementptr inbounds i8,i8*%b3,i64 56
%b7=bitcast i8*%b6 to i32*
store i32 1,i32*%b7,align 4
%b8=load i8*,i8**%b,align 8
%b9=bitcast i8*%b3 to i8**
store i8*%b8,i8**%b9,align 8
call void@sml_raise(i8*inreg%b3)#1
unreachable
}
define fastcc void@_SMLFN9CoreUtils12makeTextFileE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
k:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%b,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=bitcast i8*%j to i8**
%m=load i8*,i8**%l,align 8
store i8*%m,i8**%b,align 8
%n=getelementptr inbounds i8,i8*%j,i64 8
%o=bitcast i8*%n to i8**
%p=load i8*,i8**%o,align 8
store i8*%p,i8**%c,align 8
%q=call fastcc i8*@_SMLFN8Filename6TextIO7openOutE(i8*inreg%m)
store i8*%q,i8**%d,align 8
%r=call i8*@sml_alloc(i32 inreg 20)#0
%s=getelementptr inbounds i8,i8*%r,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177296,i32*%t,align 4
%u=load i8*,i8**%d,align 8
%v=bitcast i8*%r to i8**
store i8*%u,i8**%v,align 8
%w=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%x=getelementptr inbounds i8,i8*%r,i64 8
%y=bitcast i8*%x to i8**
store i8*%w,i8**%y,align 8
%z=getelementptr inbounds i8,i8*%r,i64 16
%A=bitcast i8*%z to i32*
store i32 3,i32*%A,align 4
invoke fastcc void@_SMLFN6TextIO6outputE(i8*inreg%r)
to label%P unwind label%B
B:
%C=landingpad{i8*,i8*}
catch i8*null
%D=extractvalue{i8*,i8*}%C,1
%E=bitcast i8*%D to i8**
%F=load i8*,i8**%E,align 8
store i8*%F,i8**%c,align 8
%G=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
call fastcc void@_SMLFN6TextIO8closeOutE(i8*inreg%G)
%H=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN9CoreUtils4rm__fE(i8*inreg%H)
%I=call i8*@sml_alloc(i32 inreg 60)#0
%J=getelementptr inbounds i8,i8*%I,i64 -4
%K=bitcast i8*%J to i32*
store i32 1342177336,i32*%K,align 4
%L=getelementptr inbounds i8,i8*%I,i64 56
%M=bitcast i8*%L to i32*
store i32 1,i32*%M,align 4
%N=load i8*,i8**%c,align 8
%O=bitcast i8*%I to i8**
store i8*%N,i8**%O,align 8
call void@sml_raise(i8*inreg%I)#1
unreachable
P:
%Q=load i8*,i8**%d,align 8
tail call fastcc void@_SMLFN6TextIO8closeOutE(i8*inreg%Q)
ret void
}
define fastcc void@_SMLFN9CoreUtils11makeBinFileE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
k:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%b,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=bitcast i8*%j to i8**
%m=load i8*,i8**%l,align 8
store i8*%m,i8**%b,align 8
%n=getelementptr inbounds i8,i8*%j,i64 8
%o=bitcast i8*%n to i8**
%p=load i8*,i8**%o,align 8
store i8*%p,i8**%c,align 8
%q=call fastcc i8*@_SMLFN8Filename5BinIO7openOutE(i8*inreg%m)
store i8*%q,i8**%d,align 8
%r=call i8*@sml_alloc(i32 inreg 20)#0
%s=getelementptr inbounds i8,i8*%r,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177296,i32*%t,align 4
%u=load i8*,i8**%d,align 8
%v=bitcast i8*%r to i8**
store i8*%u,i8**%v,align 8
%w=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%x=getelementptr inbounds i8,i8*%r,i64 8
%y=bitcast i8*%x to i8**
store i8*%w,i8**%y,align 8
%z=getelementptr inbounds i8,i8*%r,i64 16
%A=bitcast i8*%z to i32*
store i32 3,i32*%A,align 4
invoke fastcc void@_SMLFN5BinIO6outputE(i8*inreg%r)
to label%P unwind label%B
B:
%C=landingpad{i8*,i8*}
catch i8*null
%D=extractvalue{i8*,i8*}%C,1
%E=bitcast i8*%D to i8**
%F=load i8*,i8**%E,align 8
store i8*%F,i8**%c,align 8
%G=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
call fastcc void@_SMLFN5BinIO8closeOutE(i8*inreg%G)
%H=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN9CoreUtils4rm__fE(i8*inreg%H)
%I=call i8*@sml_alloc(i32 inreg 60)#0
%J=getelementptr inbounds i8,i8*%I,i64 -4
%K=bitcast i8*%J to i32*
store i32 1342177336,i32*%K,align 4
%L=getelementptr inbounds i8,i8*%I,i64 56
%M=bitcast i8*%L to i32*
store i32 1,i32*%M,align 4
%N=load i8*,i8**%c,align 8
%O=bitcast i8*%I to i8**
store i8*%N,i8**%O,align 8
call void@sml_raise(i8*inreg%I)#1
unreachable
P:
%Q=load i8*,i8**%d,align 8
tail call fastcc void@_SMLFN5BinIO8closeOutE(i8*inreg%Q)
ret void
}
define internal fastcc void@_SMLLLN9CoreUtils13makeTextFile_GE_99(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%d,align 8
store i8*%b,i8**%c,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%g,label%i
g:
%h=bitcast i8*%a to i8**
br label%l
i:
call void@sml_check(i32 inreg%e)
%j=bitcast i8**%d to i8***
%k=load i8**,i8***%j,align 8
br label%l
l:
%m=phi i8**[%k,%i],[%h,%g]
%n=load i8*,i8**%m,align 8
store i8*%n,i8**%d,align 8
%o=call i8*@sml_alloc(i32 inreg 20)#0
%p=getelementptr inbounds i8,i8*%o,i64 -4
%q=bitcast i8*%p to i32*
store i32 1342177296,i32*%q,align 4
%r=load i8*,i8**%d,align 8
%s=bitcast i8*%o to i8**
store i8*%r,i8**%s,align 8
%t=load i8*,i8**%c,align 8
%u=getelementptr inbounds i8,i8*%o,i64 8
%v=bitcast i8*%u to i8**
store i8*%t,i8**%v,align 8
%w=getelementptr inbounds i8,i8*%o,i64 16
%x=bitcast i8*%w to i32*
store i32 3,i32*%x,align 4
tail call fastcc void@_SMLFN6TextIO6outputE(i8*inreg%o)
ret void
}
define fastcc void@_SMLFN9CoreUtils13makeTextFile_GE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
l:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
store i8*%a,i8**%b,align 8
%f=load atomic i32,i32*@sml_check_flag unordered,align 4
%g=icmp eq i32%f,0
br i1%g,label%j,label%h
h:
call void@sml_check(i32 inreg%f)
%i=load i8*,i8**%b,align 8
br label%j
j:
%k=phi i8*[%i,%h],[%a,%l]
%m=bitcast i8*%k to i8**
%n=load i8*,i8**%m,align 8
store i8*%n,i8**%b,align 8
%o=getelementptr inbounds i8,i8*%k,i64 8
%p=bitcast i8*%o to i8**
%q=load i8*,i8**%p,align 8
store i8*%q,i8**%c,align 8
%r=call fastcc i8*@_SMLFN8Filename6TextIO7openOutE(i8*inreg%n)
store i8*%r,i8**%d,align 8
%s=load i8*,i8**%c,align 8
%t=getelementptr inbounds i8,i8*%s,i64 16
%u=bitcast i8*%t to i8*(i8*,i8*)**
%v=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%u,align 8
%w=bitcast i8*%s to i8**
%x=load i8*,i8**%w,align 8
store i8*%x,i8**%c,align 8
%y=call i8*@sml_alloc(i32 inreg 12)#0
%z=getelementptr inbounds i8,i8*%y,i64 -4
%A=bitcast i8*%z to i32*
store i32 1342177288,i32*%A,align 4
store i8*%y,i8**%e,align 8
%B=load i8*,i8**%d,align 8
%C=bitcast i8*%y to i8**
store i8*%B,i8**%C,align 8
%D=getelementptr inbounds i8,i8*%y,i64 8
%E=bitcast i8*%D to i32*
store i32 1,i32*%E,align 4
%F=call i8*@sml_alloc(i32 inreg 28)#0
%G=getelementptr inbounds i8,i8*%F,i64 -4
%H=bitcast i8*%G to i32*
store i32 1342177304,i32*%H,align 4
%I=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%J=bitcast i8*%F to i8**
store i8*%I,i8**%J,align 8
%K=getelementptr inbounds i8,i8*%F,i64 8
%L=bitcast i8*%K to void(...)**
store void(...)*bitcast(void(i8*,i8*)*@_SMLLLN9CoreUtils13makeTextFile_GE_99 to void(...)*),void(...)**%L,align 8
%M=getelementptr inbounds i8,i8*%F,i64 16
%N=bitcast i8*%M to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils13makeTextFile_GE_128 to void(...)*),void(...)**%N,align 8
%O=getelementptr inbounds i8,i8*%F,i64 24
%P=bitcast i8*%O to i32*
store i32 -2147483647,i32*%P,align 4
%Q=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%R=invoke fastcc i8*%v(i8*inreg%Q,i8*inreg%F)
to label%S unwind label%U
S:
%T=load i8*,i8**%d,align 8
tail call fastcc void@_SMLFN6TextIO8closeOutE(i8*inreg%T)
ret void
U:
%V=landingpad{i8*,i8*}
catch i8*null
%W=extractvalue{i8*,i8*}%V,1
%X=bitcast i8*%W to i8**
%Y=load i8*,i8**%X,align 8
store i8*%Y,i8**%c,align 8
%Z=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
call fastcc void@_SMLFN6TextIO8closeOutE(i8*inreg%Z)
%aa=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN9CoreUtils4rm__fE(i8*inreg%aa)
%ab=call i8*@sml_alloc(i32 inreg 60)#0
%ac=getelementptr inbounds i8,i8*%ab,i64 -4
%ad=bitcast i8*%ac to i32*
store i32 1342177336,i32*%ad,align 4
%ae=getelementptr inbounds i8,i8*%ab,i64 56
%af=bitcast i8*%ae to i32*
store i32 1,i32*%af,align 4
%ag=load i8*,i8**%c,align 8
%ah=bitcast i8*%ab to i8**
store i8*%ag,i8**%ah,align 8
call void@sml_raise(i8*inreg%ab)#1
unreachable
}
define fastcc i8*@_SMLFN9CoreUtils12readTextFileE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
j:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%h,label%f
f:
call void@sml_check(i32 inreg%d)
%g=load i8*,i8**%b,align 8
br label%h
h:
%i=phi i8*[%g,%f],[%a,%j]
store i8*null,i8**%b,align 8
%k=call fastcc i8*@_SMLFN8Filename6TextIO6openInE(i8*inreg%i)
store i8*%k,i8**%b,align 8
%l=invoke fastcc i8*@_SMLFN6TextIO8inputAllE(i8*inreg%k)
to label%m unwind label%p
m:
store i8*%l,i8**%c,align 8
%n=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN6TextIO7closeInE(i8*inreg%n)
%o=load i8*,i8**%c,align 8
ret i8*%o
p:
%q=landingpad{i8*,i8*}
catch i8*null
%r=extractvalue{i8*,i8*}%q,1
%s=bitcast i8*%r to i8**
%t=load i8*,i8**%s,align 8
store i8*%t,i8**%c,align 8
%u=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN6TextIO7closeInE(i8*inreg%u)
%v=call i8*@sml_alloc(i32 inreg 60)#0
%w=getelementptr inbounds i8,i8*%v,i64 -4
%x=bitcast i8*%w to i32*
store i32 1342177336,i32*%x,align 4
%y=getelementptr inbounds i8,i8*%v,i64 56
%z=bitcast i8*%y to i32*
store i32 1,i32*%z,align 4
%A=load i8*,i8**%c,align 8
%B=bitcast i8*%v to i8**
store i8*%A,i8**%B,align 8
call void@sml_raise(i8*inreg%v)#1
unreachable
}
define fastcc i8*@_SMLFN9CoreUtils11readBinFileE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
j:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%h,label%f
f:
call void@sml_check(i32 inreg%d)
%g=load i8*,i8**%b,align 8
br label%h
h:
%i=phi i8*[%g,%f],[%a,%j]
store i8*null,i8**%b,align 8
%k=call fastcc i8*@_SMLFN8Filename5BinIO6openInE(i8*inreg%i)
store i8*%k,i8**%b,align 8
%l=invoke fastcc i8*@_SMLFN5BinIO8inputAllE(i8*inreg%k)
to label%m unwind label%p
m:
store i8*%l,i8**%c,align 8
%n=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN5BinIO7closeInE(i8*inreg%n)
%o=load i8*,i8**%c,align 8
ret i8*%o
p:
%q=landingpad{i8*,i8*}
catch i8*null
%r=extractvalue{i8*,i8*}%q,1
%s=bitcast i8*%r to i8**
%t=load i8*,i8**%s,align 8
store i8*%t,i8**%c,align 8
%u=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
call fastcc void@_SMLFN5BinIO7closeInE(i8*inreg%u)
%v=call i8*@sml_alloc(i32 inreg 60)#0
%w=getelementptr inbounds i8,i8*%v,i64 -4
%x=bitcast i8*%w to i32*
store i32 1342177336,i32*%x,align 4
%y=getelementptr inbounds i8,i8*%v,i64 56
%z=bitcast i8*%y to i32*
store i32 1,i32*%z,align 4
%A=load i8*,i8**%c,align 8
%B=bitcast i8*%v to i8**
store i8*%A,i8**%B,align 8
call void@sml_raise(i8*inreg%v)#1
unreachable
}
define internal fastcc void@_SMLLLN9CoreUtils2cpE_109(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
call void@llvm.gcroot(i8**%f,i8*null)#0
store i8*%a,i8**%e,align 8
store i8*%b,i8**%c,align 8
%g=load atomic i32,i32*@sml_check_flag unordered,align 4
%h=icmp eq i32%g,0
br i1%h,label%i,label%l
i:
%j=bitcast i8*%a to i8**
%k=bitcast i8**%e to i8***
br label%o
l:
call void@sml_check(i32 inreg%g)
%m=bitcast i8**%e to i8***
%n=load i8**,i8***%m,align 8
br label%o
o:
%p=phi i8***[%k,%i],[%m,%l]
%q=phi i8**[%j,%i],[%n,%l]
%r=load i8*,i8**%q,align 8
%s=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%r)
store i8*%s,i8**%d,align 8
%t=call i8*@sml_alloc(i32 inreg 20)#0
%u=getelementptr inbounds i8,i8*%t,i64 -4
%v=bitcast i8*%u to i32*
store i32 1342177296,i32*%v,align 4
%w=bitcast i8*%t to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[4x i8]}>,<{[4x i8],i32,[4x i8]}>*@o,i64 0,i32 2,i64 0),i8**%w,align 8
%x=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%y=getelementptr inbounds i8,i8*%t,i64 8
%z=bitcast i8*%y to i8**
store i8*%x,i8**%z,align 8
%A=getelementptr inbounds i8,i8*%t,i64 16
%B=bitcast i8*%A to i32*
store i32 3,i32*%B,align 4
%C=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%t)
store i8*%C,i8**%d,align 8
%D=call i8*@sml_alloc(i32 inreg 20)#0
%E=getelementptr inbounds i8,i8*%D,i64 -4
%F=bitcast i8*%E to i32*
store i32 1342177296,i32*%F,align 4
%G=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%H=bitcast i8*%D to i8**
store i8*%G,i8**%H,align 8
%I=getelementptr inbounds i8,i8*%D,i64 8
%J=bitcast i8*%I to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@p,i64 0,i32 2,i64 0),i8**%J,align 8
%K=getelementptr inbounds i8,i8*%D,i64 16
%L=bitcast i8*%K to i32*
store i32 3,i32*%L,align 4
%M=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%D)
store i8*%M,i8**%d,align 8
%N=load i8*,i8**%c,align 8
%O=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%N)
store i8*%O,i8**%f,align 8
%P=call i8*@sml_alloc(i32 inreg 20)#0
%Q=getelementptr inbounds i8,i8*%P,i64 -4
%R=bitcast i8*%Q to i32*
store i32 1342177296,i32*%R,align 4
%S=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%T=bitcast i8*%P to i8**
store i8*%S,i8**%T,align 8
%U=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%V=getelementptr inbounds i8,i8*%P,i64 8
%W=bitcast i8*%V to i8**
store i8*%U,i8**%W,align 8
%X=getelementptr inbounds i8,i8*%P,i64 16
%Y=bitcast i8*%X to i32*
store i32 3,i32*%Y,align 4
%Z=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%P)
store i8*%Z,i8**%d,align 8
%aa=load i32*,i32**bitcast(i8**@_SMLZN7Control12printCommandE to i32**),align 8
%ab=load i32,i32*%aa,align 4
%ac=icmp eq i32%ab,0
br i1%ac,label%az,label%ad
ad:
%ae=load i8*,i8**@_SMLZN6TextIO6stdErrE,align 8
store i8*%ae,i8**%f,align 8
%af=call i8*@sml_alloc(i32 inreg 20)#0
%ag=getelementptr inbounds i8,i8*%af,i64 -4
%ah=bitcast i8*%ag to i32*
store i32 1342177296,i32*%ah,align 4
%ai=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%aj=bitcast i8*%af to i8**
store i8*%ai,i8**%aj,align 8
%ak=getelementptr inbounds i8,i8*%af,i64 8
%al=bitcast i8*%ak to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@q,i64 0,i32 2,i64 0),i8**%al,align 8
%am=getelementptr inbounds i8,i8*%af,i64 16
%an=bitcast i8*%am to i32*
store i32 3,i32*%an,align 4
%ao=call fastcc i8*@_SMLFN6String1_ZE(i8*inreg%af)
store i8*%ao,i8**%d,align 8
%ap=call i8*@sml_alloc(i32 inreg 20)#0
%aq=getelementptr inbounds i8,i8*%ap,i64 -4
%ar=bitcast i8*%aq to i32*
store i32 1342177296,i32*%ar,align 4
%as=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%at=bitcast i8*%ap to i8**
store i8*%as,i8**%at,align 8
%au=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%av=getelementptr inbounds i8,i8*%ap,i64 8
%aw=bitcast i8*%av to i8**
store i8*%au,i8**%aw,align 8
%ax=getelementptr inbounds i8,i8*%ap,i64 16
%ay=bitcast i8*%ax to i32*
store i32 3,i32*%ay,align 4
call fastcc void@_SMLFN6TextIO6outputE(i8*inreg%ap)
br label%aA
az:
store i8*null,i8**%d,align 8
br label%aA
aA:
%aB=load i8**,i8***%p,align 8
store i8*null,i8**%e,align 8
%aC=load i8*,i8**%aB,align 8
%aD=call fastcc i8*@_SMLFN8Filename5BinIO6openInE(i8*inreg%aC)
store i8*%aD,i8**%d,align 8
%aE=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%aF=invoke fastcc i8*@_SMLFN8Filename5BinIO7openOutE(i8*inreg%aE)
to label%aG unwind label%bj
aG:
store i8*%aF,i8**%c,align 8
br label%aH
aH:
%aI=call i8*@sml_alloc(i32 inreg 20)#0
%aJ=getelementptr inbounds i8,i8*%aI,i64 -4
%aK=bitcast i8*%aJ to i32*
store i32 1342177296,i32*%aK,align 4
%aL=getelementptr inbounds i8,i8*%aI,i64 12
%aM=bitcast i8*%aL to i32*
store i32 0,i32*%aM,align 1
%aN=load i8*,i8**%d,align 8
%aO=bitcast i8*%aI to i8**
store i8*%aN,i8**%aO,align 8
%aP=getelementptr inbounds i8,i8*%aI,i64 8
%aQ=bitcast i8*%aP to i32*
store i32 4092,i32*%aQ,align 4
%aR=getelementptr inbounds i8,i8*%aI,i64 16
%aS=bitcast i8*%aR to i32*
store i32 1,i32*%aS,align 4
%aT=invoke fastcc i8*@_SMLFN5BinIO6inputNE(i8*inreg%aI)
to label%aU unwind label%bb
aU:
store i8*%aT,i8**%e,align 8
%aV=invoke fastcc i32@_SMLFN11Word8Vector6lengthE(i8*inreg%aT)
to label%aW unwind label%bb
aW:
%aX=icmp eq i32%aV,0
br i1%aX,label%aY,label%a0
aY:
store i8*null,i8**%e,align 8
%aZ=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
invoke fastcc void@_SMLFN5BinIO8closeOutE(i8*inreg%aZ)
to label%by unwind label%bj
a0:
%a1=call i8*@sml_alloc(i32 inreg 20)#0
%a2=getelementptr inbounds i8,i8*%a1,i64 -4
%a3=bitcast i8*%a2 to i32*
store i32 1342177296,i32*%a3,align 4
%a4=load i8*,i8**%c,align 8
%a5=bitcast i8*%a1 to i8**
store i8*%a4,i8**%a5,align 8
%a6=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%a7=getelementptr inbounds i8,i8*%a1,i64 8
%a8=bitcast i8*%a7 to i8**
store i8*%a6,i8**%a8,align 8
%a9=getelementptr inbounds i8,i8*%a1,i64 16
%ba=bitcast i8*%a9 to i32*
store i32 3,i32*%ba,align 4
invoke fastcc void@_SMLFN5BinIO6outputE(i8*inreg%a1)
to label%aH unwind label%bb
bb:
%bc=landingpad{i8*,i8*}
catch i8*null
%bd=extractvalue{i8*,i8*}%bc,1
%be=bitcast i8*%bd to i8**
%bf=load i8*,i8**%be,align 8
store i8*%bf,i8**%e,align 8
%bg=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
invoke fastcc void@_SMLFN5BinIO8closeOutE(i8*inreg%bg)
to label%bh unwind label%bj
bh:
%bi=load i8*,i8**%e,align 8
br label%bo
bj:
%bk=landingpad{i8*,i8*}
catch i8*null
%bl=extractvalue{i8*,i8*}%bk,1
%bm=bitcast i8*%bl to i8**
%bn=load i8*,i8**%bm,align 8
store i8*null,i8**%c,align 8
br label%bo
bo:
%bp=phi i8*[%bi,%bh],[%bn,%bj]
store i8*null,i8**%e,align 8
store i8*%bp,i8**%c,align 8
%bq=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
call fastcc void@_SMLFN5BinIO7closeInE(i8*inreg%bq)
%br=call i8*@sml_alloc(i32 inreg 60)#0
%bs=getelementptr inbounds i8,i8*%br,i64 -4
%bt=bitcast i8*%bs to i32*
store i32 1342177336,i32*%bt,align 4
%bu=getelementptr inbounds i8,i8*%br,i64 56
%bv=bitcast i8*%bu to i32*
store i32 1,i32*%bv,align 4
%bw=load i8*,i8**%c,align 8
%bx=bitcast i8*%br to i8**
store i8*%bw,i8**%bx,align 8
call void@sml_raise(i8*inreg%br)#1
unreachable
by:
%bz=load i8*,i8**%d,align 8
tail call fastcc void@_SMLFN5BinIO7closeInE(i8*inreg%bz)
ret void
}
define fastcc i8*@_SMLFN9CoreUtils2cpE(i8*inreg%a)#4 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 1342177288,i32*%f,align 4
store i8*%d,i8**%c,align 8
%g=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%h=bitcast i8*%d to i8**
store i8*%g,i8**%h,align 8
%i=getelementptr inbounds i8,i8*%d,i64 8
%j=bitcast i8*%i to i32*
store i32 1,i32*%j,align 4
%k=call i8*@sml_alloc(i32 inreg 28)#0
%l=getelementptr inbounds i8,i8*%k,i64 -4
%m=bitcast i8*%l to i32*
store i32 1342177304,i32*%m,align 4
%n=load i8*,i8**%c,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=getelementptr inbounds i8,i8*%k,i64 8
%q=bitcast i8*%p to void(...)**
store void(...)*bitcast(void(i8*,i8*)*@_SMLLLN9CoreUtils2cpE_109 to void(...)*),void(...)**%q,align 8
%r=getelementptr inbounds i8,i8*%k,i64 16
%s=bitcast i8*%r to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils2cpE_132 to void(...)*),void(...)**%s,align 8
%t=getelementptr inbounds i8,i8*%k,i64 24
%u=bitcast i8*%t to i32*
store i32 -2147483647,i32*%u,align 4
ret i8*%k
}
define internal fastcc void@_SMLLLN9CoreUtils3catE_112(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
call void@llvm.gcroot(i8**%f,i8*null)#0
store i8*%b,i8**%c,align 8
%g=bitcast i8*%a to i8**
%h=load i8*,i8**%g,align 8
store i8*%h,i8**%d,align 8
br label%i
i:
%j=load atomic i32,i32*@sml_check_flag unordered,align 4
%k=icmp eq i32%j,0
br i1%k,label%m,label%l
l:
call void@sml_check(i32 inreg%j)
br label%m
m:
%n=load i8*,i8**%d,align 8
%o=icmp eq i8*%n,null
br i1%o,label%p,label%q
p:
ret void
q:
%r=bitcast i8*%n to i8**
%s=load i8*,i8**%r,align 8
%t=getelementptr inbounds i8,i8*%n,i64 8
%u=bitcast i8*%t to i8**
%v=load i8*,i8**%u,align 8
store i8*%v,i8**%d,align 8
%w=call fastcc i8*@_SMLFN8Filename6TextIO6openInE(i8*inreg%s)
store i8*%w,i8**%e,align 8
br label%x
x:
%y=load atomic i32,i32*@sml_check_flag unordered,align 4
%z=icmp eq i32%y,0
br i1%z,label%B,label%A
A:
call void@sml_check(i32 inreg%y)
br label%B
B:
%C=call i8*@sml_alloc(i32 inreg 20)#0
%D=getelementptr inbounds i8,i8*%C,i64 -4
%E=bitcast i8*%D to i32*
store i32 1342177296,i32*%E,align 4
%F=getelementptr inbounds i8,i8*%C,i64 12
%G=bitcast i8*%F to i32*
store i32 0,i32*%G,align 1
%H=load i8*,i8**%e,align 8
%I=bitcast i8*%C to i8**
store i8*%H,i8**%I,align 8
%J=getelementptr inbounds i8,i8*%C,i64 8
%K=bitcast i8*%J to i32*
store i32 4092,i32*%K,align 4
%L=getelementptr inbounds i8,i8*%C,i64 16
%M=bitcast i8*%L to i32*
store i32 1,i32*%M,align 4
%N=invoke fastcc i8*@_SMLFN6TextIO6inputNE(i8*inreg%C)
to label%O unwind label%ah
O:
store i8*%N,i8**%f,align 8
%P=getelementptr inbounds i8,i8*%N,i64 -4
%Q=bitcast i8*%P to i32*
%R=load i32,i32*%Q,align 4
%S=and i32%R,268435455
%T=icmp eq i32%S,1
br i1%T,label%U,label%W
U:
store i8*null,i8**%f,align 8
%V=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
call fastcc void@_SMLFN6TextIO7closeInE(i8*inreg%V)
br label%i
W:
%X=call i8*@sml_alloc(i32 inreg 20)#0
%Y=getelementptr inbounds i8,i8*%X,i64 -4
%Z=bitcast i8*%Y to i32*
store i32 1342177296,i32*%Z,align 4
%aa=load i8*,i8**%c,align 8
%ab=bitcast i8*%X to i8**
store i8*%aa,i8**%ab,align 8
%ac=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%ad=getelementptr inbounds i8,i8*%X,i64 8
%ae=bitcast i8*%ad to i8**
store i8*%ac,i8**%ae,align 8
%af=getelementptr inbounds i8,i8*%X,i64 16
%ag=bitcast i8*%af to i32*
store i32 3,i32*%ag,align 4
invoke fastcc void@_SMLFN6TextIO6outputE(i8*inreg%X)
to label%x unwind label%ah
ah:
%ai=landingpad{i8*,i8*}
catch i8*null
%aj=extractvalue{i8*,i8*}%ai,1
%ak=bitcast i8*%aj to i8**
%al=load i8*,i8**%ak,align 8
store i8*null,i8**%d,align 8
store i8*null,i8**%f,align 8
store i8*%al,i8**%c,align 8
%am=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
call fastcc void@_SMLFN6TextIO7closeInE(i8*inreg%am)
%an=call i8*@sml_alloc(i32 inreg 60)#0
%ao=getelementptr inbounds i8,i8*%an,i64 -4
%ap=bitcast i8*%ao to i32*
store i32 1342177336,i32*%ap,align 4
%aq=getelementptr inbounds i8,i8*%an,i64 56
%ar=bitcast i8*%aq to i32*
store i32 1,i32*%ar,align 4
%as=load i8*,i8**%c,align 8
%at=bitcast i8*%an to i8**
store i8*%as,i8**%at,align 8
call void@sml_raise(i8*inreg%an)#1
unreachable
}
define fastcc i8*@_SMLFN9CoreUtils3catE(i8*inreg%a)#4 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 1342177288,i32*%f,align 4
store i8*%d,i8**%c,align 8
%g=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%h=bitcast i8*%d to i8**
store i8*%g,i8**%h,align 8
%i=getelementptr inbounds i8,i8*%d,i64 8
%j=bitcast i8*%i to i32*
store i32 1,i32*%j,align 4
%k=call i8*@sml_alloc(i32 inreg 28)#0
%l=getelementptr inbounds i8,i8*%k,i64 -4
%m=bitcast i8*%l to i32*
store i32 1342177304,i32*%m,align 4
%n=load i8*,i8**%c,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=getelementptr inbounds i8,i8*%k,i64 8
%q=bitcast i8*%p to void(...)**
store void(...)*bitcast(void(i8*,i8*)*@_SMLLLN9CoreUtils3catE_112 to void(...)*),void(...)**%q,align 8
%r=getelementptr inbounds i8,i8*%k,i64 16
%s=bitcast i8*%r to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils3catE_134 to void(...)*),void(...)**%s,align 8
%t=getelementptr inbounds i8,i8*%k,i64 24
%u=bitcast i8*%t to i32*
store i32 -2147483647,i32*%u,align 4
ret i8*%k
}
define internal fastcc i8*@_SMLLLN9CoreUtils5chdirE_115(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
store i8*%a,i8**%e,align 8
store i8*%b,i8**%c,align 8
%f=load atomic i32,i32*@sml_check_flag unordered,align 4
%g=icmp eq i32%f,0
br i1%g,label%i,label%h
h:
call void@sml_check(i32 inreg%f)
br label%i
i:
%j=call fastcc i8*@_SMLFN18SMLSharp__OSFileSys6getDirE(i32 inreg 0)
store i8*%j,i8**%d,align 8
%k=bitcast i8**%e to i8***
%l=load i8**,i8***%k,align 8
store i8*null,i8**%e,align 8
%m=load i8*,i8**%l,align 8
%n=call fastcc i8*@_SMLFN8Filename8toStringE(i8*inreg%m)
call fastcc void@_SMLFN18SMLSharp__OSFileSys5chDirE(i8*inreg%n)
%o=load i8*,i8**%c,align 8
%p=getelementptr inbounds i8,i8*%o,i64 16
%q=bitcast i8*%p to i8*(i8*,i8*)**
%r=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%q,align 8
%s=bitcast i8*%o to i8**
%t=load i8*,i8**%s,align 8
store i8*%t,i8**%c,align 8
%u=call i8*@sml_alloc(i32 inreg 4)#0
%v=bitcast i8*%u to i32*
%w=getelementptr inbounds i8,i8*%u,i64 -4
%x=bitcast i8*%w to i32*
store i32 4,i32*%x,align 4
store i32 0,i32*%v,align 4
%y=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%z=invoke fastcc i8*%r(i8*inreg%y,i8*inreg%u)
to label%A unwind label%E
A:
store i8*%z,i8**%c,align 8
%B=load i8*,i8**%d,align 8
invoke fastcc void@_SMLFN18SMLSharp__OSFileSys5chDirE(i8*inreg%B)
to label%C unwind label%E
C:
%D=load i8*,i8**%c,align 8
ret i8*%D
E:
%F=landingpad{i8*,i8*}
catch i8*null
%G=extractvalue{i8*,i8*}%F,1
%H=bitcast i8*%G to i8**
%I=load i8*,i8**%H,align 8
store i8*%I,i8**%c,align 8
%J=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
call fastcc void@_SMLFN18SMLSharp__OSFileSys5chDirE(i8*inreg%J)
%K=call i8*@sml_alloc(i32 inreg 60)#0
%L=getelementptr inbounds i8,i8*%K,i64 -4
%M=bitcast i8*%L to i32*
store i32 1342177336,i32*%M,align 4
%N=getelementptr inbounds i8,i8*%K,i64 56
%O=bitcast i8*%N to i32*
store i32 1,i32*%O,align 4
%P=load i8*,i8**%c,align 8
%Q=bitcast i8*%K to i8**
store i8*%P,i8**%Q,align 8
call void@sml_raise(i8*inreg%K)#1
unreachable
}
define internal fastcc i8*@_SMLLLN9CoreUtils5chdirE_116(i8*inreg%a)#4 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 1342177288,i32*%f,align 4
store i8*%d,i8**%c,align 8
%g=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%h=bitcast i8*%d to i8**
store i8*%g,i8**%h,align 8
%i=getelementptr inbounds i8,i8*%d,i64 8
%j=bitcast i8*%i to i32*
store i32 1,i32*%j,align 4
%k=call i8*@sml_alloc(i32 inreg 28)#0
%l=getelementptr inbounds i8,i8*%k,i64 -4
%m=bitcast i8*%l to i32*
store i32 1342177304,i32*%m,align 4
%n=load i8*,i8**%c,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=getelementptr inbounds i8,i8*%k,i64 8
%q=bitcast i8*%p to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils5chdirE_115 to void(...)*),void(...)**%q,align 8
%r=getelementptr inbounds i8,i8*%k,i64 16
%s=bitcast i8*%r to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN9CoreUtils5chdirE_115 to void(...)*),void(...)**%s,align 8
%t=getelementptr inbounds i8,i8*%k,i64 24
%u=bitcast i8*%t to i32*
store i32 1,i32*%u,align 4
ret i8*%k
}
define fastcc i8*@_SMLFN9CoreUtils5chdirE(i32 inreg%a,i32 inreg%b)#4 gc"smlsharp"{
ret i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@t,i64 0,i32 2)to i8*)
}
define internal fastcc i8*@_SMLLLN9CoreUtils7newFileE_120(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils7newFileE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils9testExistE_121(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLFN9CoreUtils9testExistE(i8*inreg%b)
%d=tail call i8*@sml_alloc(i32 inreg 4)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 4,i32*%g,align 4
store i32%c,i32*%e,align 4
ret i8*%d
}
define internal fastcc i8*@_SMLLLN9CoreUtils7testDirE_122(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLFN9CoreUtils7testDirE(i8*inreg%b)
%d=tail call i8*@sml_alloc(i32 inreg 4)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 4,i32*%g,align 4
store i32%c,i32*%e,align 4
ret i8*%d
}
define internal fastcc i8*@_SMLLLN9CoreUtils4rm__fE_123(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils4rm__fE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils5mkdirE_124(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils5mkdirE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils7rmdir__fE_125(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils7rmdir__fE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils12makeTextFileE_126(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils12makeTextFileE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils11makeBinFileE_127(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils11makeBinFileE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils13makeTextFile_GE_128(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLLLN9CoreUtils13makeTextFile_GE_99(i8*inreg%a,i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils13makeTextFile_GE_129(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN9CoreUtils13makeTextFile_GE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils12readTextFileE_130(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN9CoreUtils12readTextFileE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils11readBinFileE_131(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN9CoreUtils11readBinFileE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils2cpE_132(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLLLN9CoreUtils2cpE_109(i8*inreg%a,i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils2cpE_133(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN9CoreUtils2cpE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils3catE_134(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLLLN9CoreUtils3catE_112(i8*inreg%a,i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils3catE_135(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN9CoreUtils3catE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils5chdirE_136(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLLLN9CoreUtils5chdirE_116(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN9CoreUtils5chdirE_137(i8*inreg%a,i8*inreg%b,i8*inreg%c)#4 gc"smlsharp"{
ret i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@t,i64 0,i32 2)to i8*)
}
attributes#0={nounwind}
attributes#1={noreturn}
attributes#2={uwtable}
attributes#3={noreturn nounwind}
attributes#4={nounwind uwtable}
