@sml_check_flag=external local_unnamed_addr global i32
@_SMLZN13SMLSharp__OSIO5openfE=external local_unnamed_addr global i8*
@_SMLZN13SMLSharp__OSIO5stdinE=external local_unnamed_addr global i32
@_SMLZN13SMLSharp__OSIO6stderrE=external local_unnamed_addr global i32
@_SMLZN13SMLSharp__OSIO6stdoutE=external local_unnamed_addr global i32
@_SMLZN13SMLSharp__OSIO8SEEK__CURE=external local_unnamed_addr global i32
@_SMLZN13SMLSharp__OSIO8SEEK__SETE=external local_unnamed_addr global i32
@_SMLZN16SMLSharp__Runtime6SysErrE=external local_unnamed_addr global i8*
@_SMLZN2IO12ClosedStreamE=external local_unnamed_addr global i8*
@_SMLZN4Byte13bytesToStringE=external local_unnamed_addr global i8*
@_SMLZ4Fail=external unnamed_addr constant i8*
@a=private unnamed_addr constant<{[4x i8],i32,[6x i8]}><{[4x i8]zeroinitializer,i32 -2147483642,[6x i8]c"again\00"}>,align 8
@b=private unnamed_addr constant<{[4x i8],i32,[46x i8]}><{[4x i8]zeroinitializer,i32 -2147483602,[46x i8]c"src/smlnj/Basis/Posix/posix-io.sml:17.44(483)\00"}>,align 8
@c=private unnamed_addr constant<{[4x i8],i32,[1x i8]}><{[4x i8]zeroinitializer,i32 -2147483647,[1x i8]zeroinitializer}>,align 8
@d=private unnamed_addr constant<{[4x i8],i32,[48x i8]}><{[4x i8]zeroinitializer,i32 -2147483600,[48x i8]c"src/smlnj/Basis/Posix/posix-io.sml:257.29(7531)\00"}>,align 8
@e=private unnamed_addr constant<{[4x i8],i32,[48x i8]}><{[4x i8]zeroinitializer,i32 -2147483600,[48x i8]c"src/smlnj/Basis/Posix/posix-io.sml:260.29(7659)\00"}>,align 8
@f=private unnamed_addr constant<{[4x i8],i32,[48x i8]}><{[4x i8]zeroinitializer,i32 -2147483600,[48x i8]c"src/smlnj/Basis/Posix/posix-io.sml:300.25(8945)\00"}>,align 8
@g=private unnamed_addr constant<{[4x i8],i32,i32,[4x i8],i32}><{[4x i8]zeroinitializer,i32 -805306360,i32 0,[4x i8]zeroinitializer,i32 0}>,align 8
@h=private unnamed_addr constant<{[4x i8],i32,[49x i8]}><{[4x i8]zeroinitializer,i32 -2147483599,[49x i8]c"src/smlnj/Basis/Posix/posix-io.sml:362.45(10768)\00"}>,align 8
@i=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_102 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_147 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(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_104 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_148 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(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_106 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_149 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(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_108 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_150 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*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_110 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_151 to void(...)*),i32 -2147483647}>,align 8
@n=private unnamed_addr constant<{[4x i8],i32,i8*,i8*,i8*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@k,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@l,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@m,i32 0,i32 0,i32 0),i32 8),i32 7}>,align 8
@o=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_113 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_152 to void(...)*),i32 -2147483647}>,align 8
@p=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_115 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_153 to void(...)*),i32 -2147483647}>,align 8
@q=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_117 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_154 to void(...)*),i32 -2147483647}>,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*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_119 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_155 to void(...)*),i32 -2147483647}>,align 8
@s=private unnamed_addr constant<{[4x i8],i32,i8*,i8*,i8*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@p,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@q,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@r,i32 0,i32 0,i32 0),i32 8),i32 7}>,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*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_122 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_156 to void(...)*),i32 -2147483647}>,align 8
@u=private unnamed_addr constant<{[4x i8],i32,i8*,i8*,i8*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@j,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@i,i32 0,i32 0,i32 0),i32 8),i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@t,i32 0,i32 0,i32 0),i32 8),i32 7}>,align 8
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO5stdinE=local_unnamed_addr global i32 0
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO6stdoutE=local_unnamed_addr global i32 0
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO6stderrE=local_unnamed_addr global i32 0
@_SML_gvardb25ec4de893a8c4_posix_io=private global<{[4x i8],i32,[5x i8*]}><{[4x i8]zeroinitializer,i32 -1342177240,[5x i8*]zeroinitializer}>,align 8
@v=private unnamed_addr global[2x i64][i64 1,i64 sub(i64 ptrtoint(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 0)to i64),i64 ptrtoint([2x i64]*@v to i64))]
@_SML_ftabdb25ec4de893a8c4_posix_io=external global i8
@w=private unnamed_addr global i8 0
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO5openfE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 0)
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 1)
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 2)
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 3)
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i32 0,i32 2,i32 4)
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_end()local_unnamed_addr#0
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 void@sml_save_exn(i8*inreg)local_unnamed_addr#0
declare void@sml_start(i8*inreg)local_unnamed_addr#0
declare void@sml_write(i8*inreg,i8**inreg,i8*inreg)local_unnamed_addr#0
declare i32@_SMLFN11Word8Vector6lengthE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO2ST4sizeE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO2ST5isRegE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SMLFN13SMLSharp__OSIO5closeE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO7readArrE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN13SMLSharp__OSIO7readVecE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO8writeArrE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN13SMLSharp__OSIO8writeVecE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN14CharArraySlice4baseE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN15CharVectorSlice4baseE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN15Word8ArraySlice5sliceE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN16SMLSharp__Runtime8syserrorE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN16Word8VectorSlice5sliceE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN4Byte13stringToBytesE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN5Int325toIntE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN5Int327fromIntE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_mainfe9066b69eea2866_IO()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main5148a836b3728be9_Int32()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main84d772f4dc36a05f_CharVectorSlice()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main4beb4c3c7634547e_CharArraySlice()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_maine08a2a3237fbaf1b_Word8Vector()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main78563455976a8f16_Word8VectorSlice()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_maind090c7e00210ea66_Word8ArraySlice()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main07023b79a356e238_Byte()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main00d884c96265bfea_SMLSharp_Runtime()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main741b333153f7e9d0_SMLSharp_OSIO()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_loadfe9066b69eea2866_IO(i8*)local_unnamed_addr
declare void@_SML_load5148a836b3728be9_Int32(i8*)local_unnamed_addr
declare void@_SML_load84d772f4dc36a05f_CharVectorSlice(i8*)local_unnamed_addr
declare void@_SML_load4beb4c3c7634547e_CharArraySlice(i8*)local_unnamed_addr
declare void@_SML_loade08a2a3237fbaf1b_Word8Vector(i8*)local_unnamed_addr
declare void@_SML_load78563455976a8f16_Word8VectorSlice(i8*)local_unnamed_addr
declare void@_SML_loadd090c7e00210ea66_Word8ArraySlice(i8*)local_unnamed_addr
declare void@_SML_load07023b79a356e238_Byte(i8*)local_unnamed_addr
declare void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*)local_unnamed_addr
declare void@_SML_load741b333153f7e9d0_SMLSharp_OSIO(i8*)local_unnamed_addr
define private void@_SML_tabbdb25ec4de893a8c4_posix_io()#3{
unreachable
}
define void@_SML_loaddb25ec4de893a8c4_posix_io(i8*%a)local_unnamed_addr#0{
%b=load i8,i8*@w,align 1
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 1,i8*@w,align 1
tail call void@_SML_loadfe9066b69eea2866_IO(i8*%a)#0
tail call void@_SML_load5148a836b3728be9_Int32(i8*%a)#0
tail call void@_SML_load84d772f4dc36a05f_CharVectorSlice(i8*%a)#0
tail call void@_SML_load4beb4c3c7634547e_CharArraySlice(i8*%a)#0
tail call void@_SML_loade08a2a3237fbaf1b_Word8Vector(i8*%a)#0
tail call void@_SML_load78563455976a8f16_Word8VectorSlice(i8*%a)#0
tail call void@_SML_loadd090c7e00210ea66_Word8ArraySlice(i8*%a)#0
tail call void@_SML_load07023b79a356e238_Byte(i8*%a)#0
tail call void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*%a)#0
tail call void@_SML_load741b333153f7e9d0_SMLSharp_OSIO(i8*%a)#0
tail call void@sml_gcroot(i8*%a,void()*@_SML_tabbdb25ec4de893a8c4_posix_io,i8*@_SML_ftabdb25ec4de893a8c4_posix_io,i8*bitcast([2x i64]*@v to i8*))#0
ret void
}
define void@_SML_maindb25ec4de893a8c4_posix_io()local_unnamed_addr#2 gc"smlsharp"personality i32(...)*@sml_personality{
%a=alloca[3x i8*],align 8
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=load i8,i8*@w,align 1
%g=and i8%f,2
%h=icmp eq i8%g,0
br i1%h,label%j,label%i
i:
ret void
j:
store i8 3,i8*@w,align 1
tail call void@_SML_mainfe9066b69eea2866_IO()#2
tail call void@_SML_main5148a836b3728be9_Int32()#2
tail call void@_SML_main84d772f4dc36a05f_CharVectorSlice()#2
tail call void@_SML_main4beb4c3c7634547e_CharArraySlice()#2
tail call void@_SML_maine08a2a3237fbaf1b_Word8Vector()#2
tail call void@_SML_main78563455976a8f16_Word8VectorSlice()#2
tail call void@_SML_maind090c7e00210ea66_Word8ArraySlice()#2
tail call void@_SML_main07023b79a356e238_Byte()#2
tail call void@_SML_main00d884c96265bfea_SMLSharp_Runtime()#2
tail call void@_SML_main741b333153f7e9d0_SMLSharp_OSIO()#2
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
%k=bitcast[3x i8*]*%a to i8*
call void@sml_start(i8*inreg%k)#0
%l=load atomic i32,i32*@sml_check_flag unordered,align 4
%m=icmp eq i32%l,0
br i1%m,label%o,label%n
n:
invoke void@sml_check(i32 inreg%l)
to label%o unwind label%aG
o:
%p=invoke fastcc i8*@_SMLFN16SMLSharp__Runtime8syserrorE(i8*inreg getelementptr inbounds(<{[4x i8],i32,[6x i8]}>,<{[4x i8],i32,[6x i8]}>*@a,i64 0,i32 2,i64 0))
to label%q unwind label%aG
q:
%r=icmp eq i8*%p,null
br i1%r,label%s,label%N
s:
%t=load i8*,i8**@_SMLZ4Fail,align 8
store i8*%t,i8**%b,align 8
%u=call i8*@sml_alloc(i32 inreg 28)#0
%v=getelementptr inbounds i8,i8*%u,i64 -4
%w=bitcast i8*%v to i32*
store i32 1342177304,i32*%w,align 4
store i8*%u,i8**%c,align 8
%x=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%y=bitcast i8*%u to i8**
store i8*%x,i8**%y,align 8
%z=getelementptr inbounds i8,i8*%u,i64 8
%A=bitcast i8*%z to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[46x i8]}>,<{[4x i8],i32,[46x i8]}>*@b,i64 0,i32 2,i64 0),i8**%A,align 8
%B=getelementptr inbounds i8,i8*%u,i64 16
%C=bitcast i8*%B to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[1x i8]}>,<{[4x i8],i32,[1x i8]}>*@c,i64 0,i32 2,i64 0),i8**%C,align 8
%D=getelementptr inbounds i8,i8*%u,i64 24
%E=bitcast i8*%D to i32*
store i32 7,i32*%E,align 4
%F=call i8*@sml_alloc(i32 inreg 60)#0
%G=getelementptr inbounds i8,i8*%F,i64 -4
%H=bitcast i8*%G to i32*
store i32 1342177336,i32*%H,align 4
%I=getelementptr inbounds i8,i8*%F,i64 56
%J=bitcast i8*%I to i32*
store i32 1,i32*%J,align 4
%K=load i8*,i8**%c,align 8
%L=bitcast i8*%F to i8**
store i8*%K,i8**%L,align 8
invoke void@sml_raise(i8*inreg%F)#1
to label%M unwind label%aG
M:
unreachable
N:
%O=bitcast i8*%p to i32*
%P=load i32,i32*%O,align 4
%Q=call i8*@sml_alloc(i32 inreg 12)#0
%R=bitcast i8*%Q to i32*
%S=getelementptr inbounds i8,i8*%Q,i64 -4
%T=bitcast i8*%S to i32*
store i32 1342177288,i32*%T,align 4
store i8*%Q,i8**%e,align 8
store i32%P,i32*%R,align 4
%U=getelementptr inbounds i8,i8*%Q,i64 8
%V=bitcast i8*%U to i32*
store i32 0,i32*%V,align 4
%W=call i8*@sml_alloc(i32 inreg 28)#0
%X=getelementptr inbounds i8,i8*%W,i64 -4
%Y=bitcast i8*%X to i32*
store i32 1342177304,i32*%Y,align 4
%Z=load i8*,i8**%e,align 8
%aa=bitcast i8*%W to i8**
store i8*%Z,i8**%aa,align 8
%ab=getelementptr inbounds i8,i8*%W,i64 8
%ac=bitcast i8*%ab to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101 to void(...)*),void(...)**%ac,align 8
%ad=getelementptr inbounds i8,i8*%W,i64 16
%ae=bitcast i8*%ad to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101 to void(...)*),void(...)**%ae,align 8
%af=getelementptr inbounds i8,i8*%W,i64 24
%ag=bitcast i8*%af to i32*
store i32 -2147483647,i32*%ag,align 4
%ah=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_89(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,i8*,i8*,i32}>,<{[4x i8],i32,i8*,i8*,i8*,i32}>*@n,i64 0,i32 2)to i8*))
store i8*%ah,i8**%b,align 8
%ai=load i8*,i8**@_SMLZN4Byte13bytesToStringE,align 8
store i8*%ai,i8**%c,align 8
%aj=call i8*@sml_alloc(i32 inreg 28)#0
%ak=getelementptr inbounds i8,i8*%aj,i64 -4
%al=bitcast i8*%ak to i32*
store i32 1342177304,i32*%al,align 4
%am=bitcast i8*%aj to i8**
store 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*),i8**%am,align 8
%an=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%ao=getelementptr inbounds i8,i8*%aj,i64 8
%ap=bitcast i8*%ao to i8**
store i8*%an,i8**%ap,align 8
%aq=getelementptr inbounds i8,i8*%aj,i64 16
%ar=bitcast i8*%aq to i8**
store i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@o,i64 0,i32 2)to i8*),i8**%ar,align 8
%as=getelementptr inbounds i8,i8*%aj,i64 24
%at=bitcast i8*%as to i32*
store i32 7,i32*%at,align 4
%au=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_89(i8*inreg%aj)
store i8*%au,i8**%c,align 8
%av=load i8*,i8**%e,align 8
%aw=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101(i8*inreg%av,i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,i8*,i8*,i32}>,<{[4x i8],i32,i8*,i8*,i8*,i32}>*@s,i64 0,i32 2)to i8*))
store i8*%aw,i8**%d,align 8
%ax=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%ay=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101(i8*inreg%ax,i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,i8*,i8*,i32}>,<{[4x i8],i32,i8*,i8*,i8*,i32}>*@u,i64 0,i32 2)to i8*))
%az=load i8*,i8**@_SMLZN13SMLSharp__OSIO5openfE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0),i8*inreg%az)#0
%aA=load i32,i32*@_SMLZN13SMLSharp__OSIO5stdinE,align 4
store i32%aA,i32*@_SMLZN23SMLSharp__SMLNJ__POSIX__IO5stdinE,align 4
%aB=load i32,i32*@_SMLZN13SMLSharp__OSIO6stdoutE,align 4
store i32%aB,i32*@_SMLZN23SMLSharp__SMLNJ__POSIX__IO6stdoutE,align 4
%aC=load i32,i32*@_SMLZN13SMLSharp__OSIO6stderrE,align 4
store i32%aC,i32*@_SMLZN23SMLSharp__SMLNJ__POSIX__IO6stderrE,align 4
%aD=load i8*,i8**%c,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 1),i8*inreg%aD)#0
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 2),i8*inreg%ay)#0
%aE=load i8*,i8**%b,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 3),i8*inreg%aE)#0
%aF=load i8*,i8**%d,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 4),i8*inreg%aF)#0
call void@sml_end()#0
ret void
aG:
%aH=landingpad{i8*,i8*}
cleanup
%aI=extractvalue{i8*,i8*}%aH,1
call void@sml_save_exn(i8*inreg%aI)#0
call void@sml_end()#0
resume{i8*,i8*}%aH
}
define internal fastcc void@_SMLL6setPos_71(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
k:
%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**%c,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**%c,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=getelementptr inbounds i8,i8*%j,i64 8
%m=bitcast i8*%l to i32***
%n=load i32**,i32***%m,align 8
%o=load i32*,i32**%n,align 8
%p=load i32,i32*%o,align 4
%q=icmp eq i32%p,0
br i1%q,label%J,label%r
r:
%s=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%s,i8**%c,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
store i8*%t,i8**%d,align 8
%w=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%x=bitcast i8*%t to i8**
store i8*%w,i8**%x,align 8
%y=getelementptr inbounds i8,i8*%t,i64 8
%z=bitcast i8*%y to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[48x i8]}>,<{[4x i8],i32,[48x i8]}>*@d,i64 0,i32 2,i64 0),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 i8*@sml_alloc(i32 inreg 60)#0
%D=getelementptr inbounds i8,i8*%C,i64 -4
%E=bitcast i8*%D to i32*
store i32 1342177336,i32*%E,align 4
%F=getelementptr inbounds i8,i8*%C,i64 56
%G=bitcast i8*%F to i32*
store i32 1,i32*%G,align 4
%H=load i8*,i8**%d,align 8
%I=bitcast i8*%C to i8**
store i8*%H,i8**%I,align 8
call void@sml_raise(i8*inreg%C)#1
unreachable
J:
%K=getelementptr inbounds i8,i8*%j,i64 16
%L=bitcast i8*%K to i32*
%M=load i32,i32*%L,align 4
%N=load i32,i32*@_SMLZN13SMLSharp__OSIO8SEEK__SETE,align 4
%O=call i8*@sml_alloc(i32 inreg 20)#0
%P=bitcast i8*%O to i32*
%Q=getelementptr inbounds i8,i8*%O,i64 -4
%R=bitcast i8*%Q to i32*
store i32 1342177296,i32*%R,align 4
%S=getelementptr inbounds i8,i8*%O,i64 12
%T=bitcast i8*%S to i32*
store i32 0,i32*%T,align 1
store i32%M,i32*%P,align 4
%U=getelementptr inbounds i8,i8*%O,i64 4
%V=bitcast i8*%U to i32*
store i32%b,i32*%V,align 4
%W=getelementptr inbounds i8,i8*%O,i64 8
%X=bitcast i8*%W to i32*
store i32%N,i32*%X,align 4
%Y=getelementptr inbounds i8,i8*%O,i64 16
%Z=bitcast i8*%Y to i32*
store i32 0,i32*%Z,align 4
%aa=call fastcc i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg%O)
%ab=bitcast i8**%c to i32***
%ac=load i32**,i32***%ab,align 8
%ad=load i32*,i32**%ac,align 8
store i32%aa,i32*%ad,align 4
ret void
}
define internal fastcc i32@_SMLL6endPos_73(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
k:
%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**%c,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**%c,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=bitcast i8*%j to i32***
%m=load i32**,i32***%l,align 8
%n=load i32*,i32**%m,align 8
%o=load i32,i32*%n,align 4
%p=icmp eq i32%o,0
br i1%p,label%I,label%q
q:
%r=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%r,i8**%c,align 8
%s=call i8*@sml_alloc(i32 inreg 20)#0
%t=getelementptr inbounds i8,i8*%s,i64 -4
%u=bitcast i8*%t to i32*
store i32 1342177296,i32*%u,align 4
store i8*%s,i8**%d,align 8
%v=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%w=bitcast i8*%s to i8**
store i8*%v,i8**%w,align 8
%x=getelementptr inbounds i8,i8*%s,i64 8
%y=bitcast i8*%x to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[48x i8]}>,<{[4x i8],i32,[48x i8]}>*@e,i64 0,i32 2,i64 0),i8**%y,align 8
%z=getelementptr inbounds i8,i8*%s,i64 16
%A=bitcast i8*%z to i32*
store i32 3,i32*%A,align 4
%B=call i8*@sml_alloc(i32 inreg 60)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177336,i32*%D,align 4
%E=getelementptr inbounds i8,i8*%B,i64 56
%F=bitcast i8*%E to i32*
store i32 1,i32*%F,align 4
%G=load i8*,i8**%d,align 8
%H=bitcast i8*%B to i8**
store i8*%G,i8**%H,align 8
call void@sml_raise(i8*inreg%B)#1
unreachable
I:
store i8*null,i8**%c,align 8
%J=getelementptr inbounds i8,i8*%j,i64 8
%K=bitcast i8*%J to i32*
%L=load i32,i32*%K,align 4
%M=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%L)
%N=tail call fastcc i32@_SMLFN13SMLSharp__OSIO2ST4sizeE(i8*inreg%M)
ret i32%N
}
define internal fastcc i32@_SMLL9verifyPos_74(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%g,label%f
f:
call void@sml_check(i32 inreg%d)
br label%g
g:
%h=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%i=load i8*,i8**%c,align 8
%j=getelementptr inbounds i8,i8*%i,i64 8
%k=bitcast i8*%j to i32*
%l=load i32,i32*%k,align 4
%m=load i32,i32*@_SMLZN13SMLSharp__OSIO8SEEK__CURE,align 4
%n=call i8*@sml_alloc(i32 inreg 20)#0
%o=bitcast i8*%n to i32*
%p=getelementptr inbounds i8,i8*%n,i64 -4
%q=bitcast i8*%p to i32*
store i32 1342177296,i32*%q,align 4
%r=getelementptr inbounds i8,i8*%n,i64 12
%s=bitcast i8*%r to i32*
store i32 0,i32*%s,align 1
store i32%l,i32*%o,align 4
%t=getelementptr inbounds i8,i8*%n,i64 4
%u=bitcast i8*%t to i32*
store i32%h,i32*%u,align 4
%v=getelementptr inbounds i8,i8*%n,i64 8
%w=bitcast i8*%v to i32*
store i32%m,i32*%w,align 4
%x=getelementptr inbounds i8,i8*%n,i64 16
%y=bitcast i8*%x to i32*
store i32 0,i32*%y,align 4
%z=call fastcc i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg%n)
%A=bitcast i8**%c to i32***
%B=load i32**,i32***%A,align 8
%C=load i32*,i32**%B,align 8
store i32%z,i32*%C,align 4
ret i32%z
}
define internal fastcc i32@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_75(i8*inreg%a,i32 inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%a to i32**
%d=load i32*,i32**%c,align 8
%e=load i32,i32*%d,align 4
ret i32%e
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_76(i8*inreg%a)unnamed_addr#2 gc"smlsharp"{
n:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
%g=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
call void@llvm.gcroot(i8**%f,i8*null)#0
call void@llvm.gcroot(i8**%g,i8*null)#0
store i8*%a,i8**%b,align 8
%h=load atomic i32,i32*@sml_check_flag unordered,align 4
%i=icmp eq i32%h,0
br i1%i,label%l,label%j
j:
call void@sml_check(i32 inreg%h)
%k=load i8*,i8**%b,align 8
br label%l
l:
%m=phi i8*[%k,%j],[%a,%n]
%o=getelementptr inbounds i8,i8*%m,i64 8
%p=bitcast i8*%o to i32*
%q=load i32,i32*%p,align 4
%r=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%q)
%s=call fastcc i32@_SMLFN13SMLSharp__OSIO2ST5isRegE(i8*inreg%r)
%t=icmp eq i32%s,0
br i1%t,label%bQ,label%u
u:
%v=call i8*@sml_alloc(i32 inreg 4)#0
%w=getelementptr inbounds i8,i8*%v,i64 -4
%x=bitcast i8*%w to i32*
store i32 536870916,i32*%x,align 4
store i8*%v,i8**%c,align 8
%y=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%z=bitcast i8**%c to i32**
%A=load i32*,i32**%z,align 8
store i32%y,i32*%A,align 4
%B=call i8*@sml_alloc(i32 inreg 28)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177304,i32*%D,align 4
store i8*%B,i8**%d,align 8
%E=load i8*,i8**%c,align 8
%F=bitcast i8*%B to i8**
store i8*%E,i8**%F,align 8
%G=load i8*,i8**%b,align 8
%H=getelementptr inbounds i8,i8*%B,i64 8
%I=bitcast i8*%H to i8**
store i8*%G,i8**%I,align 8
%J=getelementptr inbounds i8,i8*%B,i64 16
%K=bitcast i8*%J to i32*
store i32%q,i32*%K,align 4
%L=getelementptr inbounds i8,i8*%B,i64 24
%M=bitcast i8*%L to i32*
store i32 3,i32*%M,align 4
%N=call i8*@sml_alloc(i32 inreg 28)#0
%O=getelementptr inbounds i8,i8*%N,i64 -4
%P=bitcast i8*%O to i32*
store i32 1342177304,i32*%P,align 4
store i8*%N,i8**%e,align 8
%Q=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%R=bitcast i8*%N to i8**
store i8*%Q,i8**%R,align 8
%S=getelementptr inbounds i8,i8*%N,i64 8
%T=bitcast i8*%S to void(...)**
store void(...)*bitcast(void(i8*,i32)*@_SMLL6setPos_71 to void(...)*),void(...)**%T,align 8
%U=getelementptr inbounds i8,i8*%N,i64 16
%V=bitcast i8*%U to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6setPos_130 to void(...)*),void(...)**%V,align 8
%W=getelementptr inbounds i8,i8*%N,i64 24
%X=bitcast i8*%W to i32*
store i32 -2147483647,i32*%X,align 4
%Y=call i8*@sml_alloc(i32 inreg 20)#0
%Z=getelementptr inbounds i8,i8*%Y,i64 -4
%aa=bitcast i8*%Z to i32*
store i32 1342177296,i32*%aa,align 4
store i8*%Y,i8**%d,align 8
%ab=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%ac=bitcast i8*%Y to i8**
store i8*%ab,i8**%ac,align 8
%ad=getelementptr inbounds i8,i8*%Y,i64 8
%ae=bitcast i8*%ad to i32*
store i32%q,i32*%ae,align 4
%af=getelementptr inbounds i8,i8*%Y,i64 16
%ag=bitcast i8*%af to i32*
store i32 1,i32*%ag,align 4
%ah=call i8*@sml_alloc(i32 inreg 28)#0
%ai=getelementptr inbounds i8,i8*%ah,i64 -4
%aj=bitcast i8*%ai to i32*
store i32 1342177304,i32*%aj,align 4
store i8*%ah,i8**%b,align 8
%ak=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%al=bitcast i8*%ah to i8**
store i8*%ak,i8**%al,align 8
%am=getelementptr inbounds i8,i8*%ah,i64 8
%an=bitcast i8*%am to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLL6endPos_73 to void(...)*),void(...)**%an,align 8
%ao=getelementptr inbounds i8,i8*%ah,i64 16
%ap=bitcast i8*%ao to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6endPos_131 to void(...)*),void(...)**%ap,align 8
%aq=getelementptr inbounds i8,i8*%ah,i64 24
%ar=bitcast i8*%aq to i32*
store i32 -2147483647,i32*%ar,align 4
%as=call i8*@sml_alloc(i32 inreg 20)#0
%at=getelementptr inbounds i8,i8*%as,i64 -4
%au=bitcast i8*%at to i32*
store i32 1342177296,i32*%au,align 4
store i8*%as,i8**%d,align 8
%av=load i8*,i8**%c,align 8
%aw=bitcast i8*%as to i8**
store i8*%av,i8**%aw,align 8
%ax=getelementptr inbounds i8,i8*%as,i64 8
%ay=bitcast i8*%ax to i32*
store i32%q,i32*%ay,align 4
%az=getelementptr inbounds i8,i8*%as,i64 16
%aA=bitcast i8*%az to i32*
store i32 1,i32*%aA,align 4
%aB=call i8*@sml_alloc(i32 inreg 28)#0
%aC=getelementptr inbounds i8,i8*%aB,i64 -4
%aD=bitcast i8*%aC to i32*
store i32 1342177304,i32*%aD,align 4
store i8*%aB,i8**%f,align 8
%aE=load i8*,i8**%d,align 8
%aF=bitcast i8*%aB to i8**
store i8*%aE,i8**%aF,align 8
%aG=getelementptr inbounds i8,i8*%aB,i64 8
%aH=bitcast i8*%aG to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLL9verifyPos_74 to void(...)*),void(...)**%aH,align 8
%aI=getelementptr inbounds i8,i8*%aB,i64 16
%aJ=bitcast i8*%aI to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9verifyPos_132 to void(...)*),void(...)**%aJ,align 8
%aK=getelementptr inbounds i8,i8*%aB,i64 24
%aL=bitcast i8*%aK to i32*
store i32 -2147483647,i32*%aL,align 4
store i8*null,i8**%d,align 8
%aM=call fastcc i32@_SMLL9verifyPos_74(i8*inreg%aE,i32 inreg 0)
%aN=call i8*@sml_alloc(i32 inreg 12)#0
%aO=getelementptr inbounds i8,i8*%aN,i64 -4
%aP=bitcast i8*%aO to i32*
store i32 1342177288,i32*%aP,align 4
store i8*%aN,i8**%d,align 8
%aQ=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%aR=bitcast i8*%aN to i8**
store i8*%aQ,i8**%aR,align 8
%aS=getelementptr inbounds i8,i8*%aN,i64 8
%aT=bitcast i8*%aS to i32*
store i32 1,i32*%aT,align 4
%aU=call i8*@sml_alloc(i32 inreg 12)#0
%aV=getelementptr inbounds i8,i8*%aU,i64 -4
%aW=bitcast i8*%aV to i32*
store i32 1342177288,i32*%aW,align 4
store i8*%aU,i8**%b,align 8
%aX=load i8*,i8**%c,align 8
%aY=bitcast i8*%aU to i8**
store i8*%aX,i8**%aY,align 8
%aZ=getelementptr inbounds i8,i8*%aU,i64 8
%a0=bitcast i8*%aZ to i32*
store i32 1,i32*%a0,align 4
%a1=call i8*@sml_alloc(i32 inreg 28)#0
%a2=getelementptr inbounds i8,i8*%a1,i64 -4
%a3=bitcast i8*%a2 to i32*
store i32 1342177304,i32*%a3,align 4
store i8*%a1,i8**%g,align 8
%a4=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%a5=bitcast i8*%a1 to i8**
store i8*%a4,i8**%a5,align 8
%a6=getelementptr inbounds i8,i8*%a1,i64 8
%a7=bitcast i8*%a6 to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_75 to void(...)*),void(...)**%a7,align 8
%a8=getelementptr inbounds i8,i8*%a1,i64 16
%a9=bitcast i8*%a8 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_133 to void(...)*),void(...)**%a9,align 8
%ba=getelementptr inbounds i8,i8*%a1,i64 24
%bb=bitcast i8*%ba to i32*
store i32 -2147483647,i32*%bb,align 4
%bc=call i8*@sml_alloc(i32 inreg 12)#0
%bd=getelementptr inbounds i8,i8*%bc,i64 -4
%be=bitcast i8*%bd to i32*
store i32 1342177288,i32*%be,align 4
store i8*%bc,i8**%b,align 8
%bf=load i8*,i8**%g,align 8
store i8*null,i8**%g,align 8
%bg=bitcast i8*%bc to i8**
store i8*%bf,i8**%bg,align 8
%bh=getelementptr inbounds i8,i8*%bc,i64 8
%bi=bitcast i8*%bh to i32*
store i32 1,i32*%bi,align 4
%bj=call i8*@sml_alloc(i32 inreg 12)#0
%bk=getelementptr inbounds i8,i8*%bj,i64 -4
%bl=bitcast i8*%bk to i32*
store i32 1342177288,i32*%bl,align 4
store i8*%bj,i8**%g,align 8
%bm=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%bn=bitcast i8*%bj to i8**
store i8*%bm,i8**%bn,align 8
%bo=getelementptr inbounds i8,i8*%bj,i64 8
%bp=bitcast i8*%bo to i32*
store i32 1,i32*%bp,align 4
%bq=call i8*@sml_alloc(i32 inreg 12)#0
%br=getelementptr inbounds i8,i8*%bq,i64 -4
%bs=bitcast i8*%br to i32*
store i32 1342177288,i32*%bs,align 4
store i8*%bq,i8**%e,align 8
%bt=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%bu=bitcast i8*%bq to i8**
store i8*%bt,i8**%bu,align 8
%bv=getelementptr inbounds i8,i8*%bq,i64 8
%bw=bitcast i8*%bv to i32*
store i32 1,i32*%bw,align 4
%bx=call i8*@sml_alloc(i32 inreg 44)#0
%by=getelementptr inbounds i8,i8*%bx,i64 -4
%bz=bitcast i8*%by to i32*
store i32 1342177320,i32*%bz,align 4
%bA=load i8*,i8**%d,align 8
%bB=bitcast i8*%bx to i8**
store i8*%bA,i8**%bB,align 8
%bC=load i8*,i8**%b,align 8
%bD=getelementptr inbounds i8,i8*%bx,i64 8
%bE=bitcast i8*%bD to i8**
store i8*%bC,i8**%bE,align 8
%bF=load i8*,i8**%c,align 8
%bG=getelementptr inbounds i8,i8*%bx,i64 16
%bH=bitcast i8*%bG to i8**
store i8*%bF,i8**%bH,align 8
%bI=load i8*,i8**%g,align 8
%bJ=getelementptr inbounds i8,i8*%bx,i64 24
%bK=bitcast i8*%bJ to i8**
store i8*%bI,i8**%bK,align 8
%bL=load i8*,i8**%e,align 8
%bM=getelementptr inbounds i8,i8*%bx,i64 32
%bN=bitcast i8*%bM to i8**
store i8*%bL,i8**%bN,align 8
%bO=getelementptr inbounds i8,i8*%bx,i64 40
%bP=bitcast i8*%bO to i32*
store i32 31,i32*%bP,align 4
ret i8*%bx
bQ:
store i8*null,i8**%b,align 8
%bR=call i8*@sml_alloc(i32 inreg 4)#0
%bS=getelementptr inbounds i8,i8*%bR,i64 -4
%bT=bitcast i8*%bS to i32*
store i32 536870916,i32*%bT,align 4
store i8*%bR,i8**%b,align 8
%bU=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%bV=bitcast i8**%b to i32**
%bW=load i32*,i32**%bV,align 8
store i32%bU,i32*%bW,align 4
%bX=call i8*@sml_alloc(i32 inreg 44)#0
%bY=getelementptr inbounds i8,i8*%bX,i64 -4
%bZ=bitcast i8*%bY to i32*
store i32 1342177320,i32*%bZ,align 4
call void@llvm.memset.p0i8.i64(i8*%bX,i8 0,i64 16,i1 false)
%b0=load i8*,i8**%b,align 8
%b1=getelementptr inbounds i8,i8*%bX,i64 16
%b2=bitcast i8*%b1 to i8**
store i8*%b0,i8**%b2,align 8
%b3=getelementptr inbounds i8,i8*%bX,i64 24
%b4=getelementptr inbounds i8,i8*%bX,i64 40
%b5=bitcast i8*%b4 to i32*
call void@llvm.memset.p0i8.i64(i8*%b3,i8 0,i64 16,i1 false)
store i32 31,i32*%b5,align 4
store i8*null,i8**%b,align 8
store i8*null,i8**%c,align 8
store i8*%b0,i8**%d,align 8
store i8*null,i8**%e,align 8
store i8*null,i8**%f,align 8
%b6=call i8*@sml_alloc(i32 inreg 44)#0
%b7=getelementptr inbounds i8,i8*%b6,i64 -4
%b8=bitcast i8*%b7 to i32*
store i32 1342177320,i32*%b8,align 4
%b9=load i8*,i8**%b,align 8
%ca=bitcast i8*%b6 to i8**
store i8*%b9,i8**%ca,align 8
%cb=load i8*,i8**%c,align 8
%cc=getelementptr inbounds i8,i8*%b6,i64 8
%cd=bitcast i8*%cc to i8**
store i8*%cb,i8**%cd,align 8
%ce=load i8*,i8**%d,align 8
%cf=getelementptr inbounds i8,i8*%b6,i64 16
%cg=bitcast i8*%cf to i8**
store i8*%ce,i8**%cg,align 8
%ch=load i8*,i8**%e,align 8
%ci=getelementptr inbounds i8,i8*%b6,i64 24
%cj=bitcast i8*%ci to i8**
store i8*%ch,i8**%cj,align 8
%ck=load i8*,i8**%f,align 8
%cl=getelementptr inbounds i8,i8*%b6,i64 32
%cm=bitcast i8*%cl to i8**
store i8*%ck,i8**%cm,align 8
%cn=getelementptr inbounds i8,i8*%b6,i64 40
%co=bitcast i8*%cn to i32*
store i32 31,i32*%co,align 4
ret i8*%b6
}
define internal fastcc void@_SMLL6incPos_78(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%f,label%i
f:
%g=bitcast i8*%a to i32**
%h=bitcast i8**%c to i32***
br label%l
i:
call void@sml_check(i32 inreg%d)
%j=bitcast i8**%c to i32***
%k=load i32**,i32***%j,align 8
br label%l
l:
%m=phi i32***[%h,%f],[%j,%i]
%n=phi i32**[%g,%f],[%k,%i]
%o=load i32*,i32**%n,align 8
%p=load i32,i32*%o,align 4
%q=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%b)
%r=add nsw i32%q,%p
%s=load i32**,i32***%m,align 8
%t=load i32*,i32**%s,align 8
store i32%r,i32*%t,align 4
ret void
}
define internal fastcc i32@_SMLL9r__readArr_79(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%m
i:
call void@sml_check(i32 inreg%e)
%j=bitcast i8**%d to i8****
%k=load i8***,i8****%j,align 8
%l=load i8*,i8**%c,align 8
br label%m
m:
%n=phi i8*[%l,%i],[%b,%g]
%o=phi i8***[%k,%i],[%h,%g]
%p=load i8**,i8***%o,align 8
%q=load i8*,i8**%p,align 8
%r=getelementptr inbounds i8,i8*%q,i64 16
%s=bitcast i8*%r to i8*(i8*,i8*)**
%t=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%s,align 8
%u=bitcast i8*%q to i8**
%v=load i8*,i8**%u,align 8
store i8*null,i8**%c,align 8
%w=call fastcc i8*%t(i8*inreg%v,i8*inreg%n)
store i8*%w,i8**%c,align 8
%x=load i8*,i8**%d,align 8
%y=getelementptr inbounds i8,i8*%x,i64 16
%z=bitcast i8*%y to i32*
%A=load i32,i32*%z,align 4
%B=call i8*@sml_alloc(i32 inreg 20)#0
%C=bitcast i8*%B to i32*
%D=getelementptr inbounds i8,i8*%B,i64 -4
%E=bitcast i8*%D to i32*
store i32 1342177296,i32*%E,align 4
%F=getelementptr inbounds i8,i8*%B,i64 4
%G=bitcast i8*%F to i32*
store i32 0,i32*%G,align 1
store i32%A,i32*%C,align 4
%H=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%I=getelementptr inbounds i8,i8*%B,i64 8
%J=bitcast i8*%I to i8**
store i8*%H,i8**%J,align 8
%K=getelementptr inbounds i8,i8*%B,i64 16
%L=bitcast i8*%K to i32*
store i32 2,i32*%L,align 4
%M=call fastcc i32@_SMLFN13SMLSharp__OSIO7readArrE(i8*inreg%B)
%N=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%O=getelementptr inbounds i8,i8*%N,i64 8
%P=bitcast i8*%O to i8**
%Q=load i8*,i8**%P,align 8
call fastcc void@_SMLL6incPos_78(i8*inreg%Q,i32 inreg%M)
ret i32%M
}
define internal fastcc i8*@_SMLL9blockWrap_81(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
k:
%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**%c,align 8
store i8*%b,i8**%d,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**%c,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=bitcast i8*%j to i32**
%m=load i32*,i32**%l,align 8
%n=load i32,i32*%m,align 4
%o=icmp eq i32%n,0
br i1%o,label%H,label%p
p:
store i8*null,i8**%d,align 8
%q=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%q,i8**%c,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
store i8*%r,i8**%d,align 8
%u=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%v=bitcast i8*%r to i8**
store i8*%u,i8**%v,align 8
%w=getelementptr inbounds i8,i8*%r,i64 8
%x=bitcast i8*%w to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[48x i8]}>,<{[4x i8],i32,[48x i8]}>*@f,i64 0,i32 2,i64 0),i8**%x,align 8
%y=getelementptr inbounds i8,i8*%r,i64 16
%z=bitcast i8*%y to i32*
store i32 3,i32*%z,align 4
%A=call i8*@sml_alloc(i32 inreg 60)#0
%B=getelementptr inbounds i8,i8*%A,i64 -4
%C=bitcast i8*%B to i32*
store i32 1342177336,i32*%C,align 4
%D=getelementptr inbounds i8,i8*%A,i64 56
%E=bitcast i8*%D to i32*
store i32 1,i32*%E,align 4
%F=load i8*,i8**%d,align 8
%G=bitcast i8*%A to i8**
store i8*%F,i8**%G,align 8
call void@sml_raise(i8*inreg%A)#1
unreachable
H:
%I=getelementptr inbounds i8,i8*%j,i64 8
%J=bitcast i8*%I to i8**
%K=load i8*,i8**%J,align 8
%L=getelementptr inbounds i8,i8*%K,i64 16
%M=bitcast i8*%L to i8*(i8*,i8*)**
%N=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%M,align 8
%O=bitcast i8*%K to i8**
%P=load i8*,i8**%O,align 8
%Q=load i8*,i8**%d,align 8
%R=tail call fastcc i8*%N(i8*inreg%P,i8*inreg%Q)
ret i8*%R
}
define internal fastcc i8*@_SMLL9blockWrap_82(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%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*%b,i8**%c,align 8
%f=bitcast i8*%a to i8**
%g=load i8*,i8**%f,align 8
store i8*%g,i8**%d,align 8
%h=call i8*@sml_alloc(i32 inreg 20)#0
%i=getelementptr inbounds i8,i8*%h,i64 -4
%j=bitcast i8*%i to i32*
store i32 1342177296,i32*%j,align 4
store i8*%h,i8**%e,align 8
%k=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%l=bitcast i8*%h to i8**
store i8*%k,i8**%l,align 8
%m=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%n=getelementptr inbounds i8,i8*%h,i64 8
%o=bitcast i8*%n to i8**
store i8*%m,i8**%o,align 8
%p=getelementptr inbounds i8,i8*%h,i64 16
%q=bitcast i8*%p to i32*
store i32 3,i32*%q,align 4
%r=call i8*@sml_alloc(i32 inreg 28)#0
%s=getelementptr inbounds i8,i8*%r,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177304,i32*%t,align 4
%u=load i8*,i8**%e,align 8
%v=bitcast i8*%r to i8**
store i8*%u,i8**%v,align 8
%w=getelementptr inbounds i8,i8*%r,i64 8
%x=bitcast i8*%w to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9blockWrap_81 to void(...)*),void(...)**%x,align 8
%y=getelementptr inbounds i8,i8*%r,i64 16
%z=bitcast i8*%y to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9blockWrap_81 to void(...)*),void(...)**%z,align 8
%A=getelementptr inbounds i8,i8*%r,i64 24
%B=bitcast i8*%A to i32*
store i32 1,i32*%B,align 4
ret i8*%r
}
define internal fastcc i8*@_SMLL9blockWrap_83(i8*inreg%a,i32 inreg%b,i32 inreg%c,i32 inreg%d,i32 inreg%e)#4 gc"smlsharp"{
%f=alloca i8*,align 8
%g=alloca i8*,align 8
call void@llvm.gcroot(i8**%f,i8*null)#0
call void@llvm.gcroot(i8**%g,i8*null)#0
%h=bitcast i8*%a to i8**
%i=load i8*,i8**%h,align 8
store i8*%i,i8**%f,align 8
%j=call i8*@sml_alloc(i32 inreg 12)#0
%k=getelementptr inbounds i8,i8*%j,i64 -4
%l=bitcast i8*%k to i32*
store i32 1342177288,i32*%l,align 4
store i8*%j,i8**%g,align 8
%m=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%n=bitcast i8*%j to i8**
store i8*%m,i8**%n,align 8
%o=getelementptr inbounds i8,i8*%j,i64 8
%p=bitcast i8*%o to i32*
store i32 1,i32*%p,align 4
%q=call i8*@sml_alloc(i32 inreg 28)#0
%r=getelementptr inbounds i8,i8*%q,i64 -4
%s=bitcast i8*%r to i32*
store i32 1342177304,i32*%s,align 4
%t=load i8*,i8**%g,align 8
%u=bitcast i8*%q to i8**
store i8*%t,i8**%u,align 8
%v=getelementptr inbounds i8,i8*%q,i64 8
%w=bitcast i8*%v to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9blockWrap_82 to void(...)*),void(...)**%w,align 8
%x=getelementptr inbounds i8,i8*%q,i64 16
%y=bitcast i8*%x to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9blockWrap_82 to void(...)*),void(...)**%y,align 8
%z=getelementptr inbounds i8,i8*%q,i64 24
%A=bitcast i8*%z to i32*
store i32 -2147483647,i32*%A,align 4
ret i8*%q
}
define internal fastcc void@_SMLL7r__close_84(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%f,label%h
f:
%g=bitcast i8*%a to i32**
br label%k
h:
call void@sml_check(i32 inreg%d)
%i=bitcast i8**%c to i32***
%j=load i32**,i32***%i,align 8
br label%k
k:
%l=phi i32**[%j,%h],[%g,%f]
%m=load i32*,i32**%l,align 8
%n=load i32,i32*%m,align 4
%o=icmp eq i32%n,0
br i1%o,label%q,label%p
p:
ret void
q:
store i32 1,i32*%m,align 4
%r=load i8*,i8**%c,align 8
%s=getelementptr inbounds i8,i8*%r,i64 8
%t=bitcast i8*%s to i32*
%u=load i32,i32*%t,align 4
tail call fastcc void@_SMLFN13SMLSharp__OSIO5closeE(i32 inreg%u)
ret void
}
define internal fastcc i8*@_SMLL5avail_86(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
j:
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,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**%c,align 8
br label%h
h:
%i=phi i8*[%g,%f],[%a,%j]
%k=bitcast i8*%i to i32**
%l=load i32*,i32**%k,align 8
%m=load i32,i32*%l,align 4
%n=icmp eq i32%m,0
br i1%n,label%q,label%o
o:
%p=phi i8*[bitcast(i32*getelementptr inbounds(<{[4x i8],i32,i32,[4x i8],i32}>,<{[4x i8],i32,i32,[4x i8],i32}>*@g,i64 0,i32 2)to i8*),%h],[null,%q]
ret i8*%p
q:
%r=getelementptr inbounds i8,i8*%i,i64 16
%s=bitcast i8*%r to i32*
%t=load i32,i32*%s,align 4
%u=icmp eq i32%t,0
br i1%u,label%o,label%v
v:
%w=getelementptr inbounds i8,i8*%i,i64 20
%x=bitcast i8*%w to i32*
%y=load i32,i32*%x,align 4
%z=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%y)
%A=call fastcc i32@_SMLFN13SMLSharp__OSIO2ST4sizeE(i8*inreg%z)
%B=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%C=getelementptr inbounds i8,i8*%B,i64 8
%D=bitcast i8*%C to i32**
%E=load i32*,i32**%D,align 8
%F=load i32,i32*%E,align 4
%G=sub nsw i32%A,%F
%H=call fastcc i32@_SMLFN5Int325toIntE(i32 inreg%G)
%I=call i8*@sml_alloc(i32 inreg 12)#0
%J=bitcast i8*%I to i32*
%K=getelementptr inbounds i8,i8*%I,i64 -4
%L=bitcast i8*%K to i32*
store i32 1342177288,i32*%L,align 4
%M=getelementptr inbounds i8,i8*%I,i64 4
%N=bitcast i8*%M to i32*
store i32 0,i32*%N,align 1
store i32%H,i32*%J,align 4
%O=getelementptr inbounds i8,i8*%I,i64 8
%P=bitcast i8*%O to i32*
store i32 0,i32*%P,align 4
ret i8*%I
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_87(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
l:
%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**%d,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**%d,align 8
br label%j
j:
%k=phi i8*[%i,%h],[%a,%l]
%m=getelementptr inbounds i8,i8*%k,i64 16
%n=bitcast i8*%m to i32*
%o=load i32,i32*%n,align 4
%p=call i8*@sml_alloc(i32 inreg 12)#0
%q=bitcast i8*%p to i32*
%r=getelementptr inbounds i8,i8*%p,i64 -4
%s=bitcast i8*%r to i32*
store i32 1342177288,i32*%s,align 4
store i32%o,i32*%q,align 4
%t=getelementptr inbounds i8,i8*%p,i64 4
%u=bitcast i8*%t to i32*
store i32%b,i32*%u,align 4
%v=getelementptr inbounds i8,i8*%p,i64 8
%w=bitcast i8*%v to i32*
store i32 0,i32*%w,align 4
%x=call fastcc i8*@_SMLFN13SMLSharp__OSIO7readVecE(i8*inreg%p)
store i8*%x,i8**%c,align 8
%y=load i8*,i8**%d,align 8
%z=getelementptr inbounds i8,i8*%y,i64 8
%A=bitcast i8*%z to i8**
%B=load i8*,i8**%A,align 8
store i8*%B,i8**%e,align 8
%C=call fastcc i32@_SMLFN11Word8Vector6lengthE(i8*inreg%x)
%D=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
call fastcc void@_SMLL6incPos_78(i8*inreg%D,i32 inreg%C)
%E=bitcast i8**%d to i8***
%F=load i8**,i8***%E,align 8
%G=load i8*,i8**%F,align 8
%H=getelementptr inbounds i8,i8*%G,i64 8
%I=bitcast i8*%H to i8**
%J=load i8*,i8**%I,align 8
%K=getelementptr inbounds i8,i8*%J,i64 16
%L=bitcast i8*%K to i8*(i8*,i8*)**
%M=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%L,align 8
%N=bitcast i8*%J to i8**
%O=load i8*,i8**%N,align 8
%P=load i8*,i8**%c,align 8
%Q=tail call fastcc i8*%M(i8*inreg%O,i8*inreg%P)
ret i8*%Q
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
x:
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
%g=alloca i8*,align 8
%h=alloca i8*,align 8
%i=alloca i8*,align 8
%j=alloca i8*,align 8
%k=alloca i8*,align 8
%l=alloca i8*,align 8
%m=alloca i8*,align 8
%n=alloca i8*,align 8
%o=alloca i8*,align 8
%p=alloca i8*,align 8
%q=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
call void@llvm.gcroot(i8**%g,i8*null)#0
call void@llvm.gcroot(i8**%h,i8*null)#0
call void@llvm.gcroot(i8**%i,i8*null)#0
call void@llvm.gcroot(i8**%j,i8*null)#0
call void@llvm.gcroot(i8**%k,i8*null)#0
call void@llvm.gcroot(i8**%l,i8*null)#0
call void@llvm.gcroot(i8**%m,i8*null)#0
call void@llvm.gcroot(i8**%n,i8*null)#0
call void@llvm.gcroot(i8**%o,i8*null)#0
call void@llvm.gcroot(i8**%p,i8*null)#0
call void@llvm.gcroot(i8**%q,i8*null)#0
store i8*%a,i8**%i,align 8
store i8*%b,i8**%c,align 8
%r=load atomic i32,i32*@sml_check_flag unordered,align 4
%s=icmp eq i32%r,0
br i1%s,label%v,label%t
t:
call void@sml_check(i32 inreg%r)
%u=load i8*,i8**%c,align 8
br label%v
v:
%w=phi i8*[%u,%t],[%b,%x]
store i8*null,i8**%c,align 8
%y=bitcast i8*%w to i32*
%z=load i32,i32*%y,align 4
%A=getelementptr inbounds i8,i8*%w,i64 8
%B=bitcast i8*%A to i8**
%C=load i8*,i8**%B,align 8
store i8*%C,i8**%h,align 8
%D=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 536870916,i32*%G,align 4
store i8*%D,i8**%j,align 8
store i32 0,i32*%E,align 4
%H=call i8*@sml_alloc(i32 inreg 20)#0
%I=getelementptr inbounds i8,i8*%H,i64 -4
%J=bitcast i8*%I to i32*
store i32 1342177296,i32*%J,align 4
%K=getelementptr inbounds i8,i8*%H,i64 12
%L=bitcast i8*%K to i32*
store i32 0,i32*%L,align 1
%M=load i8*,i8**%j,align 8
%N=bitcast i8*%H to i8**
store i8*%M,i8**%N,align 8
%O=getelementptr inbounds i8,i8*%H,i64 8
%P=bitcast i8*%O to i32*
store i32%z,i32*%P,align 4
%Q=getelementptr inbounds i8,i8*%H,i64 16
%R=bitcast i8*%Q to i32*
store i32 1,i32*%R,align 4
%S=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_76(i8*inreg%H)
%T=getelementptr inbounds i8,i8*%S,i64 16
%U=bitcast i8*%T to i8**
%V=load i8*,i8**%U,align 8
store i8*%V,i8**%c,align 8
%W=getelementptr inbounds i8,i8*%S,i64 8
%X=bitcast i8*%W to i8**
%Y=load i8*,i8**%X,align 8
store i8*%Y,i8**%d,align 8
%Z=getelementptr inbounds i8,i8*%S,i64 24
%aa=bitcast i8*%Z to i8**
%ab=load i8*,i8**%aa,align 8
store i8*%ab,i8**%e,align 8
%ac=bitcast i8*%S to i8**
%ad=load i8*,i8**%ac,align 8
store i8*%ad,i8**%f,align 8
%ae=getelementptr inbounds i8,i8*%S,i64 32
%af=bitcast i8*%ae to i8**
%ag=load i8*,i8**%af,align 8
store i8*%ag,i8**%g,align 8
%ah=call i8*@sml_alloc(i32 inreg 12)#0
%ai=getelementptr inbounds i8,i8*%ah,i64 -4
%aj=bitcast i8*%ai to i32*
store i32 1342177288,i32*%aj,align 4
store i8*%ah,i8**%l,align 8
%ak=load i8*,i8**%c,align 8
%al=bitcast i8*%ah to i8**
store i8*%ak,i8**%al,align 8
%am=getelementptr inbounds i8,i8*%ah,i64 8
%an=bitcast i8*%am to i32*
store i32 1,i32*%an,align 4
%ao=call i8*@sml_alloc(i32 inreg 28)#0
%ap=getelementptr inbounds i8,i8*%ao,i64 -4
%aq=bitcast i8*%ap to i32*
store i32 1342177304,i32*%aq,align 4
%ar=load i8*,i8**%l,align 8
%as=bitcast i8*%ao to i8**
store i8*%ar,i8**%as,align 8
%at=getelementptr inbounds i8,i8*%ao,i64 8
%au=bitcast i8*%at to void(...)**
store void(...)*bitcast(void(i8*,i32)*@_SMLL6incPos_78 to void(...)*),void(...)**%au,align 8
%av=getelementptr inbounds i8,i8*%ao,i64 16
%aw=bitcast i8*%av to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6incPos_135 to void(...)*),void(...)**%aw,align 8
%ax=getelementptr inbounds i8,i8*%ao,i64 24
%ay=bitcast i8*%ax to i32*
store i32 -2147483647,i32*%ay,align 4
%az=bitcast i8**%i to i8***
%aA=load i8**,i8***%az,align 8
%aB=load i8*,i8**%aA,align 8
store i8*%aB,i8**%k,align 8
%aC=call i8*@sml_alloc(i32 inreg 28)#0
%aD=getelementptr inbounds i8,i8*%aC,i64 -4
%aE=bitcast i8*%aD to i32*
store i32 1342177304,i32*%aE,align 4
store i8*%aC,i8**%m,align 8
%aF=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%aG=bitcast i8*%aC to i8**
store i8*%aF,i8**%aG,align 8
%aH=load i8*,i8**%l,align 8
%aI=getelementptr inbounds i8,i8*%aC,i64 8
%aJ=bitcast i8*%aI to i8**
store i8*%aH,i8**%aJ,align 8
%aK=getelementptr inbounds i8,i8*%aC,i64 16
%aL=bitcast i8*%aK to i32*
store i32%z,i32*%aL,align 4
%aM=getelementptr inbounds i8,i8*%aC,i64 24
%aN=bitcast i8*%aM to i32*
store i32 3,i32*%aN,align 4
%aO=call i8*@sml_alloc(i32 inreg 28)#0
%aP=getelementptr inbounds i8,i8*%aO,i64 -4
%aQ=bitcast i8*%aP to i32*
store i32 1342177304,i32*%aQ,align 4
store i8*%aO,i8**%k,align 8
%aR=load i8*,i8**%m,align 8
store i8*null,i8**%m,align 8
%aS=bitcast i8*%aO to i8**
store i8*%aR,i8**%aS,align 8
%aT=getelementptr inbounds i8,i8*%aO,i64 8
%aU=bitcast i8*%aT to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLL9r__readArr_79 to void(...)*),void(...)**%aU,align 8
%aV=getelementptr inbounds i8,i8*%aO,i64 16
%aW=bitcast i8*%aV to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL9r__readArr_136 to void(...)*),void(...)**%aW,align 8
%aX=getelementptr inbounds i8,i8*%aO,i64 24
%aY=bitcast i8*%aX to i32*
store i32 -2147483647,i32*%aY,align 4
%aZ=call i8*@sml_alloc(i32 inreg 12)#0
%a0=getelementptr inbounds i8,i8*%aZ,i64 -4
%a1=bitcast i8*%a0 to i32*
store i32 1342177288,i32*%a1,align 4
store i8*%aZ,i8**%m,align 8
%a2=load i8*,i8**%j,align 8
%a3=bitcast i8*%aZ to i8**
store i8*%a2,i8**%a3,align 8
%a4=getelementptr inbounds i8,i8*%aZ,i64 8
%a5=bitcast i8*%a4 to i32*
store i32 1,i32*%a5,align 4
%a6=call i8*@sml_alloc(i32 inreg 28)#0
%a7=getelementptr inbounds i8,i8*%a6,i64 -4
%a8=bitcast i8*%a7 to i32*
store i32 1342177304,i32*%a8,align 4
%a9=load i8*,i8**%m,align 8
%ba=bitcast i8*%a6 to i8**
store i8*%a9,i8**%ba,align 8
%bb=getelementptr inbounds i8,i8*%a6,i64 8
%bc=bitcast i8*%bb to void(...)**
store void(...)*bitcast(i8*(i8*,i32,i32,i32,i32)*@_SMLL9blockWrap_83 to void(...)*),void(...)**%bc,align 8
%bd=getelementptr inbounds i8,i8*%a6,i64 16
%be=bitcast i8*%bd to void(...)**
store void(...)*bitcast(i8*(i8*,i8*,i8*,i8*,i8*)*@_SMLL9blockWrap_137 to void(...)*),void(...)**%be,align 8
%bf=getelementptr inbounds i8,i8*%a6,i64 24
%bg=bitcast i8*%bf to i32*
store i32 -2147483647,i32*%bg,align 4
%bh=call i8*@sml_alloc(i32 inreg 20)#0
%bi=getelementptr inbounds i8,i8*%bh,i64 -4
%bj=bitcast i8*%bi to i32*
store i32 1342177296,i32*%bj,align 4
store i8*%bh,i8**%n,align 8
%bk=load i8*,i8**%j,align 8
%bl=bitcast i8*%bh to i8**
store i8*%bk,i8**%bl,align 8
%bm=getelementptr inbounds i8,i8*%bh,i64 8
%bn=bitcast i8*%bm to i32*
store i32%z,i32*%bn,align 4
%bo=getelementptr inbounds i8,i8*%bh,i64 16
%bp=bitcast i8*%bo to i32*
store i32 1,i32*%bp,align 4
%bq=call i8*@sml_alloc(i32 inreg 28)#0
%br=getelementptr inbounds i8,i8*%bq,i64 -4
%bs=bitcast i8*%br to i32*
store i32 1342177304,i32*%bs,align 4
store i8*%bq,i8**%p,align 8
%bt=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%bu=bitcast i8*%bq to i8**
store i8*%bt,i8**%bu,align 8
%bv=getelementptr inbounds i8,i8*%bq,i64 8
%bw=bitcast i8*%bv to void(...)**
store void(...)*bitcast(void(i8*,i32)*@_SMLL7r__close_84 to void(...)*),void(...)**%bw,align 8
%bx=getelementptr inbounds i8,i8*%bq,i64 16
%by=bitcast i8*%bx to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL7r__close_138 to void(...)*),void(...)**%by,align 8
%bz=getelementptr inbounds i8,i8*%bq,i64 24
%bA=bitcast i8*%bz to i32*
store i32 -2147483647,i32*%bA,align 4
%bB=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%z)
%bC=call fastcc i32@_SMLFN13SMLSharp__OSIO2ST5isRegE(i8*inreg%bB)
%bD=call i8*@sml_alloc(i32 inreg 28)#0
%bE=getelementptr inbounds i8,i8*%bD,i64 -4
%bF=bitcast i8*%bE to i32*
store i32 1342177304,i32*%bF,align 4
store i8*%bD,i8**%n,align 8
%bG=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%bH=bitcast i8*%bD to i8**
store i8*%bG,i8**%bH,align 8
%bI=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%bJ=getelementptr inbounds i8,i8*%bD,i64 8
%bK=bitcast i8*%bJ to i8**
store i8*%bI,i8**%bK,align 8
%bL=getelementptr inbounds i8,i8*%bD,i64 16
%bM=bitcast i8*%bL to i32*
store i32%bC,i32*%bM,align 4
%bN=getelementptr inbounds i8,i8*%bD,i64 20
%bO=bitcast i8*%bN to i32*
store i32%z,i32*%bO,align 4
%bP=getelementptr inbounds i8,i8*%bD,i64 24
%bQ=bitcast i8*%bP to i32*
store i32 3,i32*%bQ,align 4
%bR=call i8*@sml_alloc(i32 inreg 28)#0
%bS=getelementptr inbounds i8,i8*%bR,i64 -4
%bT=bitcast i8*%bS to i32*
store i32 1342177304,i32*%bT,align 4
store i8*%bR,i8**%q,align 8
%bU=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%bV=bitcast i8*%bR to i8**
store i8*%bU,i8**%bV,align 8
%bW=getelementptr inbounds i8,i8*%bR,i64 8
%bX=bitcast i8*%bW to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLL5avail_86 to void(...)*),void(...)**%bX,align 8
%bY=getelementptr inbounds i8,i8*%bR,i64 16
%bZ=bitcast i8*%bY to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL5avail_139 to void(...)*),void(...)**%bZ,align 8
%b0=getelementptr inbounds i8,i8*%bR,i64 24
%b1=bitcast i8*%b0 to i32*
store i32 -2147483647,i32*%b1,align 4
%b2=load i8**,i8***%az,align 8
%b3=load i8*,i8**%b2,align 8
%b4=getelementptr inbounds i8,i8*%b3,i64 16
%b5=bitcast i8*%b4 to i8**
%b6=load i8*,i8**%b5,align 8
%b7=getelementptr inbounds i8,i8*%b6,i64 16
%b8=bitcast i8*%b7 to i8*(i8*,i8*)**
%b9=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%b8,align 8
%ca=bitcast i8*%b6 to i8**
%cb=load i8*,i8**%ca,align 8
store i8*%cb,i8**%o,align 8
%cc=load i8*,i8**%m,align 8
%cd=call fastcc i8*@_SMLL9blockWrap_83(i8*inreg%cc,i32 inreg 0,i32 inreg 4,i32 inreg 1,i32 inreg 8)
%ce=getelementptr inbounds i8,i8*%cd,i64 16
%cf=bitcast i8*%ce to i8*(i8*,i8*)**
%cg=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%cf,align 8
%ch=bitcast i8*%cd to i8**
%ci=load i8*,i8**%ch,align 8
store i8*%ci,i8**%j,align 8
%cj=load i8**,i8***%az,align 8
store i8*null,i8**%i,align 8
%ck=load i8*,i8**%cj,align 8
store i8*%ck,i8**%c,align 8
%cl=call i8*@sml_alloc(i32 inreg 28)#0
%cm=getelementptr inbounds i8,i8*%cl,i64 -4
%cn=bitcast i8*%cm to i32*
store i32 1342177304,i32*%cn,align 4
store i8*%cl,i8**%i,align 8
%co=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%cp=bitcast i8*%cl to i8**
store i8*%co,i8**%cp,align 8
%cq=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%cr=getelementptr inbounds i8,i8*%cl,i64 8
%cs=bitcast i8*%cr to i8**
store i8*%cq,i8**%cs,align 8
%ct=getelementptr inbounds i8,i8*%cl,i64 16
%cu=bitcast i8*%ct to i32*
store i32%z,i32*%cu,align 4
%cv=getelementptr inbounds i8,i8*%cl,i64 24
%cw=bitcast i8*%cv to i32*
store i32 3,i32*%cw,align 4
%cx=call i8*@sml_alloc(i32 inreg 28)#0
%cy=getelementptr inbounds i8,i8*%cx,i64 -4
%cz=bitcast i8*%cy to i32*
store i32 1342177304,i32*%cz,align 4
%cA=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%cB=bitcast i8*%cx to i8**
store i8*%cA,i8**%cB,align 8
%cC=getelementptr inbounds i8,i8*%cx,i64 8
%cD=bitcast i8*%cC to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_87 to void(...)*),void(...)**%cD,align 8
%cE=getelementptr inbounds i8,i8*%cx,i64 16
%cF=bitcast i8*%cE to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_140 to void(...)*),void(...)**%cF,align 8
%cG=getelementptr inbounds i8,i8*%cx,i64 24
%cH=bitcast i8*%cG to i32*
store i32 -2147483647,i32*%cH,align 4
%cI=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%cJ=call fastcc i8*%cg(i8*inreg%cI,i8*inreg%cx)
store i8*%cJ,i8**%c,align 8
%cK=call i8*@sml_alloc(i32 inreg 12)#0
%cL=getelementptr inbounds i8,i8*%cK,i64 -4
%cM=bitcast i8*%cL to i32*
store i32 1342177288,i32*%cM,align 4
store i8*%cK,i8**%i,align 8
%cN=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%cO=bitcast i8*%cK to i8**
store i8*%cN,i8**%cO,align 8
%cP=getelementptr inbounds i8,i8*%cK,i64 8
%cQ=bitcast i8*%cP to i32*
store i32 1,i32*%cQ,align 4
%cR=load i8*,i8**%m,align 8
store i8*null,i8**%m,align 8
%cS=call fastcc i8*@_SMLL9blockWrap_83(i8*inreg%cR,i32 inreg 1,i32 inreg 8,i32 inreg 0,i32 inreg 4)
%cT=getelementptr inbounds i8,i8*%cS,i64 16
%cU=bitcast i8*%cT to i8*(i8*,i8*)**
%cV=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%cU,align 8
%cW=bitcast i8*%cS to i8**
%cX=load i8*,i8**%cW,align 8
%cY=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%cZ=call fastcc i8*%cV(i8*inreg%cX,i8*inreg%cY)
store i8*%cZ,i8**%c,align 8
%c0=call i8*@sml_alloc(i32 inreg 12)#0
%c1=getelementptr inbounds i8,i8*%c0,i64 -4
%c2=bitcast i8*%c1 to i32*
store i32 1342177288,i32*%c2,align 4
store i8*%c0,i8**%j,align 8
%c3=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%c4=bitcast i8*%c0 to i8**
store i8*%c3,i8**%c4,align 8
%c5=getelementptr inbounds i8,i8*%c0,i64 8
%c6=bitcast i8*%c5 to i32*
store i32 1,i32*%c6,align 4
%c7=call i8*@sml_alloc(i32 inreg 12)#0
%c8=getelementptr inbounds i8,i8*%c7,i64 -4
%c9=bitcast i8*%c8 to i32*
store i32 1342177288,i32*%c9,align 4
store i8*%c7,i8**%c,align 8
%da=getelementptr inbounds i8,i8*%c7,i64 4
%db=bitcast i8*%da to i32*
store i32 0,i32*%db,align 1
%dc=bitcast i8*%c7 to i32*
store i32%z,i32*%dc,align 4
%dd=getelementptr inbounds i8,i8*%c7,i64 8
%de=bitcast i8*%dd to i32*
store i32 0,i32*%de,align 4
%df=call i8*@sml_alloc(i32 inreg 124)#0
%dg=getelementptr inbounds i8,i8*%df,i64 -4
%dh=bitcast i8*%dg to i32*
store i32 1342177400,i32*%dh,align 4
%di=getelementptr inbounds i8,i8*%df,i64 28
%dj=bitcast i8*%di to i32*
store i32 0,i32*%dj,align 1
%dk=load i8*,i8**%q,align 8
%dl=bitcast i8*%df to i8**
store i8*%dk,i8**%dl,align 8
%dm=getelementptr inbounds i8,i8*%df,i64 8
%dn=getelementptr inbounds i8,i8*%df,i64 24
%do=bitcast i8*%dn to i32*
call void@llvm.memset.p0i8.i64(i8*%dm,i8 0,i64 16,i1 false)
store i32 4096,i32*%do,align 4
%dp=load i8*,i8**%p,align 8
%dq=getelementptr inbounds i8,i8*%df,i64 32
%dr=bitcast i8*%dq to i8**
store i8*%dp,i8**%dr,align 8
%ds=load i8*,i8**%f,align 8
%dt=getelementptr inbounds i8,i8*%df,i64 40
%du=bitcast i8*%dt to i8**
store i8*%ds,i8**%du,align 8
%dv=load i8*,i8**%d,align 8
%dw=getelementptr inbounds i8,i8*%df,i64 48
%dx=bitcast i8*%dw to i8**
store i8*%dv,i8**%dx,align 8
%dy=load i8*,i8**%c,align 8
%dz=getelementptr inbounds i8,i8*%df,i64 56
%dA=bitcast i8*%dz to i8**
store i8*%dy,i8**%dA,align 8
%dB=load i8*,i8**%h,align 8
%dC=getelementptr inbounds i8,i8*%df,i64 64
%dD=bitcast i8*%dC to i8**
store i8*%dB,i8**%dD,align 8
%dE=load i8*,i8**%j,align 8
%dF=getelementptr inbounds i8,i8*%df,i64 72
%dG=bitcast i8*%dF to i8**
store i8*%dE,i8**%dG,align 8
%dH=getelementptr inbounds i8,i8*%df,i64 80
%dI=bitcast i8*%dH to i8**
store i8*null,i8**%dI,align 8
%dJ=load i8*,i8**%i,align 8
%dK=getelementptr inbounds i8,i8*%df,i64 88
%dL=bitcast i8*%dK to i8**
store i8*%dJ,i8**%dL,align 8
%dM=getelementptr inbounds i8,i8*%df,i64 96
%dN=bitcast i8*%dM to i8**
store i8*null,i8**%dN,align 8
%dO=load i8*,i8**%e,align 8
%dP=getelementptr inbounds i8,i8*%df,i64 104
%dQ=bitcast i8*%dP to i8**
store i8*%dO,i8**%dQ,align 8
%dR=load i8*,i8**%g,align 8
%dS=getelementptr inbounds i8,i8*%df,i64 112
%dT=bitcast i8*%dS to i8**
store i8*%dR,i8**%dT,align 8
%dU=getelementptr inbounds i8,i8*%df,i64 120
%dV=bitcast i8*%dU to i32*
store i32 32759,i32*%dV,align 4
store i8*%dk,i8**%c,align 8
store i8*null,i8**%d,align 8
store i8*null,i8**%e,align 8
store i8*%dp,i8**%f,align 8
store i8*%ds,i8**%g,align 8
store i8*%dv,i8**%h,align 8
store i8*%dy,i8**%i,align 8
store i8*%dB,i8**%j,align 8
store i8*%dE,i8**%k,align 8
store i8*null,i8**%p,align 8
store i8*%dJ,i8**%l,align 8
store i8*null,i8**%q,align 8
store i8*%dO,i8**%m,align 8
store i8*%dR,i8**%n,align 8
%dW=call i8*@sml_alloc(i32 inreg 124)#0
%dX=getelementptr inbounds i8,i8*%dW,i64 -4
%dY=bitcast i8*%dX to i32*
store i32 1342177400,i32*%dY,align 4
%dZ=getelementptr inbounds i8,i8*%dW,i64 28
%d0=bitcast i8*%dZ to i32*
store i32 0,i32*%d0,align 1
%d1=load i8*,i8**%c,align 8
%d2=bitcast i8*%dW to i8**
store i8*%d1,i8**%d2,align 8
%d3=load i8*,i8**%d,align 8
%d4=getelementptr inbounds i8,i8*%dW,i64 8
%d5=bitcast i8*%d4 to i8**
store i8*%d3,i8**%d5,align 8
%d6=load i8*,i8**%e,align 8
%d7=getelementptr inbounds i8,i8*%dW,i64 16
%d8=bitcast i8*%d7 to i8**
store i8*%d6,i8**%d8,align 8
%d9=getelementptr inbounds i8,i8*%dW,i64 24
%ea=bitcast i8*%d9 to i32*
store i32 4096,i32*%ea,align 4
%eb=load i8*,i8**%f,align 8
%ec=getelementptr inbounds i8,i8*%dW,i64 32
%ed=bitcast i8*%ec to i8**
store i8*%eb,i8**%ed,align 8
%ee=load i8*,i8**%g,align 8
%ef=getelementptr inbounds i8,i8*%dW,i64 40
%eg=bitcast i8*%ef to i8**
store i8*%ee,i8**%eg,align 8
%eh=load i8*,i8**%h,align 8
%ei=getelementptr inbounds i8,i8*%dW,i64 48
%ej=bitcast i8*%ei to i8**
store i8*%eh,i8**%ej,align 8
%ek=load i8*,i8**%i,align 8
%el=getelementptr inbounds i8,i8*%dW,i64 56
%em=bitcast i8*%el to i8**
store i8*%ek,i8**%em,align 8
%en=load i8*,i8**%j,align 8
%eo=getelementptr inbounds i8,i8*%dW,i64 64
%ep=bitcast i8*%eo to i8**
store i8*%en,i8**%ep,align 8
%eq=load i8*,i8**%k,align 8
%er=getelementptr inbounds i8,i8*%dW,i64 72
%es=bitcast i8*%er to i8**
store i8*%eq,i8**%es,align 8
%et=load i8*,i8**%p,align 8
%eu=getelementptr inbounds i8,i8*%dW,i64 80
%ev=bitcast i8*%eu to i8**
store i8*%et,i8**%ev,align 8
%ew=load i8*,i8**%l,align 8
%ex=getelementptr inbounds i8,i8*%dW,i64 88
%ey=bitcast i8*%ex to i8**
store i8*%ew,i8**%ey,align 8
%ez=load i8*,i8**%q,align 8
%eA=getelementptr inbounds i8,i8*%dW,i64 96
%eB=bitcast i8*%eA to i8**
store i8*%ez,i8**%eB,align 8
%eC=load i8*,i8**%m,align 8
%eD=getelementptr inbounds i8,i8*%dW,i64 104
%eE=bitcast i8*%eD to i8**
store i8*%eC,i8**%eE,align 8
%eF=load i8*,i8**%n,align 8
%eG=getelementptr inbounds i8,i8*%dW,i64 112
%eH=bitcast i8*%eG to i8**
store i8*%eF,i8**%eH,align 8
%eI=getelementptr inbounds i8,i8*%dW,i64 120
%eJ=bitcast i8*%eI to i32*
store i32 32759,i32*%eJ,align 4
%eK=load i8*,i8**%o,align 8
%eL=tail call fastcc i8*%b9(i8*inreg%eK,i8*inreg%dW)
ret i8*%eL
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_89(i8*inreg%a)unnamed_addr#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*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88 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*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88 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 i32@_SMLL6incPos_91(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%f,label%i
f:
%g=bitcast i8*%a to i32**
%h=bitcast i8**%c to i32***
br label%l
i:
call void@sml_check(i32 inreg%d)
%j=bitcast i8**%c to i32***
%k=load i32**,i32***%j,align 8
br label%l
l:
%m=phi i32***[%h,%f],[%j,%i]
%n=phi i32**[%g,%f],[%k,%i]
%o=load i32*,i32**%n,align 8
%p=load i32,i32*%o,align 4
%q=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%b)
%r=add nsw i32%q,%p
%s=load i32**,i32***%m,align 8
%t=load i32*,i32**%s,align 8
store i32%r,i32*%t,align 4
ret i32%b
}
define internal fastcc i32@_SMLL4putV_92(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
l:
%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**%c,align 8
store i8*%b,i8**%d,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%j,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%d,align 8
%i=load i8*,i8**%c,align 8
br label%j
j:
%k=phi i8*[%i,%g],[%a,%l]
%m=phi i8*[%h,%g],[%b,%l]
%n=bitcast i8*%k to i8**
%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**%d,align 8
%r=bitcast i8*%m to i32*
%s=load i32,i32*%r,align 4
store i8*null,i8**%c,align 8
%t=load i8*,i8**%n,align 8
%u=getelementptr inbounds i8,i8*%t,i64 8
%v=bitcast i8*%u to i8**
%w=load i8*,i8**%v,align 8
%x=getelementptr inbounds i8,i8*%w,i64 16
%y=bitcast i8*%x to i8*(i8*,i8*)**
%z=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%y,align 8
%A=bitcast i8*%w to i8**
%B=load i8*,i8**%A,align 8
%C=getelementptr inbounds i8,i8*%m,i64 8
%D=bitcast i8*%C to i8**
%E=load i8*,i8**%D,align 8
%F=call fastcc i8*%z(i8*inreg%B,i8*inreg%E)
store i8*%F,i8**%c,align 8
%G=call i8*@sml_alloc(i32 inreg 20)#0
%H=bitcast i8*%G to i32*
%I=getelementptr inbounds i8,i8*%G,i64 -4
%J=bitcast i8*%I to i32*
store i32 1342177296,i32*%J,align 4
%K=getelementptr inbounds i8,i8*%G,i64 4
%L=bitcast i8*%K to i32*
store i32 0,i32*%L,align 1
store i32%s,i32*%H,align 4
%M=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%N=getelementptr inbounds i8,i8*%G,i64 8
%O=bitcast i8*%N to i8**
store i8*%M,i8**%O,align 8
%P=getelementptr inbounds i8,i8*%G,i64 16
%Q=bitcast i8*%P to i32*
store i32 2,i32*%Q,align 4
%R=call fastcc i32@_SMLFN13SMLSharp__OSIO8writeVecE(i8*inreg%G)
%S=load i8*,i8**%d,align 8
%T=tail call fastcc i32@_SMLL6incPos_91(i8*inreg%S,i32 inreg%R)
ret i32%T
}
define internal fastcc i32@_SMLL4putA_93(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
l:
%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**%c,align 8
store i8*%b,i8**%d,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%j,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%d,align 8
%i=load i8*,i8**%c,align 8
br label%j
j:
%k=phi i8*[%i,%g],[%a,%l]
%m=phi i8*[%h,%g],[%b,%l]
%n=bitcast i8*%k to i8***
%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**%d,align 8
%r=bitcast i8*%m to i32*
%s=load i32,i32*%r,align 4
store i8*null,i8**%c,align 8
%t=load i8**,i8***%n,align 8
%u=load i8*,i8**%t,align 8
%v=getelementptr inbounds i8,i8*%u,i64 16
%w=bitcast i8*%v to i8*(i8*,i8*)**
%x=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%w,align 8
%y=bitcast i8*%u to i8**
%z=load i8*,i8**%y,align 8
%A=getelementptr inbounds i8,i8*%m,i64 8
%B=bitcast i8*%A to i8**
%C=load i8*,i8**%B,align 8
%D=call fastcc i8*%x(i8*inreg%z,i8*inreg%C)
store i8*%D,i8**%c,align 8
%E=call i8*@sml_alloc(i32 inreg 20)#0
%F=bitcast i8*%E to i32*
%G=getelementptr inbounds i8,i8*%E,i64 -4
%H=bitcast i8*%G to i32*
store i32 1342177296,i32*%H,align 4
%I=getelementptr inbounds i8,i8*%E,i64 4
%J=bitcast i8*%I to i32*
store i32 0,i32*%J,align 1
store i32%s,i32*%F,align 4
%K=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%L=getelementptr inbounds i8,i8*%E,i64 8
%M=bitcast i8*%L to i8**
store i8*%K,i8**%M,align 8
%N=getelementptr inbounds i8,i8*%E,i64 16
%O=bitcast i8*%N to i32*
store i32 2,i32*%O,align 4
%P=call fastcc i32@_SMLFN13SMLSharp__OSIO8writeArrE(i8*inreg%E)
%Q=load i8*,i8**%d,align 8
%R=tail call fastcc i32@_SMLL6incPos_91(i8*inreg%Q,i32 inreg%P)
ret i32%R
}
define internal fastcc i32@_SMLL5write_95(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
l:
%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**%c,align 8
store i8*%b,i8**%d,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**%c,align 8
br label%j
j:
%k=phi i8*[%i,%h],[%a,%l]
%m=bitcast i8*%k to i32**
%n=load i32*,i32**%m,align 8
%o=load i32,i32*%n,align 4
%p=icmp eq i32%o,0
br i1%p,label%I,label%q
q:
store i8*null,i8**%d,align 8
%r=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%r,i8**%c,align 8
%s=call i8*@sml_alloc(i32 inreg 20)#0
%t=getelementptr inbounds i8,i8*%s,i64 -4
%u=bitcast i8*%t to i32*
store i32 1342177296,i32*%u,align 4
store i8*%s,i8**%d,align 8
%v=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%w=bitcast i8*%s to i8**
store i8*%v,i8**%w,align 8
%x=getelementptr inbounds i8,i8*%s,i64 8
%y=bitcast i8*%x to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[49x i8]}>,<{[4x i8],i32,[49x i8]}>*@h,i64 0,i32 2,i64 0),i8**%y,align 8
%z=getelementptr inbounds i8,i8*%s,i64 16
%A=bitcast i8*%z to i32*
store i32 3,i32*%A,align 4
%B=call i8*@sml_alloc(i32 inreg 60)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177336,i32*%D,align 4
%E=getelementptr inbounds i8,i8*%B,i64 56
%F=bitcast i8*%E to i32*
store i32 1,i32*%F,align 4
%G=load i8*,i8**%d,align 8
%H=bitcast i8*%B to i8**
store i8*%G,i8**%H,align 8
call void@sml_raise(i8*inreg%B)#1
unreachable
I:
%J=getelementptr inbounds i8,i8*%k,i64 8
%K=bitcast i8*%J to i8***
%L=load i8**,i8***%K,align 8
%M=load i8*,i8**%L,align 8
%N=getelementptr inbounds i8,i8*%M,i64 16
%O=bitcast i8*%N to i8*(i8*,i8*)**
%P=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%O,align 8
%Q=bitcast i8*%M to i8**
%R=load i8*,i8**%Q,align 8
store i8*%R,i8**%e,align 8
store i8*null,i8**%c,align 8
%S=getelementptr inbounds i8,i8*%k,i64 16
%T=bitcast i8*%S to i32*
%U=load i32,i32*%T,align 4
%V=call i8*@sml_alloc(i32 inreg 20)#0
%W=bitcast i8*%V to i32*
%X=getelementptr inbounds i8,i8*%V,i64 -4
%Y=bitcast i8*%X to i32*
store i32 1342177296,i32*%Y,align 4
%Z=getelementptr inbounds i8,i8*%V,i64 4
%aa=bitcast i8*%Z to i32*
store i32 0,i32*%aa,align 1
store i32%U,i32*%W,align 4
%ab=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%ac=getelementptr inbounds i8,i8*%V,i64 8
%ad=bitcast i8*%ac to i8**
store i8*%ab,i8**%ad,align 8
%ae=getelementptr inbounds i8,i8*%V,i64 16
%af=bitcast i8*%ae to i32*
store i32 2,i32*%af,align 4
%ag=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%ah=call fastcc i8*%P(i8*inreg%ag,i8*inreg%V)
%ai=bitcast i8*%ah to i32*
%aj=load i32,i32*%ai,align 4
ret i32%aj
}
define internal fastcc i8*@_SMLL5write_96(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%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*%b,i8**%c,align 8
%f=bitcast i8*%a to i8**
%g=load i8*,i8**%f,align 8
store i8*%g,i8**%d,align 8
%h=getelementptr inbounds i8,i8*%a,i64 8
%i=bitcast i8*%h to i32*
%j=load i32,i32*%i,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
store i8*%k,i8**%e,align 8
%n=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%q=getelementptr inbounds i8,i8*%k,i64 8
%r=bitcast i8*%q to i8**
store i8*%p,i8**%r,align 8
%s=getelementptr inbounds i8,i8*%k,i64 16
%t=bitcast i8*%s to i32*
store i32%j,i32*%t,align 4
%u=getelementptr inbounds i8,i8*%k,i64 24
%v=bitcast i8*%u to i32*
store i32 3,i32*%v,align 4
%w=call i8*@sml_alloc(i32 inreg 28)#0
%x=getelementptr inbounds i8,i8*%w,i64 -4
%y=bitcast i8*%x to i32*
store i32 1342177304,i32*%y,align 4
%z=load i8*,i8**%e,align 8
%A=bitcast i8*%w to i8**
store i8*%z,i8**%A,align 8
%B=getelementptr inbounds i8,i8*%w,i64 8
%C=bitcast i8*%B to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLL5write_95 to void(...)*),void(...)**%C,align 8
%D=getelementptr inbounds i8,i8*%w,i64 16
%E=bitcast i8*%D to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL5write_145 to void(...)*),void(...)**%E,align 8
%F=getelementptr inbounds i8,i8*%w,i64 24
%G=bitcast i8*%F to i32*
store i32 -2147483647,i32*%G,align 4
ret i8*%w
}
define internal fastcc i8*@_SMLL11handleBlock_97(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
%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**%c,align 8
store i8*%b,i8**%d,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%m
i:
call void@sml_check(i32 inreg%e)
%j=bitcast i8**%c to i8***
%k=load i8**,i8***%j,align 8
%l=load i8*,i8**%d,align 8
br label%m
m:
%n=phi i8*[%l,%i],[%b,%g]
%o=phi i8**[%k,%i],[%h,%g]
%p=load i8*,i8**%o,align 8
%q=getelementptr inbounds i8,i8*%p,i64 16
%r=bitcast i8*%q to i8*(i8*,i8*)**
%s=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%r,align 8
%t=bitcast i8*%p to i8**
%u=load i8*,i8**%t,align 8
store i8*null,i8**%d,align 8
%v=invoke fastcc i8*%s(i8*inreg%u,i8*inreg%n)
to label%w unwind label%H
w:
store i8*null,i8**%c,align 8
%x=bitcast i8*%v to i32*
%y=load i32,i32*%x,align 4
%z=call i8*@sml_alloc(i32 inreg 12)#0
%A=bitcast i8*%z to i32*
%B=getelementptr inbounds i8,i8*%z,i64 -4
%C=bitcast i8*%B to i32*
store i32 1342177288,i32*%C,align 4
%D=getelementptr inbounds i8,i8*%z,i64 4
%E=bitcast i8*%D to i32*
store i32 0,i32*%E,align 1
store i32%y,i32*%A,align 4
%F=getelementptr inbounds i8,i8*%z,i64 8
%G=bitcast i8*%F to i32*
store i32 0,i32*%G,align 4
br label%ao
H:
%I=landingpad{i8*,i8*}
catch i8*null
%J=extractvalue{i8*,i8*}%I,1
%K=bitcast i8*%J to i8**
%L=load i8*,i8**%K,align 8
store i8*%L,i8**%d,align 8
%M=bitcast i8*%L to i8**
%N=load i8*,i8**%M,align 8
%O=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%P=icmp eq i8*%N,%O
br i1%P,label%Q,label%ay
Q:
%R=getelementptr inbounds i8,i8*%L,i64 16
%S=bitcast i8*%R to i8**
%T=load i8*,i8**%S,align 8
%U=getelementptr inbounds i8,i8*%T,i64 8
%V=bitcast i8*%U to i8**
%W=load i8*,i8**%V,align 8
%X=icmp eq i8*%W,null
br i1%X,label%Y,label%ag
Y:
store i8*null,i8**%c,align 8
%Z=call i8*@sml_alloc(i32 inreg 60)#0
%aa=getelementptr inbounds i8,i8*%Z,i64 -4
%ab=bitcast i8*%aa to i32*
store i32 1342177336,i32*%ab,align 4
%ac=getelementptr inbounds i8,i8*%Z,i64 56
%ad=bitcast i8*%ac to i32*
store i32 1,i32*%ad,align 4
%ae=load i8*,i8**%d,align 8
%af=bitcast i8*%Z to i8**
store i8*%ae,i8**%af,align 8
call void@sml_raise(i8*inreg%Z)#1
unreachable
ag:
%ah=bitcast i8*%W to i32*
%ai=load i32,i32*%ah,align 4
%aj=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%ak=getelementptr inbounds i8,i8*%aj,i64 8
%al=bitcast i8*%ak to i32*
%am=load i32,i32*%al,align 4
%an=icmp eq i32%ai,%am
br i1%an,label%ao,label%aq
ao:
%ap=phi i8*[null,%ag],[%z,%w]
ret i8*%ap
aq:
%ar=call i8*@sml_alloc(i32 inreg 60)#0
%as=getelementptr inbounds i8,i8*%ar,i64 -4
%at=bitcast i8*%as to i32*
store i32 1342177336,i32*%at,align 4
%au=getelementptr inbounds i8,i8*%ar,i64 56
%av=bitcast i8*%au to i32*
store i32 1,i32*%av,align 4
%aw=load i8*,i8**%d,align 8
%ax=bitcast i8*%ar to i8**
store i8*%aw,i8**%ax,align 8
call void@sml_raise(i8*inreg%ar)#1
unreachable
ay:
store i8*null,i8**%c,align 8
%az=call i8*@sml_alloc(i32 inreg 60)#0
%aA=getelementptr inbounds i8,i8*%az,i64 -4
%aB=bitcast i8*%aA to i32*
store i32 1342177336,i32*%aB,align 4
%aC=getelementptr inbounds i8,i8*%az,i64 56
%aD=bitcast i8*%aC to i32*
store i32 1,i32*%aD,align 4
%aE=load i8*,i8**%d,align 8
%aF=bitcast i8*%az to i8**
store i8*%aE,i8**%aF,align 8
call void@sml_raise(i8*inreg%az)#1
unreachable
}
define internal fastcc i8*@_SMLL11handleBlock_98(i8*inreg%a,i8*inreg%b)#4 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*%b,i8**%c,align 8
%e=bitcast i8*%a to i32*
%f=load i32,i32*%e,align 4
%g=call i8*@sml_alloc(i32 inreg 20)#0
%h=getelementptr inbounds i8,i8*%g,i64 -4
%i=bitcast i8*%h to i32*
store i32 1342177296,i32*%i,align 4
store i8*%g,i8**%d,align 8
%j=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%k=bitcast i8*%g to i8**
store i8*%j,i8**%k,align 8
%l=getelementptr inbounds i8,i8*%g,i64 8
%m=bitcast i8*%l to i32*
store i32%f,i32*%m,align 4
%n=getelementptr inbounds i8,i8*%g,i64 16
%o=bitcast i8*%n to i32*
store i32 1,i32*%o,align 4
%p=call i8*@sml_alloc(i32 inreg 28)#0
%q=getelementptr inbounds i8,i8*%p,i64 -4
%r=bitcast i8*%q to i32*
store i32 1342177304,i32*%r,align 4
%s=load i8*,i8**%d,align 8
%t=bitcast i8*%p to i8**
store i8*%s,i8**%t,align 8
%u=getelementptr inbounds i8,i8*%p,i64 8
%v=bitcast i8*%u to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL11handleBlock_97 to void(...)*),void(...)**%v,align 8
%w=getelementptr inbounds i8,i8*%p,i64 16
%x=bitcast i8*%w to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL11handleBlock_97 to void(...)*),void(...)**%x,align 8
%y=getelementptr inbounds i8,i8*%p,i64 24
%z=bitcast i8*%y to i32*
store i32 -2147483647,i32*%z,align 4
ret i8*%p
}
define internal fastcc void@_SMLL7w__close_99(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%f,label%h
f:
%g=bitcast i8*%a to i32**
br label%k
h:
call void@sml_check(i32 inreg%d)
%i=bitcast i8**%c to i32***
%j=load i32**,i32***%i,align 8
br label%k
k:
%l=phi i32**[%j,%h],[%g,%f]
%m=load i32*,i32**%l,align 8
%n=load i32,i32*%m,align 4
%o=icmp eq i32%n,0
br i1%o,label%q,label%p
p:
ret void
q:
store i32 1,i32*%m,align 4
%r=load i8*,i8**%c,align 8
%s=getelementptr inbounds i8,i8*%r,i64 8
%t=bitcast i8*%s to i32*
%u=load i32,i32*%t,align 4
tail call fastcc void@_SMLFN13SMLSharp__OSIO5closeE(i32 inreg%u)
ret void
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_100(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
w:
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
%g=alloca i8*,align 8
%h=alloca i8*,align 8
%i=alloca i8*,align 8
%j=alloca i8*,align 8
%k=alloca i8*,align 8
%l=alloca i8*,align 8
%m=alloca i8*,align 8
%n=alloca i8*,align 8
%o=alloca i8*,align 8
%p=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
call void@llvm.gcroot(i8**%g,i8*null)#0
call void@llvm.gcroot(i8**%h,i8*null)#0
call void@llvm.gcroot(i8**%i,i8*null)#0
call void@llvm.gcroot(i8**%j,i8*null)#0
call void@llvm.gcroot(i8**%k,i8*null)#0
call void@llvm.gcroot(i8**%l,i8*null)#0
call void@llvm.gcroot(i8**%m,i8*null)#0
call void@llvm.gcroot(i8**%n,i8*null)#0
call void@llvm.gcroot(i8**%o,i8*null)#0
call void@llvm.gcroot(i8**%p,i8*null)#0
store i8*%a,i8**%i,align 8
store i8*%b,i8**%c,align 8
%q=load atomic i32,i32*@sml_check_flag unordered,align 4
%r=icmp eq i32%q,0
br i1%r,label%u,label%s
s:
call void@sml_check(i32 inreg%q)
%t=load i8*,i8**%c,align 8
br label%u
u:
%v=phi i8*[%t,%s],[%b,%w]
store i8*null,i8**%c,align 8
%x=getelementptr inbounds i8,i8*%v,i64 4
%y=bitcast i8*%x to i32*
%z=load i32,i32*%y,align 4
%A=getelementptr inbounds i8,i8*%v,i64 8
%B=bitcast i8*%A to i32*
%C=load i32,i32*%B,align 4
%D=getelementptr inbounds i8,i8*%v,i64 16
%E=bitcast i8*%D to i8**
%F=load i8*,i8**%E,align 8
store i8*%F,i8**%h,align 8
%G=call i8*@sml_alloc(i32 inreg 4)#0
%H=bitcast i8*%G to i32*
%I=getelementptr inbounds i8,i8*%G,i64 -4
%J=bitcast i8*%I to i32*
store i32 536870916,i32*%J,align 4
store i8*%G,i8**%j,align 8
store i32 0,i32*%H,align 4
%K=call i8*@sml_alloc(i32 inreg 20)#0
%L=getelementptr inbounds i8,i8*%K,i64 -4
%M=bitcast i8*%L to i32*
store i32 1342177296,i32*%M,align 4
%N=getelementptr inbounds i8,i8*%K,i64 12
%O=bitcast i8*%N to i32*
store i32 0,i32*%O,align 1
%P=load i8*,i8**%j,align 8
%Q=bitcast i8*%K to i8**
store i8*%P,i8**%Q,align 8
%R=getelementptr inbounds i8,i8*%K,i64 8
%S=bitcast i8*%R to i32*
store i32%C,i32*%S,align 4
%T=getelementptr inbounds i8,i8*%K,i64 16
%U=bitcast i8*%T to i32*
store i32 1,i32*%U,align 4
%V=call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_76(i8*inreg%K)
%W=getelementptr inbounds i8,i8*%V,i64 16
%X=bitcast i8*%W to i8**
%Y=load i8*,i8**%X,align 8
store i8*%Y,i8**%c,align 8
%Z=getelementptr inbounds i8,i8*%V,i64 8
%aa=bitcast i8*%Z to i8**
%ab=load i8*,i8**%aa,align 8
store i8*%ab,i8**%d,align 8
%ac=getelementptr inbounds i8,i8*%V,i64 24
%ad=bitcast i8*%ac to i8**
%ae=load i8*,i8**%ad,align 8
store i8*%ae,i8**%e,align 8
%af=bitcast i8*%V to i8**
%ag=load i8*,i8**%af,align 8
store i8*%ag,i8**%f,align 8
%ah=getelementptr inbounds i8,i8*%V,i64 32
%ai=bitcast i8*%ah to i8**
%aj=load i8*,i8**%ai,align 8
store i8*%aj,i8**%g,align 8
%ak=call i8*@sml_alloc(i32 inreg 12)#0
%al=getelementptr inbounds i8,i8*%ak,i64 -4
%am=bitcast i8*%al to i32*
store i32 1342177288,i32*%am,align 4
store i8*%ak,i8**%k,align 8
%an=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%ao=bitcast i8*%ak to i8**
store i8*%an,i8**%ao,align 8
%ap=getelementptr inbounds i8,i8*%ak,i64 8
%aq=bitcast i8*%ap to i32*
store i32 1,i32*%aq,align 4
%ar=call i8*@sml_alloc(i32 inreg 28)#0
%as=getelementptr inbounds i8,i8*%ar,i64 -4
%at=bitcast i8*%as to i32*
store i32 1342177304,i32*%at,align 4
%au=load i8*,i8**%k,align 8
%av=bitcast i8*%ar to i8**
store i8*%au,i8**%av,align 8
%aw=getelementptr inbounds i8,i8*%ar,i64 8
%ax=bitcast i8*%aw to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLL6incPos_91 to void(...)*),void(...)**%ax,align 8
%ay=getelementptr inbounds i8,i8*%ar,i64 16
%az=bitcast i8*%ay to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6incPos_142 to void(...)*),void(...)**%az,align 8
%aA=getelementptr inbounds i8,i8*%ar,i64 24
%aB=bitcast i8*%aA to i32*
store i32 -2147483647,i32*%aB,align 4
%aC=bitcast i8**%i to i8***
%aD=load i8**,i8***%aC,align 8
%aE=load i8*,i8**%aD,align 8
store i8*%aE,i8**%c,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
store i8*%aF,i8**%l,align 8
%aI=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%aJ=bitcast i8*%aF to i8**
store i8*%aI,i8**%aJ,align 8
%aK=load i8*,i8**%k,align 8
%aL=getelementptr inbounds i8,i8*%aF,i64 8
%aM=bitcast i8*%aL to i8**
store i8*%aK,i8**%aM,align 8
%aN=getelementptr inbounds i8,i8*%aF,i64 16
%aO=bitcast i8*%aN to i32*
store i32 3,i32*%aO,align 4
%aP=call i8*@sml_alloc(i32 inreg 28)#0
%aQ=getelementptr inbounds i8,i8*%aP,i64 -4
%aR=bitcast i8*%aQ to i32*
store i32 1342177304,i32*%aR,align 4
store i8*%aP,i8**%m,align 8
%aS=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%aT=bitcast i8*%aP to i8**
store i8*%aS,i8**%aT,align 8
%aU=getelementptr inbounds i8,i8*%aP,i64 8
%aV=bitcast i8*%aU to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLL4putV_92 to void(...)*),void(...)**%aV,align 8
%aW=getelementptr inbounds i8,i8*%aP,i64 16
%aX=bitcast i8*%aW to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL4putV_143 to void(...)*),void(...)**%aX,align 8
%aY=getelementptr inbounds i8,i8*%aP,i64 24
%aZ=bitcast i8*%aY to i32*
store i32 -2147483647,i32*%aZ,align 4
%a0=load i8**,i8***%aC,align 8
%a1=load i8*,i8**%a0,align 8
store i8*%a1,i8**%c,align 8
%a2=call i8*@sml_alloc(i32 inreg 20)#0
%a3=getelementptr inbounds i8,i8*%a2,i64 -4
%a4=bitcast i8*%a3 to i32*
store i32 1342177296,i32*%a4,align 4
store i8*%a2,i8**%l,align 8
%a5=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%a6=bitcast i8*%a2 to i8**
store i8*%a5,i8**%a6,align 8
%a7=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%a8=getelementptr inbounds i8,i8*%a2,i64 8
%a9=bitcast i8*%a8 to i8**
store i8*%a7,i8**%a9,align 8
%ba=getelementptr inbounds i8,i8*%a2,i64 16
%bb=bitcast i8*%ba to i32*
store i32 3,i32*%bb,align 4
%bc=call i8*@sml_alloc(i32 inreg 28)#0
%bd=getelementptr inbounds i8,i8*%bc,i64 -4
%be=bitcast i8*%bd to i32*
store i32 1342177304,i32*%be,align 4
store i8*%bc,i8**%k,align 8
%bf=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%bg=bitcast i8*%bc to i8**
store i8*%bf,i8**%bg,align 8
%bh=getelementptr inbounds i8,i8*%bc,i64 8
%bi=bitcast i8*%bh to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLL4putA_93 to void(...)*),void(...)**%bi,align 8
%bj=getelementptr inbounds i8,i8*%bc,i64 16
%bk=bitcast i8*%bj to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL4putA_144 to void(...)*),void(...)**%bk,align 8
%bl=getelementptr inbounds i8,i8*%bc,i64 24
%bm=bitcast i8*%bl to i32*
store i32 -2147483647,i32*%bm,align 4
%bn=call i8*@sml_alloc(i32 inreg 20)#0
%bo=getelementptr inbounds i8,i8*%bn,i64 -4
%bp=bitcast i8*%bo to i32*
store i32 1342177296,i32*%bp,align 4
store i8*%bn,i8**%l,align 8
%bq=load i8*,i8**%j,align 8
%br=bitcast i8*%bn to i8**
store i8*%bq,i8**%br,align 8
%bs=getelementptr inbounds i8,i8*%bn,i64 8
%bt=bitcast i8*%bs to i32*
store i32%C,i32*%bt,align 4
%bu=getelementptr inbounds i8,i8*%bn,i64 16
%bv=bitcast i8*%bu to i32*
store i32 1,i32*%bv,align 4
%bw=call i8*@sml_alloc(i32 inreg 28)#0
%bx=getelementptr inbounds i8,i8*%bw,i64 -4
%by=bitcast i8*%bx to i32*
store i32 1342177304,i32*%by,align 4
%bz=load i8*,i8**%l,align 8
%bA=bitcast i8*%bw to i8**
store i8*%bz,i8**%bA,align 8
%bB=getelementptr inbounds i8,i8*%bw,i64 8
%bC=bitcast i8*%bB to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL5write_96 to void(...)*),void(...)**%bC,align 8
%bD=getelementptr inbounds i8,i8*%bw,i64 16
%bE=bitcast i8*%bD to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL5write_96 to void(...)*),void(...)**%bE,align 8
%bF=getelementptr inbounds i8,i8*%bw,i64 24
%bG=bitcast i8*%bF to i32*
store i32 -2147483647,i32*%bG,align 4
%bH=load i8*,i8**%i,align 8
%bI=getelementptr inbounds i8,i8*%bH,i64 8
%bJ=bitcast i8*%bI to i32*
%bK=load i32,i32*%bJ,align 4
%bL=call i8*@sml_alloc(i32 inreg 12)#0
%bM=bitcast i8*%bL to i32*
%bN=getelementptr inbounds i8,i8*%bL,i64 -4
%bO=bitcast i8*%bN to i32*
store i32 1342177288,i32*%bO,align 4
store i8*%bL,i8**%n,align 8
store i32%bK,i32*%bM,align 4
%bP=getelementptr inbounds i8,i8*%bL,i64 8
%bQ=bitcast i8*%bP to i32*
store i32 0,i32*%bQ,align 4
%bR=call i8*@sml_alloc(i32 inreg 28)#0
%bS=getelementptr inbounds i8,i8*%bR,i64 -4
%bT=bitcast i8*%bS to i32*
store i32 1342177304,i32*%bT,align 4
%bU=load i8*,i8**%n,align 8
%bV=bitcast i8*%bR to i8**
store i8*%bU,i8**%bV,align 8
%bW=getelementptr inbounds i8,i8*%bR,i64 8
%bX=bitcast i8*%bW to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL11handleBlock_98 to void(...)*),void(...)**%bX,align 8
%bY=getelementptr inbounds i8,i8*%bR,i64 16
%bZ=bitcast i8*%bY to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL11handleBlock_98 to void(...)*),void(...)**%bZ,align 8
%b0=getelementptr inbounds i8,i8*%bR,i64 24
%b1=bitcast i8*%b0 to i32*
store i32 -2147483647,i32*%b1,align 4
%b2=call i8*@sml_alloc(i32 inreg 20)#0
%b3=getelementptr inbounds i8,i8*%b2,i64 -4
%b4=bitcast i8*%b3 to i32*
store i32 1342177296,i32*%b4,align 4
store i8*%b2,i8**%c,align 8
%b5=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%b6=bitcast i8*%b2 to i8**
store i8*%b5,i8**%b6,align 8
%b7=getelementptr inbounds i8,i8*%b2,i64 8
%b8=bitcast i8*%b7 to i32*
store i32%C,i32*%b8,align 4
%b9=getelementptr inbounds i8,i8*%b2,i64 16
%ca=bitcast i8*%b9 to i32*
store i32 1,i32*%ca,align 4
%cb=call i8*@sml_alloc(i32 inreg 28)#0
%cc=getelementptr inbounds i8,i8*%cb,i64 -4
%cd=bitcast i8*%cc to i32*
store i32 1342177304,i32*%cd,align 4
store i8*%cb,i8**%j,align 8
%ce=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%cf=bitcast i8*%cb to i8**
store i8*%ce,i8**%cf,align 8
%cg=getelementptr inbounds i8,i8*%cb,i64 8
%ch=bitcast i8*%cg to void(...)**
store void(...)*bitcast(void(i8*,i32)*@_SMLL7w__close_99 to void(...)*),void(...)**%ch,align 8
%ci=getelementptr inbounds i8,i8*%cb,i64 16
%cj=bitcast i8*%ci to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL7w__close_146 to void(...)*),void(...)**%cj,align 8
%ck=getelementptr inbounds i8,i8*%cb,i64 24
%cl=bitcast i8*%ck to i32*
store i32 -2147483647,i32*%cl,align 4
%cm=load i8**,i8***%aC,align 8
store i8*null,i8**%i,align 8
%cn=load i8*,i8**%cm,align 8
%co=getelementptr inbounds i8,i8*%cn,i64 16
%cp=bitcast i8*%co to i8**
%cq=load i8*,i8**%cp,align 8
%cr=getelementptr inbounds i8,i8*%cq,i64 16
%cs=bitcast i8*%cr to i8*(i8*,i8*)**
%ct=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%cs,align 8
%cu=bitcast i8*%cq to i8**
%cv=load i8*,i8**%cu,align 8
store i8*%cv,i8**%p,align 8
%cw=call i8*@sml_alloc(i32 inreg 20)#0
%cx=getelementptr inbounds i8,i8*%cw,i64 -4
%cy=bitcast i8*%cx to i32*
store i32 1342177296,i32*%cy,align 4
%cz=getelementptr inbounds i8,i8*%cw,i64 12
%cA=bitcast i8*%cz to i32*
store i32 0,i32*%cA,align 1
%cB=load i8*,i8**%m,align 8
%cC=bitcast i8*%cw to i8**
store i8*%cB,i8**%cC,align 8
%cD=getelementptr inbounds i8,i8*%cw,i64 8
%cE=bitcast i8*%cD to i32*
store i32 1,i32*%cE,align 4
%cF=getelementptr inbounds i8,i8*%cw,i64 16
%cG=bitcast i8*%cF to i32*
store i32 1,i32*%cG,align 4
%cH=load i8*,i8**%l,align 8
%cI=call fastcc i8*@_SMLL5write_96(i8*inreg%cH,i8*inreg%cw)
store i8*%cI,i8**%c,align 8
%cJ=call i8*@sml_alloc(i32 inreg 12)#0
%cK=getelementptr inbounds i8,i8*%cJ,i64 -4
%cL=bitcast i8*%cK to i32*
store i32 1342177288,i32*%cL,align 4
store i8*%cJ,i8**%i,align 8
%cM=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%cN=bitcast i8*%cJ to i8**
store i8*%cM,i8**%cN,align 8
%cO=getelementptr inbounds i8,i8*%cJ,i64 8
%cP=bitcast i8*%cO to i32*
store i32 1,i32*%cP,align 4
%cQ=call i8*@sml_alloc(i32 inreg 20)#0
%cR=getelementptr inbounds i8,i8*%cQ,i64 -4
%cS=bitcast i8*%cR to i32*
store i32 1342177296,i32*%cS,align 4
%cT=getelementptr inbounds i8,i8*%cQ,i64 12
%cU=bitcast i8*%cT to i32*
store i32 0,i32*%cU,align 1
%cV=load i8*,i8**%k,align 8
%cW=bitcast i8*%cQ to i8**
store i8*%cV,i8**%cW,align 8
%cX=getelementptr inbounds i8,i8*%cQ,i64 8
%cY=bitcast i8*%cX to i32*
store i32 1,i32*%cY,align 4
%cZ=getelementptr inbounds i8,i8*%cQ,i64 16
%c0=bitcast i8*%cZ to i32*
store i32 1,i32*%c0,align 4
%c1=load i8*,i8**%l,align 8
%c2=call fastcc i8*@_SMLL5write_96(i8*inreg%c1,i8*inreg%cQ)
store i8*%c2,i8**%c,align 8
%c3=call i8*@sml_alloc(i32 inreg 12)#0
%c4=getelementptr inbounds i8,i8*%c3,i64 -4
%c5=bitcast i8*%c4 to i32*
store i32 1342177288,i32*%c5,align 4
store i8*%c3,i8**%o,align 8
%c6=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%c7=bitcast i8*%c3 to i8**
store i8*%c6,i8**%c7,align 8
%c8=getelementptr inbounds i8,i8*%c3,i64 8
%c9=bitcast i8*%c8 to i32*
store i32 1,i32*%c9,align 4
%da=call i8*@sml_alloc(i32 inreg 20)#0
%db=getelementptr inbounds i8,i8*%da,i64 -4
%dc=bitcast i8*%db to i32*
store i32 1342177296,i32*%dc,align 4
%dd=getelementptr inbounds i8,i8*%da,i64 12
%de=bitcast i8*%dd to i32*
store i32 0,i32*%de,align 1
%df=load i8*,i8**%m,align 8
store i8*null,i8**%m,align 8
%dg=bitcast i8*%da to i8**
store i8*%df,i8**%dg,align 8
%dh=getelementptr inbounds i8,i8*%da,i64 8
%di=bitcast i8*%dh to i32*
store i32 0,i32*%di,align 4
%dj=getelementptr inbounds i8,i8*%da,i64 16
%dk=bitcast i8*%dj to i32*
store i32 1,i32*%dk,align 4
%dl=load i8*,i8**%l,align 8
%dm=call fastcc i8*@_SMLL5write_96(i8*inreg%dl,i8*inreg%da)
%dn=load i8*,i8**%n,align 8
%do=call fastcc i8*@_SMLL11handleBlock_98(i8*inreg%dn,i8*inreg%dm)
store i8*%do,i8**%c,align 8
%dp=call i8*@sml_alloc(i32 inreg 12)#0
%dq=getelementptr inbounds i8,i8*%dp,i64 -4
%dr=bitcast i8*%dq to i32*
store i32 1342177288,i32*%dr,align 4
store i8*%dp,i8**%m,align 8
%ds=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%dt=bitcast i8*%dp to i8**
store i8*%ds,i8**%dt,align 8
%du=getelementptr inbounds i8,i8*%dp,i64 8
%dv=bitcast i8*%du to i32*
store i32 1,i32*%dv,align 4
%dw=call i8*@sml_alloc(i32 inreg 20)#0
%dx=getelementptr inbounds i8,i8*%dw,i64 -4
%dy=bitcast i8*%dx to i32*
store i32 1342177296,i32*%dy,align 4
%dz=getelementptr inbounds i8,i8*%dw,i64 12
%dA=bitcast i8*%dz to i32*
store i32 0,i32*%dA,align 1
%dB=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%dC=bitcast i8*%dw to i8**
store i8*%dB,i8**%dC,align 8
%dD=getelementptr inbounds i8,i8*%dw,i64 8
%dE=bitcast i8*%dD to i32*
store i32 0,i32*%dE,align 4
%dF=getelementptr inbounds i8,i8*%dw,i64 16
%dG=bitcast i8*%dF to i32*
store i32 1,i32*%dG,align 4
%dH=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%dI=call fastcc i8*@_SMLL5write_96(i8*inreg%dH,i8*inreg%dw)
%dJ=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%dK=call fastcc i8*@_SMLL11handleBlock_98(i8*inreg%dJ,i8*inreg%dI)
store i8*%dK,i8**%c,align 8
%dL=call i8*@sml_alloc(i32 inreg 12)#0
%dM=getelementptr inbounds i8,i8*%dL,i64 -4
%dN=bitcast i8*%dM to i32*
store i32 1342177288,i32*%dN,align 4
store i8*%dL,i8**%k,align 8
%dO=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%dP=bitcast i8*%dL to i8**
store i8*%dO,i8**%dP,align 8
%dQ=getelementptr inbounds i8,i8*%dL,i64 8
%dR=bitcast i8*%dQ to i32*
store i32 1,i32*%dR,align 4
%dS=call i8*@sml_alloc(i32 inreg 12)#0
%dT=getelementptr inbounds i8,i8*%dS,i64 -4
%dU=bitcast i8*%dT to i32*
store i32 1342177288,i32*%dU,align 4
store i8*%dS,i8**%c,align 8
%dV=getelementptr inbounds i8,i8*%dS,i64 4
%dW=bitcast i8*%dV to i32*
store i32 0,i32*%dW,align 1
%dX=bitcast i8*%dS to i32*
store i32%C,i32*%dX,align 4
%dY=getelementptr inbounds i8,i8*%dS,i64 8
%dZ=bitcast i8*%dY to i32*
store i32 0,i32*%dZ,align 4
%d0=call i8*@sml_alloc(i32 inreg 116)#0
%d1=getelementptr inbounds i8,i8*%d0,i64 -4
%d2=bitcast i8*%d1 to i32*
store i32 1342177392,i32*%d2,align 4
%d3=getelementptr inbounds i8,i8*%d0,i64 16
%d4=bitcast i8*%d3 to i32*
call void@llvm.memset.p0i8.i64(i8*%d0,i8 0,i64 24,i1 false)
store i32%z,i32*%d4,align 4
%d5=load i8*,i8**%j,align 8
%d6=getelementptr inbounds i8,i8*%d0,i64 24
%d7=bitcast i8*%d6 to i8**
store i8*%d5,i8**%d7,align 8
%d8=load i8*,i8**%f,align 8
%d9=getelementptr inbounds i8,i8*%d0,i64 32
%ea=bitcast i8*%d9 to i8**
store i8*%d8,i8**%ea,align 8
%eb=load i8*,i8**%d,align 8
%ec=getelementptr inbounds i8,i8*%d0,i64 40
%ed=bitcast i8*%ec to i8**
store i8*%eb,i8**%ed,align 8
%ee=load i8*,i8**%c,align 8
%ef=getelementptr inbounds i8,i8*%d0,i64 48
%eg=bitcast i8*%ef to i8**
store i8*%ee,i8**%eg,align 8
%eh=load i8*,i8**%h,align 8
%ei=getelementptr inbounds i8,i8*%d0,i64 56
%ej=bitcast i8*%ei to i8**
store i8*%eh,i8**%ej,align 8
%ek=load i8*,i8**%e,align 8
%el=getelementptr inbounds i8,i8*%d0,i64 64
%em=bitcast i8*%el to i8**
store i8*%ek,i8**%em,align 8
%en=load i8*,i8**%g,align 8
%eo=getelementptr inbounds i8,i8*%d0,i64 72
%ep=bitcast i8*%eo to i8**
store i8*%en,i8**%ep,align 8
%eq=load i8*,i8**%o,align 8
%er=getelementptr inbounds i8,i8*%d0,i64 80
%es=bitcast i8*%er to i8**
store i8*%eq,i8**%es,align 8
%et=load i8*,i8**%k,align 8
%eu=getelementptr inbounds i8,i8*%d0,i64 88
%ev=bitcast i8*%eu to i8**
store i8*%et,i8**%ev,align 8
%ew=load i8*,i8**%i,align 8
%ex=getelementptr inbounds i8,i8*%d0,i64 96
%ey=bitcast i8*%ex to i8**
store i8*%ew,i8**%ey,align 8
%ez=load i8*,i8**%m,align 8
%eA=getelementptr inbounds i8,i8*%d0,i64 104
%eB=bitcast i8*%eA to i8**
store i8*%ez,i8**%eB,align 8
%eC=getelementptr inbounds i8,i8*%d0,i64 112
%eD=bitcast i8*%eC to i32*
store i32 16379,i32*%eD,align 4
store i8*null,i8**%c,align 8
store i8*null,i8**%d,align 8
store i8*%d5,i8**%e,align 8
store i8*%eb,i8**%g,align 8
store i8*%ee,i8**%h,align 8
store i8*%eh,i8**%i,align 8
store i8*%ek,i8**%j,align 8
store i8*%en,i8**%k,align 8
store i8*%eq,i8**%l,align 8
store i8*%et,i8**%m,align 8
store i8*%ew,i8**%n,align 8
store i8*%ez,i8**%o,align 8
%eE=call i8*@sml_alloc(i32 inreg 116)#0
%eF=getelementptr inbounds i8,i8*%eE,i64 -4
%eG=bitcast i8*%eF to i32*
store i32 1342177392,i32*%eG,align 4
%eH=getelementptr inbounds i8,i8*%eE,i64 20
%eI=bitcast i8*%eH to i32*
store i32 0,i32*%eI,align 1
%eJ=load i8*,i8**%c,align 8
%eK=bitcast i8*%eE to i8**
store i8*%eJ,i8**%eK,align 8
%eL=load i8*,i8**%d,align 8
%eM=getelementptr inbounds i8,i8*%eE,i64 8
%eN=bitcast i8*%eM to i8**
store i8*%eL,i8**%eN,align 8
%eO=getelementptr inbounds i8,i8*%eE,i64 16
%eP=bitcast i8*%eO to i32*
store i32%z,i32*%eP,align 4
%eQ=load i8*,i8**%e,align 8
%eR=getelementptr inbounds i8,i8*%eE,i64 24
%eS=bitcast i8*%eR to i8**
store i8*%eQ,i8**%eS,align 8
%eT=load i8*,i8**%f,align 8
%eU=getelementptr inbounds i8,i8*%eE,i64 32
%eV=bitcast i8*%eU to i8**
store i8*%eT,i8**%eV,align 8
%eW=load i8*,i8**%g,align 8
%eX=getelementptr inbounds i8,i8*%eE,i64 40
%eY=bitcast i8*%eX to i8**
store i8*%eW,i8**%eY,align 8
%eZ=load i8*,i8**%h,align 8
%e0=getelementptr inbounds i8,i8*%eE,i64 48
%e1=bitcast i8*%e0 to i8**
store i8*%eZ,i8**%e1,align 8
%e2=load i8*,i8**%i,align 8
%e3=getelementptr inbounds i8,i8*%eE,i64 56
%e4=bitcast i8*%e3 to i8**
store i8*%e2,i8**%e4,align 8
%e5=load i8*,i8**%j,align 8
%e6=getelementptr inbounds i8,i8*%eE,i64 64
%e7=bitcast i8*%e6 to i8**
store i8*%e5,i8**%e7,align 8
%e8=load i8*,i8**%k,align 8
%e9=getelementptr inbounds i8,i8*%eE,i64 72
%fa=bitcast i8*%e9 to i8**
store i8*%e8,i8**%fa,align 8
%fb=load i8*,i8**%l,align 8
%fc=getelementptr inbounds i8,i8*%eE,i64 80
%fd=bitcast i8*%fc to i8**
store i8*%fb,i8**%fd,align 8
%fe=load i8*,i8**%m,align 8
%ff=getelementptr inbounds i8,i8*%eE,i64 88
%fg=bitcast i8*%ff to i8**
store i8*%fe,i8**%fg,align 8
%fh=load i8*,i8**%n,align 8
%fi=getelementptr inbounds i8,i8*%eE,i64 96
%fj=bitcast i8*%fi to i8**
store i8*%fh,i8**%fj,align 8
%fk=load i8*,i8**%o,align 8
%fl=getelementptr inbounds i8,i8*%eE,i64 104
%fm=bitcast i8*%fl to i8**
store i8*%fk,i8**%fm,align 8
%fn=getelementptr inbounds i8,i8*%eE,i64 112
%fo=bitcast i8*%fn to i32*
store i32 16379,i32*%fo,align 4
%fp=load i8*,i8**%p,align 8
%fq=tail call fastcc i8*%ct(i8*inreg%fp,i8*inreg%eE)
ret i8*%fq
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101(i8*inreg%a,i8*inreg%b)#4 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*%b,i8**%c,align 8
%e=bitcast i8*%a to i32*
%f=load i32,i32*%e,align 4
%g=call i8*@sml_alloc(i32 inreg 20)#0
%h=getelementptr inbounds i8,i8*%g,i64 -4
%i=bitcast i8*%h to i32*
store i32 1342177296,i32*%i,align 4
store i8*%g,i8**%d,align 8
%j=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%k=bitcast i8*%g to i8**
store i8*%j,i8**%k,align 8
%l=getelementptr inbounds i8,i8*%g,i64 8
%m=bitcast i8*%l to i32*
store i32%f,i32*%m,align 4
%n=getelementptr inbounds i8,i8*%g,i64 16
%o=bitcast i8*%n to i32*
store i32 1,i32*%o,align 4
%p=call i8*@sml_alloc(i32 inreg 28)#0
%q=getelementptr inbounds i8,i8*%p,i64 -4
%r=bitcast i8*%q to i32*
store i32 1342177304,i32*%r,align 4
%s=load i8*,i8**%d,align 8
%t=bitcast i8*%p to i8**
store i8*%s,i8**%t,align 8
%u=getelementptr inbounds i8,i8*%p,i64 8
%v=bitcast i8*%u to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_100 to void(...)*),void(...)**%v,align 8
%w=getelementptr inbounds i8,i8*%p,i64 16
%x=bitcast i8*%w to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_100 to void(...)*),void(...)**%x,align 8
%y=getelementptr inbounds i8,i8*%p,i64 24
%z=bitcast i8*%y to i32*
store i32 -2147483647,i32*%z,align 4
ret i8*%p
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_102(i8*inreg%a)#2 gc"smlsharp"{
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*@_SMLFN15CharVectorSlice4baseE(i8*inreg%i)
store i8*%k,i8**%c,align 8
%l=getelementptr inbounds i8,i8*%k,i64 8
%m=bitcast i8*%l to i32*
%n=load i32,i32*%m,align 4
%o=bitcast i8*%k to i8**
%p=load i8*,i8**%o,align 8
%q=call fastcc i8*@_SMLFN4Byte13stringToBytesE(i8*inreg%p)
store i8*%q,i8**%b,align 8
%r=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%s=getelementptr inbounds i8,i8*%r,i64 12
%t=bitcast i8*%s to i32*
%u=load i32,i32*%t,align 4
%v=call i8*@sml_alloc(i32 inreg 12)#0
%w=getelementptr inbounds i8,i8*%v,i64 -4
%x=bitcast i8*%w to i32*
store i32 1342177288,i32*%x,align 4
store i8*%v,i8**%c,align 8
%y=getelementptr inbounds i8,i8*%v,i64 4
%z=bitcast i8*%y to i32*
store i32 0,i32*%z,align 1
%A=bitcast i8*%v to i32*
store i32%u,i32*%A,align 4
%B=getelementptr inbounds i8,i8*%v,i64 8
%C=bitcast i8*%B to i32*
store i32 0,i32*%C,align 4
%D=call i8*@sml_alloc(i32 inreg 28)#0
%E=getelementptr inbounds i8,i8*%D,i64 -4
%F=bitcast i8*%E to i32*
store i32 1342177304,i32*%F,align 4
%G=getelementptr inbounds i8,i8*%D,i64 12
%H=bitcast i8*%G to i32*
store i32 0,i32*%H,align 1
%I=load i8*,i8**%b,align 8
%J=bitcast i8*%D to i8**
store i8*%I,i8**%J,align 8
%K=getelementptr inbounds i8,i8*%D,i64 8
%L=bitcast i8*%K to i32*
store i32%n,i32*%L,align 4
%M=load i8*,i8**%c,align 8
%N=getelementptr inbounds i8,i8*%D,i64 16
%O=bitcast i8*%N to i8**
store i8*%M,i8**%O,align 8
%P=getelementptr inbounds i8,i8*%D,i64 24
%Q=bitcast i8*%P to i32*
store i32 5,i32*%Q,align 4
%R=tail call fastcc i8*@_SMLFN16Word8VectorSlice5sliceE(i8*inreg%D)
ret i8*%R
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_104(i8*inreg%a)#2 gc"smlsharp"{
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*@_SMLFN14CharArraySlice4baseE(i8*inreg%i)
%l=getelementptr inbounds i8,i8*%k,i64 8
%m=bitcast i8*%l to i32*
%n=load i32,i32*%m,align 4
%o=bitcast i8*%k to i8**
%p=load i8*,i8**%o,align 8
store i8*%p,i8**%b,align 8
%q=getelementptr inbounds i8,i8*%k,i64 12
%r=bitcast i8*%q to i32*
%s=load i32,i32*%r,align 4
%t=call i8*@sml_alloc(i32 inreg 12)#0
%u=getelementptr inbounds i8,i8*%t,i64 -4
%v=bitcast i8*%u to i32*
store i32 1342177288,i32*%v,align 4
store i8*%t,i8**%c,align 8
%w=getelementptr inbounds i8,i8*%t,i64 4
%x=bitcast i8*%w to i32*
store i32 0,i32*%x,align 1
%y=bitcast i8*%t to i32*
store i32%s,i32*%y,align 4
%z=getelementptr inbounds i8,i8*%t,i64 8
%A=bitcast i8*%z to i32*
store i32 0,i32*%A,align 4
%B=call i8*@sml_alloc(i32 inreg 28)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177304,i32*%D,align 4
%E=getelementptr inbounds i8,i8*%B,i64 12
%F=bitcast i8*%E to i32*
store i32 0,i32*%F,align 1
%G=load i8*,i8**%b,align 8
%H=bitcast i8*%B to i8**
store i8*%G,i8**%H,align 8
%I=getelementptr inbounds i8,i8*%B,i64 8
%J=bitcast i8*%I to i32*
store i32%n,i32*%J,align 4
%K=load i8*,i8**%c,align 8
%L=getelementptr inbounds i8,i8*%B,i64 16
%M=bitcast i8*%L to i8**
store i8*%K,i8**%M,align 8
%N=getelementptr inbounds i8,i8*%B,i64 24
%O=bitcast i8*%N to i32*
store i32 5,i32*%O,align 4
%P=tail call fastcc i8*@_SMLFN15Word8ArraySlice5sliceE(i8*inreg%B)
ret i8*%P
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_106(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_108(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_110(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_113(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_115(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_117(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_119(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_122(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define fastcc i32@_SMLFN23SMLSharp__SMLNJ__POSIX__IO5openfE(i8*inreg%a)local_unnamed_addr#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=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 0),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
%q=bitcast i8*%p to i32*
%r=load i32,i32*%q,align 4
ret i32%r
}
define fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE(i8*inreg%a)local_unnamed_addr#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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 1),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE(i8*inreg%a)local_unnamed_addr#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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 2),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE(i8*inreg%a)local_unnamed_addr#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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 3),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE(i8*inreg%a)local_unnamed_addr#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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[5x i8*]}>,<{[4x i8],i32,[5x i8*]}>*@_SML_gvardb25ec4de893a8c4_posix_io,i64 0,i32 2,i64 4),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define internal fastcc i8*@_SMLL6setPos_130(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
tail call fastcc void@_SMLL6setPos_71(i8*inreg%a,i32 inreg%d)
%e=tail call i8*@sml_alloc(i32 inreg 4)#0
%f=bitcast i8*%e to i32*
%g=getelementptr inbounds i8,i8*%e,i64 -4
%h=bitcast i8*%g to i32*
store i32 4,i32*%h,align 4
store i32 0,i32*%f,align 4
ret i8*%e
}
define internal fastcc i8*@_SMLL6endPos_131(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i32@_SMLL6endPos_73(i8*inreg%a,i32 inreg%d)
%f=tail call i8*@sml_alloc(i32 inreg 4)#0
%g=bitcast i8*%f to i32*
%h=getelementptr inbounds i8,i8*%f,i64 -4
%i=bitcast i8*%h to i32*
store i32 4,i32*%i,align 4
store i32%e,i32*%g,align 4
ret i8*%f
}
define internal fastcc i8*@_SMLL9verifyPos_132(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i32@_SMLL9verifyPos_74(i8*inreg%a,i32 inreg%d)
%f=tail call i8*@sml_alloc(i32 inreg 4)#0
%g=bitcast i8*%f to i32*
%h=getelementptr inbounds i8,i8*%f,i64 -4
%i=bitcast i8*%h to i32*
store i32 4,i32*%i,align 4
store i32%e,i32*%g,align 4
ret i8*%f
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_133(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%a to i32**
%d=load i32*,i32**%c,align 8
%e=load i32,i32*%d,align 4
%f=tail call i8*@sml_alloc(i32 inreg 4)#0
%g=bitcast i8*%f to i32*
%h=getelementptr inbounds i8,i8*%f,i64 -4
%i=bitcast i8*%h to i32*
store i32 4,i32*%i,align 4
store i32%e,i32*%g,align 4
ret i8*%f
}
define internal fastcc i8*@_SMLL6incPos_135(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
tail call fastcc void@_SMLL6incPos_78(i8*inreg%a,i32 inreg%d)
%e=tail call i8*@sml_alloc(i32 inreg 4)#0
%f=bitcast i8*%e to i32*
%g=getelementptr inbounds i8,i8*%e,i64 -4
%h=bitcast i8*%g to i32*
store i32 4,i32*%h,align 4
store i32 0,i32*%f,align 4
ret i8*%e
}
define internal fastcc i8*@_SMLL9r__readArr_136(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLL9r__readArr_79(i8*inreg%a,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*@_SMLL9blockWrap_137(i8*inreg%a,i8*inreg%b,i8*inreg%c,i8*inreg%d,i8*inreg%e)#4 gc"smlsharp"{
%f=bitcast i8*%b to i32*
%g=load i32,i32*%f,align 4
%h=bitcast i8*%c to i32*
%i=load i32,i32*%h,align 4
%j=bitcast i8*%d to i32*
%k=load i32,i32*%j,align 4
%l=bitcast i8*%e to i32*
%m=load i32,i32*%l,align 4
%n=tail call fastcc i8*@_SMLL9blockWrap_83(i8*inreg%a,i32 inreg%g,i32 inreg%i,i32 inreg%k,i32 inreg%m)
ret i8*%n
}
define internal fastcc i8*@_SMLL7r__close_138(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
tail call fastcc void@_SMLL7r__close_84(i8*inreg%a,i32 inreg%d)
%e=tail call i8*@sml_alloc(i32 inreg 4)#0
%f=bitcast i8*%e to i32*
%g=getelementptr inbounds i8,i8*%e,i64 -4
%h=bitcast i8*%g to i32*
store i32 4,i32*%h,align 4
store i32 0,i32*%f,align 4
ret i8*%e
}
define internal fastcc i8*@_SMLL5avail_139(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLL5avail_86(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_140(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_87(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLL6incPos_142(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i32@_SMLL6incPos_91(i8*inreg%a,i32 inreg%d)
%f=tail call i8*@sml_alloc(i32 inreg 4)#0
%g=bitcast i8*%f to i32*
%h=getelementptr inbounds i8,i8*%f,i64 -4
%i=bitcast i8*%h to i32*
store i32 4,i32*%i,align 4
store i32%e,i32*%g,align 4
ret i8*%f
}
define internal fastcc i8*@_SMLL4putV_143(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLL4putV_92(i8*inreg%a,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*@_SMLL4putA_144(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLL4putA_93(i8*inreg%a,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*@_SMLL5write_145(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLL5write_95(i8*inreg%a,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*@_SMLL7w__close_146(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
tail call fastcc void@_SMLL7w__close_99(i8*inreg%a,i32 inreg%d)
%e=tail call i8*@sml_alloc(i32 inreg 4)#0
%f=bitcast i8*%e to i32*
%g=getelementptr inbounds i8,i8*%e,i64 -4
%h=bitcast i8*%g to i32*
store i32 4,i32*%h,align 4
store i32 0,i32*%f,align 4
ret i8*%e
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_147(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_102(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_148(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_104(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_149(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_150(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_151(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_152(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_153(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_154(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_155(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_156(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
declare void@llvm.memset.p0i8.i64(i8*,i8,i64,i1)#0
attributes#0={nounwind}
attributes#1={noreturn}
attributes#2={uwtable}
attributes#3={noreturn nounwind}
attributes#4={nounwind uwtable}
