@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,i32,[4x i8],i32}><{[4x i8]zeroinitializer,i32 -805306360,i32 0,[4x i8]zeroinitializer,i32 0}>,align 8
@g=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
@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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_104 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_149 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_106 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_150 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_108 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_151 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_110 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_152 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_112 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_153 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_115 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_154 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_117 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_155 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_119 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_156 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_121 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_157 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_124 to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_158 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_103 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*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_103 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*@_SMLLLN23SMLSharp__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*@_SMLLLN23SMLSharp__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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_103(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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_103(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 i32@_SMLLL6getPos_69(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 void@_SMLLL6setPos_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=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:
%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]}>*@d,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
store i8*%K,i8**%d,align 8
store i8*null,i8**%c,align 8
%L=getelementptr inbounds i8,i8*%j,i64 16
%M=bitcast i8*%L to i32*
%N=load i32,i32*%M,align 4
%O=load i32,i32*@_SMLZN13SMLSharp__OSIO8SEEK__SETE,align 4
%P=call i8*@sml_alloc(i32 inreg 20)#0
%Q=bitcast i8*%P to i32*
%R=getelementptr inbounds i8,i8*%P,i64 -4
%S=bitcast i8*%R to i32*
store i32 1342177296,i32*%S,align 4
%T=getelementptr inbounds i8,i8*%P,i64 12
%U=bitcast i8*%T to i32*
store i32 0,i32*%U,align 1
store i32%N,i32*%Q,align 4
%V=getelementptr inbounds i8,i8*%P,i64 4
%W=bitcast i8*%V to i32*
store i32%b,i32*%W,align 4
%X=getelementptr inbounds i8,i8*%P,i64 8
%Y=bitcast i8*%X to i32*
store i32%O,i32*%Y,align 4
%Z=getelementptr inbounds i8,i8*%P,i64 16
%aa=bitcast i8*%Z to i32*
store i32 0,i32*%aa,align 4
%ab=call fastcc i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg%P)
%ac=bitcast i8**%d to i32**
%ad=load i32*,i32**%ac,align 8
store i32%ab,i32*%ad,align 4
ret void
}
define internal fastcc i32@_SMLLL6endPos_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 4
%o=icmp eq i32%n,0
br i1%o,label%H,label%p
p:
%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]}>*@e,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:
store i8*null,i8**%c,align 8
%I=getelementptr inbounds i8,i8*%j,i64 8
%J=bitcast i8*%I to i32*
%K=load i32,i32*%J,align 4
%L=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%K)
%M=tail call fastcc i32@_SMLFN13SMLSharp__OSIO2ST4sizeE(i8*inreg%L)
ret i32%M
}
define internal fastcc i32@_SMLLL9verifyPos_74(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=getelementptr inbounds i8,i8*%i,i64 8
%l=bitcast i8*%k to i32*
%m=load i32,i32*%l,align 4
%n=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%o=load i32,i32*@_SMLZN13SMLSharp__OSIO8SEEK__CURE,align 4
%p=call i8*@sml_alloc(i32 inreg 20)#0
%q=bitcast i8*%p to i32*
%r=getelementptr inbounds i8,i8*%p,i64 -4
%s=bitcast i8*%r to i32*
store i32 1342177296,i32*%s,align 4
%t=getelementptr inbounds i8,i8*%p,i64 12
%u=bitcast i8*%t to i32*
store i32 0,i32*%u,align 1
store i32%m,i32*%q,align 4
%v=getelementptr inbounds i8,i8*%p,i64 4
%w=bitcast i8*%v to i32*
store i32%n,i32*%w,align 4
%x=getelementptr inbounds i8,i8*%p,i64 8
%y=bitcast i8*%x to i32*
store i32%o,i32*%y,align 4
%z=getelementptr inbounds i8,i8*%p,i64 16
%A=bitcast i8*%z to i32*
store i32 0,i32*%A,align 4
%B=call fastcc i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg%p)
%C=bitcast i8**%c to i32***
%D=load i32**,i32***%C,align 8
%E=load i32*,i32**%D,align 8
store i32%B,i32*%E,align 4
ret i32%B
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_75(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=bitcast i8*%m to i8**
%p=load i8*,i8**%o,align 8
store i8*%p,i8**%b,align 8
%q=getelementptr inbounds i8,i8*%m,i64 8
%r=bitcast i8*%q to i32*
%s=load i32,i32*%r,align 4
%t=call fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%s)
%u=call fastcc i32@_SMLFN13SMLSharp__OSIO2ST5isRegE(i8*inreg%t)
%v=icmp eq i32%u,0
br i1%v,label%b7,label%w
w:
%x=call i8*@sml_alloc(i32 inreg 4)#0
%y=getelementptr inbounds i8,i8*%x,i64 -4
%z=bitcast i8*%y to i32*
store i32 536870916,i32*%z,align 4
store i8*%x,i8**%c,align 8
%A=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%B=bitcast i8**%c to i32**
%C=load i32*,i32**%B,align 8
store i32%A,i32*%C,align 4
%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**%d,align 8
%G=load i8*,i8**%c,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
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=getelementptr inbounds i8,i8*%K,i64 8
%Q=bitcast i8*%P to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLLL6getPos_69 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*)*@_SMLLL6getPos_132 to void(...)*),void(...)**%S,align 8
%T=getelementptr inbounds i8,i8*%K,i64 24
%U=bitcast i8*%T to i32*
store i32 -2147483647,i32*%U,align 4
%V=call i8*@sml_alloc(i32 inreg 28)#0
%W=getelementptr inbounds i8,i8*%V,i64 -4
%X=bitcast i8*%W to i32*
store i32 1342177304,i32*%X,align 4
store i8*%V,i8**%d,align 8
%Y=load i8*,i8**%b,align 8
%Z=bitcast i8*%V to i8**
store i8*%Y,i8**%Z,align 8
%aa=load i8*,i8**%c,align 8
%ab=getelementptr inbounds i8,i8*%V,i64 8
%ac=bitcast i8*%ab to i8**
store i8*%aa,i8**%ac,align 8
%ad=getelementptr inbounds i8,i8*%V,i64 16
%ae=bitcast i8*%ad to i32*
store i32%s,i32*%ae,align 4
%af=getelementptr inbounds i8,i8*%V,i64 24
%ag=bitcast i8*%af to i32*
store i32 3,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**%f,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(void(i8*,i32)*@_SMLLL6setPos_71 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*)*@_SMLLL6setPos_133 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**%b,align 8
store i8*null,i8**%b,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%s,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**%b,align 8
%aE=load i8*,i8**%d,align 8
store i8*null,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)*@_SMLLL6endPos_73 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*)*@_SMLLL6endPos_134 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
%aM=call i8*@sml_alloc(i32 inreg 20)#0
%aN=getelementptr inbounds i8,i8*%aM,i64 -4
%aO=bitcast i8*%aN to i32*
store i32 1342177296,i32*%aO,align 4
store i8*%aM,i8**%d,align 8
%aP=load i8*,i8**%c,align 8
%aQ=bitcast i8*%aM to i8**
store i8*%aP,i8**%aQ,align 8
%aR=getelementptr inbounds i8,i8*%aM,i64 8
%aS=bitcast i8*%aR to i32*
store i32%s,i32*%aS,align 4
%aT=getelementptr inbounds i8,i8*%aM,i64 16
%aU=bitcast i8*%aT to i32*
store i32 1,i32*%aU,align 4
%aV=call i8*@sml_alloc(i32 inreg 28)#0
%aW=getelementptr inbounds i8,i8*%aV,i64 -4
%aX=bitcast i8*%aW to i32*
store i32 1342177304,i32*%aX,align 4
store i8*%aV,i8**%g,align 8
%aY=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%aZ=bitcast i8*%aV to i8**
store i8*%aY,i8**%aZ,align 8
%a0=getelementptr inbounds i8,i8*%aV,i64 8
%a1=bitcast i8*%a0 to void(...)**
store void(...)*bitcast(i32(i8*,i32)*@_SMLLL9verifyPos_74 to void(...)*),void(...)**%a1,align 8
%a2=getelementptr inbounds i8,i8*%aV,i64 16
%a3=bitcast i8*%a2 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLL9verifyPos_135 to void(...)*),void(...)**%a3,align 8
%a4=getelementptr inbounds i8,i8*%aV,i64 24
%a5=bitcast i8*%a4 to i32*
store i32 -2147483647,i32*%a5,align 4
%a6=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%a7=load i32,i32*@_SMLZN13SMLSharp__OSIO8SEEK__CURE,align 4
%a8=call i8*@sml_alloc(i32 inreg 20)#0
%a9=bitcast i8*%a8 to i32*
%ba=getelementptr inbounds i8,i8*%a8,i64 -4
%bb=bitcast i8*%ba to i32*
store i32 1342177296,i32*%bb,align 4
%bc=getelementptr inbounds i8,i8*%a8,i64 12
%bd=bitcast i8*%bc to i32*
store i32 0,i32*%bd,align 1
store i32%s,i32*%a9,align 4
%be=getelementptr inbounds i8,i8*%a8,i64 4
%bf=bitcast i8*%be to i32*
store i32%a6,i32*%bf,align 4
%bg=getelementptr inbounds i8,i8*%a8,i64 8
%bh=bitcast i8*%bg to i32*
store i32%a7,i32*%bh,align 4
%bi=getelementptr inbounds i8,i8*%a8,i64 16
%bj=bitcast i8*%bi to i32*
store i32 0,i32*%bj,align 4
%bk=call fastcc i32@_SMLFN13SMLSharp__OSIO5lseekE(i8*inreg%a8)
%bl=load i32*,i32**%B,align 8
store i32%bk,i32*%bl,align 4
%bm=call i8*@sml_alloc(i32 inreg 12)#0
%bn=getelementptr inbounds i8,i8*%bm,i64 -4
%bo=bitcast i8*%bn to i32*
store i32 1342177288,i32*%bo,align 4
store i8*%bm,i8**%d,align 8
%bp=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%bq=bitcast i8*%bm to i8**
store i8*%bp,i8**%bq,align 8
%br=getelementptr inbounds i8,i8*%bm,i64 8
%bs=bitcast i8*%br to i32*
store i32 1,i32*%bs,align 4
%bt=call i8*@sml_alloc(i32 inreg 12)#0
%bu=getelementptr inbounds i8,i8*%bt,i64 -4
%bv=bitcast i8*%bu to i32*
store i32 1342177288,i32*%bv,align 4
store i8*%bt,i8**%b,align 8
%bw=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%bx=bitcast i8*%bt to i8**
store i8*%bw,i8**%bx,align 8
%by=getelementptr inbounds i8,i8*%bt,i64 8
%bz=bitcast i8*%by to i32*
store i32 1,i32*%bz,align 4
%bA=call i8*@sml_alloc(i32 inreg 12)#0
%bB=getelementptr inbounds i8,i8*%bA,i64 -4
%bC=bitcast i8*%bB to i32*
store i32 1342177288,i32*%bC,align 4
store i8*%bA,i8**%e,align 8
%bD=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%bE=bitcast i8*%bA to i8**
store i8*%bD,i8**%bE,align 8
%bF=getelementptr inbounds i8,i8*%bA,i64 8
%bG=bitcast i8*%bF to i32*
store i32 1,i32*%bG,align 4
%bH=call i8*@sml_alloc(i32 inreg 12)#0
%bI=getelementptr inbounds i8,i8*%bH,i64 -4
%bJ=bitcast i8*%bI to i32*
store i32 1342177288,i32*%bJ,align 4
store i8*%bH,i8**%f,align 8
%bK=load i8*,i8**%g,align 8
store i8*null,i8**%g,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 1,i32*%bN,align 4
%bO=call i8*@sml_alloc(i32 inreg 44)#0
%bP=getelementptr inbounds i8,i8*%bO,i64 -4
%bQ=bitcast i8*%bP to i32*
store i32 1342177320,i32*%bQ,align 4
%bR=load i8*,i8**%d,align 8
%bS=bitcast i8*%bO to i8**
store i8*%bR,i8**%bS,align 8
%bT=load i8*,i8**%b,align 8
%bU=getelementptr inbounds i8,i8*%bO,i64 8
%bV=bitcast i8*%bU to i8**
store i8*%bT,i8**%bV,align 8
%bW=load i8*,i8**%c,align 8
%bX=getelementptr inbounds i8,i8*%bO,i64 16
%bY=bitcast i8*%bX to i8**
store i8*%bW,i8**%bY,align 8
%bZ=load i8*,i8**%e,align 8
%b0=getelementptr inbounds i8,i8*%bO,i64 24
%b1=bitcast i8*%b0 to i8**
store i8*%bZ,i8**%b1,align 8
%b2=load i8*,i8**%f,align 8
%b3=getelementptr inbounds i8,i8*%bO,i64 32
%b4=bitcast i8*%b3 to i8**
store i8*%b2,i8**%b4,align 8
%b5=getelementptr inbounds i8,i8*%bO,i64 40
%b6=bitcast i8*%b5 to i32*
store i32 31,i32*%b6,align 4
ret i8*%bO
b7:
store i8*null,i8**%b,align 8
%b8=call i8*@sml_alloc(i32 inreg 4)#0
%b9=getelementptr inbounds i8,i8*%b8,i64 -4
%ca=bitcast i8*%b9 to i32*
store i32 536870916,i32*%ca,align 4
store i8*%b8,i8**%b,align 8
%cb=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg 0)
%cc=bitcast i8**%b to i32**
%cd=load i32*,i32**%cc,align 8
store i32%cb,i32*%cd,align 4
%ce=call i8*@sml_alloc(i32 inreg 44)#0
%cf=getelementptr inbounds i8,i8*%ce,i64 -4
%cg=bitcast i8*%cf to i32*
store i32 1342177320,i32*%cg,align 4
call void@llvm.memset.p0i8.i64(i8*%ce,i8 0,i64 16,i1 false)
%ch=load i8*,i8**%b,align 8
%ci=getelementptr inbounds i8,i8*%ce,i64 16
%cj=bitcast i8*%ci to i8**
store i8*%ch,i8**%cj,align 8
%ck=getelementptr inbounds i8,i8*%ce,i64 24
%cl=getelementptr inbounds i8,i8*%ce,i64 40
%cm=bitcast i8*%cl to i32*
call void@llvm.memset.p0i8.i64(i8*%ck,i8 0,i64 16,i1 false)
store i32 31,i32*%cm,align 4
ret i8*%ce
}
define internal fastcc void@_SMLLL7r__close_77(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*@_SMLLL5avail_79(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}>*@f,i64 0,i32 2)to i8*),%h],[null,%q]
ret i8*%p
q:
%r=getelementptr inbounds i8,i8*%i,i64 20
%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 16
%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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_81(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 8
%n=bitcast i8*%m to i32**
%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:
store i8*null,i8**%d,align 8
%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]}>*@g,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*%k,i64 24
%L=bitcast i8*%K to i32*
%M=load i32,i32*%L,align 4
%N=call i8*@sml_alloc(i32 inreg 12)#0
%O=bitcast i8*%N to i32*
%P=getelementptr inbounds i8,i8*%N,i64 -4
%Q=bitcast i8*%P to i32*
store i32 1342177288,i32*%Q,align 4
store i32%M,i32*%O,align 4
%R=getelementptr inbounds i8,i8*%N,i64 4
%S=bitcast i8*%R to i32*
store i32%b,i32*%S,align 4
%T=getelementptr inbounds i8,i8*%N,i64 8
%U=bitcast i8*%T to i32*
store i32 0,i32*%U,align 4
%V=call fastcc i8*@_SMLFN13SMLSharp__OSIO7readVecE(i8*inreg%N)
store i8*%V,i8**%c,align 8
%W=call fastcc i32@_SMLFN11Word8Vector6lengthE(i8*inreg%V)
%X=load i8*,i8**%d,align 8
%Y=getelementptr inbounds i8,i8*%X,i64 16
%Z=bitcast i8*%Y to i8**
%aa=load i8*,i8**%Z,align 8
store i8*%aa,i8**%e,align 8
%ab=bitcast i8*%aa to i32*
%ac=load i32,i32*%ab,align 4
%ad=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%W)
%ae=add nsw i32%ad,%ac
%af=bitcast i8**%e to i32**
%ag=load i32*,i32**%af,align 8
store i32%ae,i32*%ag,align 4
%ah=bitcast i8**%d to i8***
%ai=load i8**,i8***%ah,align 8
%aj=load i8*,i8**%ai,align 8
%ak=getelementptr inbounds i8,i8*%aj,i64 16
%al=bitcast i8*%ak to i8*(i8*,i8*)**
%am=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%al,align 8
%an=bitcast i8*%aj to i8**
%ao=load i8*,i8**%an,align 8
%ap=load i8*,i8**%c,align 8
%aq=tail call fastcc i8*%am(i8*inreg%ao,i8*inreg%ap)
ret i8*%aq
}
define internal fastcc i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_83(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=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 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,[48x i8]}>,<{[4x i8],i32,[48x i8]}>*@g,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*%j,i64 24
%K=bitcast i8*%J to i32*
%L=load i32,i32*%K,align 4
%M=bitcast i8*%j to i8**
%N=load i8*,i8**%M,align 8
%O=getelementptr inbounds i8,i8*%N,i64 16
%P=bitcast i8*%O to i8*(i8*,i8*)**
%Q=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%P,align 8
%R=bitcast i8*%N to i8**
%S=load i8*,i8**%R,align 8
%T=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%U=call fastcc i8*%Q(i8*inreg%S,i8*inreg%T)
store i8*%U,i8**%d,align 8
%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%L,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=call fastcc i32@_SMLFN13SMLSharp__OSIO7readArrE(i8*inreg%V)
%ah=load i8*,i8**%c,align 8
%ai=getelementptr inbounds i8,i8*%ah,i64 16
%aj=bitcast i8*%ai to i8**
%ak=load i8*,i8**%aj,align 8
store i8*%ak,i8**%d,align 8
store i8*null,i8**%c,align 8
%al=bitcast i8*%ak to i32*
%am=load i32,i32*%al,align 4
%an=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%ag)
%ao=add nsw i32%an,%am
%ap=bitcast i8**%d to i32**
%aq=load i32*,i32**%ap,align 8
store i32%ao,i32*%aq,align 4
ret i32%ag
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
v:
%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
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
store i8*%a,i8**%k,align 8
store i8*%b,i8**%c,align 8
%p=load atomic i32,i32*@sml_check_flag unordered,align 4
%q=icmp eq i32%p,0
br i1%q,label%t,label%r
r:
call void@sml_check(i32 inreg%p)
%s=load i8*,i8**%c,align 8
br label%t
t:
%u=phi i8*[%s,%r],[%b,%v]
%w=bitcast i8*%u to i32*
%x=load i32,i32*%w,align 4
%y=getelementptr inbounds i8,i8*%u,i64 8
%z=bitcast i8*%y to i8**
%A=load i8*,i8**%z,align 8
store i8*%A,i8**%c,align 8
%B=call i8*@sml_alloc(i32 inreg 4)#0
%C=bitcast i8*%B to i32*
%D=getelementptr inbounds i8,i8*%B,i64 -4
%E=bitcast i8*%D to i32*
store i32 536870916,i32*%E,align 4
store i8*%B,i8**%j,align 8
store i32 0,i32*%C,align 4
%F=call i8*@sml_alloc(i32 inreg 20)#0
%G=getelementptr inbounds i8,i8*%F,i64 -4
%H=bitcast i8*%G to i32*
store i32 1342177296,i32*%H,align 4
%I=getelementptr inbounds i8,i8*%F,i64 12
%J=bitcast i8*%I to i32*
store i32 0,i32*%J,align 1
%K=load i8*,i8**%j,align 8
%L=bitcast i8*%F to i8**
store i8*%K,i8**%L,align 8
%M=getelementptr inbounds i8,i8*%F,i64 8
%N=bitcast i8*%M to i32*
store i32%x,i32*%N,align 4
%O=getelementptr inbounds i8,i8*%F,i64 16
%P=bitcast i8*%O to i32*
store i32 1,i32*%P,align 4
%Q=call fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_75(i8*inreg%F)
%R=getelementptr inbounds i8,i8*%Q,i64 16
%S=bitcast i8*%R to i8**
%T=load i8*,i8**%S,align 8
store i8*%T,i8**%d,align 8
%U=getelementptr inbounds i8,i8*%Q,i64 8
%V=bitcast i8*%U to i8**
%W=load i8*,i8**%V,align 8
store i8*%W,i8**%e,align 8
%X=getelementptr inbounds i8,i8*%Q,i64 24
%Y=bitcast i8*%X to i8**
%Z=load i8*,i8**%Y,align 8
store i8*%Z,i8**%f,align 8
%aa=bitcast i8*%Q to i8**
%ab=load i8*,i8**%aa,align 8
store i8*%ab,i8**%g,align 8
%ac=getelementptr inbounds i8,i8*%Q,i64 32
%ad=bitcast i8*%ac to i8**
%ae=load i8*,i8**%ad,align 8
store i8*%ae,i8**%h,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**%i,align 8
%ai=load i8*,i8**%j,align 8
%aj=bitcast i8*%af to i8**
store i8*%ai,i8**%aj,align 8
%ak=getelementptr inbounds i8,i8*%af,i64 8
%al=bitcast i8*%ak to i32*
store i32%x,i32*%al,align 4
%am=getelementptr inbounds i8,i8*%af,i64 16
%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
store i8*%ao,i8**%m,align 8
%ar=load i8*,i8**%i,align 8
store i8*null,i8**%i,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)*@_SMLLL7r__close_77 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*)*@_SMLLL7r__close_137 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 fastcc i8*@_SMLFN13SMLSharp__OSIO5fstatE(i32 inreg%x)
%aA=call fastcc i32@_SMLFN13SMLSharp__OSIO2ST5isRegE(i8*inreg%az)
%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**%i,align 8
%aE=load i8*,i8**%j,align 8
%aF=bitcast i8*%aB to i8**
store i8*%aE,i8**%aF,align 8
%aG=load i8*,i8**%d,align 8
%aH=getelementptr inbounds i8,i8*%aB,i64 8
%aI=bitcast i8*%aH to i8**
store i8*%aG,i8**%aI,align 8
%aJ=getelementptr inbounds i8,i8*%aB,i64 16
%aK=bitcast i8*%aJ to i32*
store i32%x,i32*%aK,align 4
%aL=getelementptr inbounds i8,i8*%aB,i64 20
%aM=bitcast i8*%aL to i32*
store i32%aA,i32*%aM,align 4
%aN=getelementptr inbounds i8,i8*%aB,i64 24
%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**%n,align 8
%aS=load i8*,i8**%i,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(i8*(i8*,i32)*@_SMLLL5avail_79 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*)*@_SMLLL5avail_138 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**%k,align 8
%a1=getelementptr inbounds i8,i8*%a0,i64 8
%a2=bitcast i8*%a1 to i8**
%a3=load i8*,i8**%a2,align 8
store i8*%a3,i8**%i,align 8
%a4=call i8*@sml_alloc(i32 inreg 36)#0
%a5=getelementptr inbounds i8,i8*%a4,i64 -4
%a6=bitcast i8*%a5 to i32*
store i32 1342177312,i32*%a6,align 4
store i8*%a4,i8**%l,align 8
%a7=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%a8=bitcast i8*%a4 to i8**
store i8*%a7,i8**%a8,align 8
%a9=load i8*,i8**%j,align 8
%ba=getelementptr inbounds i8,i8*%a4,i64 8
%bb=bitcast i8*%ba to i8**
store i8*%a9,i8**%bb,align 8
%bc=load i8*,i8**%d,align 8
%bd=getelementptr inbounds i8,i8*%a4,i64 16
%be=bitcast i8*%bd to i8**
store i8*%bc,i8**%be,align 8
%bf=getelementptr inbounds i8,i8*%a4,i64 24
%bg=bitcast i8*%bf to i32*
store i32%x,i32*%bg,align 4
%bh=getelementptr inbounds i8,i8*%a4,i64 32
%bi=bitcast i8*%bh to i32*
store i32 7,i32*%bi,align 4
%bj=call i8*@sml_alloc(i32 inreg 28)#0
%bk=getelementptr inbounds i8,i8*%bj,i64 -4
%bl=bitcast i8*%bk to i32*
store i32 1342177304,i32*%bl,align 4
store i8*%bj,i8**%o,align 8
%bm=load i8*,i8**%l,align 8
store i8*null,i8**%l,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 void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_81 to void(...)*),void(...)**%bp,align 8
%bq=getelementptr inbounds i8,i8*%bj,i64 16
%br=bitcast i8*%bq to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_139 to void(...)*),void(...)**%br,align 8
%bs=getelementptr inbounds i8,i8*%bj,i64 24
%bt=bitcast i8*%bs to i32*
store i32 -2147483647,i32*%bt,align 4
%bu=call i8*@sml_alloc(i32 inreg 12)#0
%bv=getelementptr inbounds i8,i8*%bu,i64 -4
%bw=bitcast i8*%bv to i32*
store i32 1342177288,i32*%bw,align 4
store i8*%bu,i8**%i,align 8
%bx=load i8*,i8**%o,align 8
store i8*null,i8**%o,align 8
%by=bitcast i8*%bu to i8**
store i8*%bx,i8**%by,align 8
%bz=getelementptr inbounds i8,i8*%bu,i64 8
%bA=bitcast i8*%bz to i32*
store i32 1,i32*%bA,align 4
%bB=bitcast i8**%k to i8***
%bC=load i8**,i8***%bB,align 8
%bD=load i8*,i8**%bC,align 8
store i8*%bD,i8**%l,align 8
%bE=call i8*@sml_alloc(i32 inreg 36)#0
%bF=getelementptr inbounds i8,i8*%bE,i64 -4
%bG=bitcast i8*%bF to i32*
store i32 1342177312,i32*%bG,align 4
store i8*%bE,i8**%o,align 8
%bH=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%bI=bitcast i8*%bE to i8**
store i8*%bH,i8**%bI,align 8
%bJ=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%bK=getelementptr inbounds i8,i8*%bE,i64 8
%bL=bitcast i8*%bK to i8**
store i8*%bJ,i8**%bL,align 8
%bM=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%bN=getelementptr inbounds i8,i8*%bE,i64 16
%bO=bitcast i8*%bN to i8**
store i8*%bM,i8**%bO,align 8
%bP=getelementptr inbounds i8,i8*%bE,i64 24
%bQ=bitcast i8*%bP to i32*
store i32%x,i32*%bQ,align 4
%bR=getelementptr inbounds i8,i8*%bE,i64 32
%bS=bitcast i8*%bR to i32*
store i32 7,i32*%bS,align 4
%bT=call i8*@sml_alloc(i32 inreg 28)#0
%bU=getelementptr inbounds i8,i8*%bT,i64 -4
%bV=bitcast i8*%bU to i32*
store i32 1342177304,i32*%bV,align 4
store i8*%bT,i8**%j,align 8
%bW=load i8*,i8**%o,align 8
store i8*null,i8**%o,align 8
%bX=bitcast i8*%bT to i8**
store i8*%bW,i8**%bX,align 8
%bY=getelementptr inbounds i8,i8*%bT,i64 8
%bZ=bitcast i8*%bY to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_83 to void(...)*),void(...)**%bZ,align 8
%b0=getelementptr inbounds i8,i8*%bT,i64 16
%b1=bitcast i8*%b0 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_140 to void(...)*),void(...)**%b1,align 8
%b2=getelementptr inbounds i8,i8*%bT,i64 24
%b3=bitcast i8*%b2 to i32*
store i32 -2147483647,i32*%b3,align 4
%b4=call i8*@sml_alloc(i32 inreg 12)#0
%b5=getelementptr inbounds i8,i8*%b4,i64 -4
%b6=bitcast i8*%b5 to i32*
store i32 1342177288,i32*%b6,align 4
store i8*%b4,i8**%d,align 8
%b7=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%b8=bitcast i8*%b4 to i8**
store i8*%b7,i8**%b8,align 8
%b9=getelementptr inbounds i8,i8*%b4,i64 8
%ca=bitcast i8*%b9 to i32*
store i32 1,i32*%ca,align 4
%cb=call i8*@sml_alloc(i32 inreg 12)#0
%cc=getelementptr inbounds i8,i8*%cb,i64 -4
%cd=bitcast i8*%cc to i32*
store i32 1342177288,i32*%cd,align 4
store i8*%cb,i8**%j,align 8
%ce=getelementptr inbounds i8,i8*%cb,i64 4
%cf=bitcast i8*%ce to i32*
store i32 0,i32*%cf,align 1
%cg=bitcast i8*%cb to i32*
store i32%x,i32*%cg,align 4
%ch=getelementptr inbounds i8,i8*%cb,i64 8
%ci=bitcast i8*%ch to i32*
store i32 0,i32*%ci,align 4
%cj=load i8*,i8**%k,align 8
%ck=getelementptr inbounds i8,i8*%cj,i64 16
%cl=bitcast i8*%ck to i8**
%cm=load i8*,i8**%cl,align 8
%cn=getelementptr inbounds i8,i8*%cm,i64 16
%co=bitcast i8*%cn to i8*(i8*,i8*)**
%cp=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%co,align 8
%cq=bitcast i8*%cm to i8**
%cr=load i8*,i8**%cq,align 8
store i8*%cr,i8**%k,align 8
%cs=call i8*@sml_alloc(i32 inreg 124)#0
%ct=getelementptr inbounds i8,i8*%cs,i64 -4
%cu=bitcast i8*%ct to i32*
store i32 1342177400,i32*%cu,align 4
%cv=getelementptr inbounds i8,i8*%cs,i64 28
%cw=bitcast i8*%cv to i32*
store i32 0,i32*%cw,align 1
%cx=load i8*,i8**%n,align 8
%cy=bitcast i8*%cs to i8**
store i8*%cx,i8**%cy,align 8
%cz=getelementptr inbounds i8,i8*%cs,i64 8
%cA=getelementptr inbounds i8,i8*%cs,i64 24
%cB=bitcast i8*%cA to i32*
call void@llvm.memset.p0i8.i64(i8*%cz,i8 0,i64 16,i1 false)
store i32 4096,i32*%cB,align 4
%cC=load i8*,i8**%m,align 8
%cD=getelementptr inbounds i8,i8*%cs,i64 32
%cE=bitcast i8*%cD to i8**
store i8*%cC,i8**%cE,align 8
%cF=load i8*,i8**%g,align 8
%cG=getelementptr inbounds i8,i8*%cs,i64 40
%cH=bitcast i8*%cG to i8**
store i8*%cF,i8**%cH,align 8
%cI=load i8*,i8**%e,align 8
%cJ=getelementptr inbounds i8,i8*%cs,i64 48
%cK=bitcast i8*%cJ to i8**
store i8*%cI,i8**%cK,align 8
%cL=load i8*,i8**%j,align 8
%cM=getelementptr inbounds i8,i8*%cs,i64 56
%cN=bitcast i8*%cM to i8**
store i8*%cL,i8**%cN,align 8
%cO=load i8*,i8**%c,align 8
%cP=getelementptr inbounds i8,i8*%cs,i64 64
%cQ=bitcast i8*%cP to i8**
store i8*%cO,i8**%cQ,align 8
%cR=load i8*,i8**%d,align 8
%cS=getelementptr inbounds i8,i8*%cs,i64 72
%cT=bitcast i8*%cS to i8**
store i8*%cR,i8**%cT,align 8
%cU=getelementptr inbounds i8,i8*%cs,i64 80
%cV=bitcast i8*%cU to i8**
store i8*null,i8**%cV,align 8
%cW=load i8*,i8**%i,align 8
%cX=getelementptr inbounds i8,i8*%cs,i64 88
%cY=bitcast i8*%cX to i8**
store i8*%cW,i8**%cY,align 8
%cZ=getelementptr inbounds i8,i8*%cs,i64 96
%c0=bitcast i8*%cZ to i8**
store i8*null,i8**%c0,align 8
%c1=load i8*,i8**%f,align 8
%c2=getelementptr inbounds i8,i8*%cs,i64 104
%c3=bitcast i8*%c2 to i8**
store i8*%c1,i8**%c3,align 8
%c4=load i8*,i8**%h,align 8
%c5=getelementptr inbounds i8,i8*%cs,i64 112
%c6=bitcast i8*%c5 to i8**
store i8*%c4,i8**%c6,align 8
%c7=getelementptr inbounds i8,i8*%cs,i64 120
%c8=bitcast i8*%c7 to i32*
store i32 32759,i32*%c8,align 4
%c9=load i8*,i8**%k,align 8
%da=tail call fastcc i8*%cp(i8*inreg%c9,i8*inreg%cs)
ret i8*%da
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_89(i8*inreg%a)unnamed_addr#4 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
%f=bitcast i8*%a to i8**
%g=load i8*,i8**%f,align 8
store i8*%g,i8**%b,align 8
%h=getelementptr inbounds i8,i8*%a,i64 8
%i=bitcast i8*%h to i8**
%j=load i8*,i8**%i,align 8
store i8*%j,i8**%c,align 8
%k=getelementptr inbounds i8,i8*%a,i64 16
%l=bitcast i8*%k to i8**
%m=load i8*,i8**%l,align 8
store i8*%m,i8**%d,align 8
%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**%b,align 8
store i8*null,i8**%b,align 8
%r=bitcast i8*%n to i8**
store i8*%q,i8**%r,align 8
%s=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%t=getelementptr inbounds i8,i8*%n,i64 8
%u=bitcast i8*%t to i8**
store i8*%s,i8**%u,align 8
%v=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%w=getelementptr inbounds i8,i8*%n,i64 16
%x=bitcast i8*%w to i8**
store i8*%v,i8**%x,align 8
%y=getelementptr inbounds i8,i8*%n,i64 24
%z=bitcast i8*%y to i32*
store i32 7,i32*%z,align 4
%A=call i8*@sml_alloc(i32 inreg 28)#0
%B=getelementptr inbounds i8,i8*%A,i64 -4
%C=bitcast i8*%B to i32*
store i32 1342177304,i32*%C,align 4
%D=load i8*,i8**%e,align 8
%E=bitcast i8*%A to i8**
store i8*%D,i8**%E,align 8
%F=getelementptr inbounds i8,i8*%A,i64 8
%G=bitcast i8*%F to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88 to void(...)*),void(...)**%G,align 8
%H=getelementptr inbounds i8,i8*%A,i64 16
%I=bitcast i8*%H to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_88 to void(...)*),void(...)**%I,align 8
%J=getelementptr inbounds i8,i8*%A,i64 24
%K=bitcast i8*%J to i32*
store i32 -2147483647,i32*%K,align 4
ret i8*%A
}
define internal fastcc i32@_SMLLL4putV_91(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**%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=load i8*,i8**%d,align 8
%k=bitcast i8**%c to i8***
%l=load i8**,i8***%k,align 8
br label%m
m:
%n=phi i8**[%l,%i],[%h,%g]
%o=phi i8*[%j,%i],[%b,%g]
store i8*null,i8**%d,align 8
%p=bitcast i8*%o to i32*
%q=load i32,i32*%p,align 4
%r=load i8*,i8**%n,align 8
%s=getelementptr inbounds i8,i8*%r,i64 16
%t=bitcast i8*%s to i8*(i8*,i8*)**
%u=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%t,align 8
%v=bitcast i8*%r to i8**
%w=load i8*,i8**%v,align 8
%x=getelementptr inbounds i8,i8*%o,i64 8
%y=bitcast i8*%x to i8**
%z=load i8*,i8**%y,align 8
%A=call fastcc i8*%u(i8*inreg%w,i8*inreg%z)
store i8*%A,i8**%d,align 8
%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%q,i32*%C,align 4
%H=load i8*,i8**%d,align 8
store i8*null,i8**%d,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__OSIO8writeVecE(i8*inreg%B)
%N=load i8*,i8**%c,align 8
%O=getelementptr inbounds i8,i8*%N,i64 8
%P=bitcast i8*%O to i8**
%Q=load i8*,i8**%P,align 8
store i8*%Q,i8**%d,align 8
store i8*null,i8**%c,align 8
%R=bitcast i8*%Q to i32*
%S=load i32,i32*%R,align 4
%T=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%M)
%U=add nsw i32%T,%S
%V=bitcast i8**%d to i32**
%W=load i32*,i32**%V,align 8
store i32%U,i32*%W,align 4
ret i32%M
}
define internal fastcc i32@_SMLLL4putA_92(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**%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=load i8*,i8**%d,align 8
%k=bitcast i8**%c to i8***
%l=load i8**,i8***%k,align 8
br label%m
m:
%n=phi i8**[%l,%i],[%h,%g]
%o=phi i8*[%j,%i],[%b,%g]
store i8*null,i8**%d,align 8
%p=bitcast i8*%o to i32*
%q=load i32,i32*%p,align 4
%r=load i8*,i8**%n,align 8
%s=getelementptr inbounds i8,i8*%r,i64 16
%t=bitcast i8*%s to i8*(i8*,i8*)**
%u=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%t,align 8
%v=bitcast i8*%r to i8**
%w=load i8*,i8**%v,align 8
%x=getelementptr inbounds i8,i8*%o,i64 8
%y=bitcast i8*%x to i8**
%z=load i8*,i8**%y,align 8
%A=call fastcc i8*%u(i8*inreg%w,i8*inreg%z)
store i8*%A,i8**%d,align 8
%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%q,i32*%C,align 4
%H=load i8*,i8**%d,align 8
store i8*null,i8**%d,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__OSIO8writeArrE(i8*inreg%B)
%N=load i8*,i8**%c,align 8
%O=getelementptr inbounds i8,i8*%N,i64 8
%P=bitcast i8*%O to i8**
%Q=load i8*,i8**%P,align 8
store i8*%Q,i8**%d,align 8
store i8*null,i8**%c,align 8
%R=bitcast i8*%Q to i32*
%S=load i32,i32*%R,align 4
%T=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%M)
%U=add nsw i32%T,%S
%V=bitcast i8**%d to i32**
%W=load i32*,i32**%V,align 8
store i32%U,i32*%W,align 4
ret i32%M
}
define internal fastcc void@_SMLLL7w__close_93(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 i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_95(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=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 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*%j,i64 24
%K=bitcast i8*%J to i32*
%L=load i32,i32*%K,align 4
%M=bitcast i8*%j to i8**
%N=load i8*,i8**%M,align 8
%O=getelementptr inbounds i8,i8*%N,i64 16
%P=bitcast i8*%O to i8*(i8*,i8*)**
%Q=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%P,align 8
%R=bitcast i8*%N to i8**
%S=load i8*,i8**%R,align 8
%T=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%U=call fastcc i8*%Q(i8*inreg%S,i8*inreg%T)
store i8*%U,i8**%d,align 8
%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%L,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=call fastcc i32@_SMLFN13SMLSharp__OSIO8writeVecE(i8*inreg%V)
%ah=load i8*,i8**%c,align 8
%ai=getelementptr inbounds i8,i8*%ah,i64 16
%aj=bitcast i8*%ai to i8**
%ak=load i8*,i8**%aj,align 8
store i8*%ak,i8**%d,align 8
store i8*null,i8**%c,align 8
%al=bitcast i8*%ak to i32*
%am=load i32,i32*%al,align 4
%an=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%ag)
%ao=add nsw i32%an,%am
%ap=bitcast i8**%d to i32**
%aq=load i32*,i32**%ap,align 8
store i32%ao,i32*%aq,align 4
ret i32%ag
}
define internal fastcc i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_97(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=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 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*%j,i64 24
%K=bitcast i8*%J to i32*
%L=load i32,i32*%K,align 4
%M=bitcast i8*%j to i8**
%N=load i8*,i8**%M,align 8
%O=getelementptr inbounds i8,i8*%N,i64 16
%P=bitcast i8*%O to i8*(i8*,i8*)**
%Q=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%P,align 8
%R=bitcast i8*%N to i8**
%S=load i8*,i8**%R,align 8
%T=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%U=call fastcc i8*%Q(i8*inreg%S,i8*inreg%T)
store i8*%U,i8**%d,align 8
%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%L,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=call fastcc i32@_SMLFN13SMLSharp__OSIO8writeArrE(i8*inreg%V)
%ah=load i8*,i8**%c,align 8
%ai=getelementptr inbounds i8,i8*%ah,i64 16
%aj=bitcast i8*%ai to i8**
%ak=load i8*,i8**%aj,align 8
store i8*%ak,i8**%d,align 8
store i8*null,i8**%c,align 8
%al=bitcast i8*%ak to i32*
%am=load i32,i32*%al,align 4
%an=call fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%ag)
%ao=add nsw i32%an,%am
%ap=bitcast i8**%d to i32**
%aq=load i32*,i32**%ap,align 8
store i32%ao,i32*%aq,align 4
ret i32%ag
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_99(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
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=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 4
%p=icmp eq i32%o,0
br i1%p,label%B,label%q
q:
%r=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%r,i8**%d,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
%v=load i8*,i8**%d,align 8
store i8*null,i8**%d,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
br label%aB
B:
%C=getelementptr inbounds i8,i8*%j,i64 28
%D=bitcast i8*%C to i32*
%E=load i32,i32*%D,align 4
%F=bitcast i8*%j to i8**
%G=load i8*,i8**%F,align 8
%H=getelementptr inbounds i8,i8*%G,i64 16
%I=bitcast i8*%H to i8*(i8*,i8*)**
%J=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%I,align 8
%K=bitcast i8*%G to i8**
%L=load i8*,i8**%K,align 8
%M=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%N=invoke fastcc i8*%J(i8*inreg%L,i8*inreg%M)
to label%O unwind label%av
O:
store i8*%N,i8**%d,align 8
%P=call i8*@sml_alloc(i32 inreg 20)#0
%Q=bitcast i8*%P to i32*
%R=getelementptr inbounds i8,i8*%P,i64 -4
%S=bitcast i8*%R to i32*
store i32 1342177296,i32*%S,align 4
%T=getelementptr inbounds i8,i8*%P,i64 4
%U=bitcast i8*%T to i32*
store i32 0,i32*%U,align 1
store i32%E,i32*%Q,align 4
%V=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%W=getelementptr inbounds i8,i8*%P,i64 8
%X=bitcast i8*%W to i8**
store i8*%V,i8**%X,align 8
%Y=getelementptr inbounds i8,i8*%P,i64 16
%Z=bitcast i8*%Y to i32*
store i32 2,i32*%Z,align 4
%aa=invoke fastcc i32@_SMLFN13SMLSharp__OSIO8writeVecE(i8*inreg%P)
to label%ab unwind label%av
ab:
%ac=load i8*,i8**%c,align 8
%ad=getelementptr inbounds i8,i8*%ac,i64 16
%ae=bitcast i8*%ad to i8**
%af=load i8*,i8**%ae,align 8
store i8*%af,i8**%d,align 8
%ag=bitcast i8*%af to i32*
%ah=load i32,i32*%ag,align 4
%ai=invoke fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%aa)
to label%aj unwind label%av
aj:
store i8*null,i8**%c,align 8
%ak=add nsw i32%ai,%ah
%al=bitcast i8**%d to i32**
%am=load i32*,i32**%al,align 8
store i8*null,i8**%d,align 8
store i32%ak,i32*%am,align 4
%an=call i8*@sml_alloc(i32 inreg 12)#0
%ao=bitcast i8*%an to i32*
%ap=getelementptr inbounds i8,i8*%an,i64 -4
%aq=bitcast i8*%ap to i32*
store i32 1342177288,i32*%aq,align 4
%ar=getelementptr inbounds i8,i8*%an,i64 4
%as=bitcast i8*%ar to i32*
store i32 0,i32*%as,align 1
store i32%aa,i32*%ao,align 4
%at=getelementptr inbounds i8,i8*%an,i64 8
%au=bitcast i8*%at to i32*
store i32 0,i32*%au,align 4
br label%a5
av:
%aw=landingpad{i8*,i8*}
catch i8*null
%ax=extractvalue{i8*,i8*}%aw,1
%ay=bitcast i8*%ax to i8**
%az=load i8*,i8**%ay,align 8
%aA=bitcast i8*%az to i8**
br label%aB
aB:
%aC=phi i8**[%aA,%av],[%w,%q]
%aD=phi i8*[%az,%av],[%s,%q]
store i8*%aD,i8**%d,align 8
%aE=load i8*,i8**%aC,align 8
%aF=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%aG=icmp eq i8*%aE,%aF
br i1%aG,label%aH,label%bf
aH:
%aI=getelementptr inbounds i8,i8*%aD,i64 16
%aJ=bitcast i8*%aI to i8**
%aK=load i8*,i8**%aJ,align 8
%aL=getelementptr inbounds i8,i8*%aK,i64 8
%aM=bitcast i8*%aL to i8**
%aN=load i8*,i8**%aM,align 8
%aO=icmp eq i8*%aN,null
br i1%aO,label%aP,label%aX
aP:
store i8*null,i8**%c,align 8
%aQ=call i8*@sml_alloc(i32 inreg 60)#0
%aR=getelementptr inbounds i8,i8*%aQ,i64 -4
%aS=bitcast i8*%aR to i32*
store i32 1342177336,i32*%aS,align 4
%aT=getelementptr inbounds i8,i8*%aQ,i64 56
%aU=bitcast i8*%aT to i32*
store i32 1,i32*%aU,align 4
%aV=load i8*,i8**%d,align 8
%aW=bitcast i8*%aQ to i8**
store i8*%aV,i8**%aW,align 8
call void@sml_raise(i8*inreg%aQ)#1
unreachable
aX:
%aY=bitcast i8*%aN to i32*
%aZ=load i32,i32*%aY,align 4
%a0=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%a1=getelementptr inbounds i8,i8*%a0,i64 24
%a2=bitcast i8*%a1 to i32*
%a3=load i32,i32*%a2,align 4
%a4=icmp eq i32%aZ,%a3
br i1%a4,label%a5,label%a7
a5:
%a6=phi i8*[null,%aX],[%an,%aj]
ret i8*%a6
a7:
%a8=call i8*@sml_alloc(i32 inreg 60)#0
%a9=getelementptr inbounds i8,i8*%a8,i64 -4
%ba=bitcast i8*%a9 to i32*
store i32 1342177336,i32*%ba,align 4
%bb=getelementptr inbounds i8,i8*%a8,i64 56
%bc=bitcast i8*%bb to i32*
store i32 1,i32*%bc,align 4
%bd=load i8*,i8**%d,align 8
%be=bitcast i8*%a8 to i8**
store i8*%bd,i8**%be,align 8
call void@sml_raise(i8*inreg%a8)#1
unreachable
bf:
store i8*null,i8**%c,align 8
%bg=call i8*@sml_alloc(i32 inreg 60)#0
%bh=getelementptr inbounds i8,i8*%bg,i64 -4
%bi=bitcast i8*%bh to i32*
store i32 1342177336,i32*%bi,align 4
%bj=getelementptr inbounds i8,i8*%bg,i64 56
%bk=bitcast i8*%bj to i32*
store i32 1,i32*%bk,align 4
%bl=load i8*,i8**%d,align 8
%bm=bitcast i8*%bg to i8**
store i8*%bl,i8**%bm,align 8
call void@sml_raise(i8*inreg%bg)#1
unreachable
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"personality i32(...)*@sml_personality{
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=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 4
%p=icmp eq i32%o,0
br i1%p,label%B,label%q
q:
%r=load i8*,i8**@_SMLZN2IO12ClosedStreamE,align 8
store i8*%r,i8**%d,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
%v=load i8*,i8**%d,align 8
store i8*null,i8**%d,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
br label%aB
B:
%C=getelementptr inbounds i8,i8*%j,i64 28
%D=bitcast i8*%C to i32*
%E=load i32,i32*%D,align 4
%F=bitcast i8*%j to i8**
%G=load i8*,i8**%F,align 8
%H=getelementptr inbounds i8,i8*%G,i64 16
%I=bitcast i8*%H to i8*(i8*,i8*)**
%J=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%I,align 8
%K=bitcast i8*%G to i8**
%L=load i8*,i8**%K,align 8
%M=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%N=invoke fastcc i8*%J(i8*inreg%L,i8*inreg%M)
to label%O unwind label%av
O:
store i8*%N,i8**%d,align 8
%P=call i8*@sml_alloc(i32 inreg 20)#0
%Q=bitcast i8*%P to i32*
%R=getelementptr inbounds i8,i8*%P,i64 -4
%S=bitcast i8*%R to i32*
store i32 1342177296,i32*%S,align 4
%T=getelementptr inbounds i8,i8*%P,i64 4
%U=bitcast i8*%T to i32*
store i32 0,i32*%U,align 1
store i32%E,i32*%Q,align 4
%V=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%W=getelementptr inbounds i8,i8*%P,i64 8
%X=bitcast i8*%W to i8**
store i8*%V,i8**%X,align 8
%Y=getelementptr inbounds i8,i8*%P,i64 16
%Z=bitcast i8*%Y to i32*
store i32 2,i32*%Z,align 4
%aa=invoke fastcc i32@_SMLFN13SMLSharp__OSIO8writeArrE(i8*inreg%P)
to label%ab unwind label%av
ab:
%ac=load i8*,i8**%c,align 8
%ad=getelementptr inbounds i8,i8*%ac,i64 16
%ae=bitcast i8*%ad to i8**
%af=load i8*,i8**%ae,align 8
store i8*%af,i8**%d,align 8
%ag=bitcast i8*%af to i32*
%ah=load i32,i32*%ag,align 4
%ai=invoke fastcc i32@_SMLFN5Int327fromIntE(i32 inreg%aa)
to label%aj unwind label%av
aj:
store i8*null,i8**%c,align 8
%ak=add nsw i32%ai,%ah
%al=bitcast i8**%d to i32**
%am=load i32*,i32**%al,align 8
store i8*null,i8**%d,align 8
store i32%ak,i32*%am,align 4
%an=call i8*@sml_alloc(i32 inreg 12)#0
%ao=bitcast i8*%an to i32*
%ap=getelementptr inbounds i8,i8*%an,i64 -4
%aq=bitcast i8*%ap to i32*
store i32 1342177288,i32*%aq,align 4
%ar=getelementptr inbounds i8,i8*%an,i64 4
%as=bitcast i8*%ar to i32*
store i32 0,i32*%as,align 1
store i32%aa,i32*%ao,align 4
%at=getelementptr inbounds i8,i8*%an,i64 8
%au=bitcast i8*%at to i32*
store i32 0,i32*%au,align 4
br label%a5
av:
%aw=landingpad{i8*,i8*}
catch i8*null
%ax=extractvalue{i8*,i8*}%aw,1
%ay=bitcast i8*%ax to i8**
%az=load i8*,i8**%ay,align 8
%aA=bitcast i8*%az to i8**
br label%aB
aB:
%aC=phi i8**[%aA,%av],[%w,%q]
%aD=phi i8*[%az,%av],[%s,%q]
store i8*%aD,i8**%d,align 8
%aE=load i8*,i8**%aC,align 8
%aF=load i8*,i8**@_SMLZN16SMLSharp__Runtime6SysErrE,align 8
%aG=icmp eq i8*%aE,%aF
br i1%aG,label%aH,label%bf
aH:
%aI=getelementptr inbounds i8,i8*%aD,i64 16
%aJ=bitcast i8*%aI to i8**
%aK=load i8*,i8**%aJ,align 8
%aL=getelementptr inbounds i8,i8*%aK,i64 8
%aM=bitcast i8*%aL to i8**
%aN=load i8*,i8**%aM,align 8
%aO=icmp eq i8*%aN,null
br i1%aO,label%aP,label%aX
aP:
store i8*null,i8**%c,align 8
%aQ=call i8*@sml_alloc(i32 inreg 60)#0
%aR=getelementptr inbounds i8,i8*%aQ,i64 -4
%aS=bitcast i8*%aR to i32*
store i32 1342177336,i32*%aS,align 4
%aT=getelementptr inbounds i8,i8*%aQ,i64 56
%aU=bitcast i8*%aT to i32*
store i32 1,i32*%aU,align 4
%aV=load i8*,i8**%d,align 8
%aW=bitcast i8*%aQ to i8**
store i8*%aV,i8**%aW,align 8
call void@sml_raise(i8*inreg%aQ)#1
unreachable
aX:
%aY=bitcast i8*%aN to i32*
%aZ=load i32,i32*%aY,align 4
%a0=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%a1=getelementptr inbounds i8,i8*%a0,i64 24
%a2=bitcast i8*%a1 to i32*
%a3=load i32,i32*%a2,align 4
%a4=icmp eq i32%aZ,%a3
br i1%a4,label%a5,label%a7
a5:
%a6=phi i8*[null,%aX],[%an,%aj]
ret i8*%a6
a7:
%a8=call i8*@sml_alloc(i32 inreg 60)#0
%a9=getelementptr inbounds i8,i8*%a8,i64 -4
%ba=bitcast i8*%a9 to i32*
store i32 1342177336,i32*%ba,align 4
%bb=getelementptr inbounds i8,i8*%a8,i64 56
%bc=bitcast i8*%bb to i32*
store i32 1,i32*%bc,align 4
%bd=load i8*,i8**%d,align 8
%be=bitcast i8*%a8 to i8**
store i8*%bd,i8**%be,align 8
call void@sml_raise(i8*inreg%a8)#1
unreachable
bf:
store i8*null,i8**%c,align 8
%bg=call i8*@sml_alloc(i32 inreg 60)#0
%bh=getelementptr inbounds i8,i8*%bg,i64 -4
%bi=bitcast i8*%bh to i32*
store i32 1342177336,i32*%bi,align 4
%bj=getelementptr inbounds i8,i8*%bg,i64 56
%bk=bitcast i8*%bj to i32*
store i32 1,i32*%bk,align 4
%bl=load i8*,i8**%d,align 8
%bm=bitcast i8*%bg to i8**
store i8*%bl,i8**%bm,align 8
call void@sml_raise(i8*inreg%bg)#1
unreachable
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_102(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**%m,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]
%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**%c,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**%l,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**%l,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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6posFnsE_75(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**%d,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**%e,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**%f,align 8
%af=bitcast i8*%V to i8**
%ag=load i8*,i8**%af,align 8
store i8*%ag,i8**%g,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**%h,align 8
%ak=load i8*,i8**%m,align 8
%al=getelementptr inbounds i8,i8*%ak,i64 8
%am=bitcast i8*%al to i8**
%an=load i8*,i8**%am,align 8
store i8*%an,i8**%i,align 8
%ao=call i8*@sml_alloc(i32 inreg 20)#0
%ap=getelementptr inbounds i8,i8*%ao,i64 -4
%aq=bitcast i8*%ap to i32*
store i32 1342177296,i32*%aq,align 4
store i8*%ao,i8**%j,align 8
%ar=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%as=bitcast i8*%ao to i8**
store i8*%ar,i8**%as,align 8
%at=load i8*,i8**%d,align 8
%au=getelementptr inbounds i8,i8*%ao,i64 8
%av=bitcast i8*%au to i8**
store i8*%at,i8**%av,align 8
%aw=getelementptr inbounds i8,i8*%ao,i64 16
%ax=bitcast i8*%aw to i32*
store i32 3,i32*%ax,align 4
%ay=call i8*@sml_alloc(i32 inreg 28)#0
%az=getelementptr inbounds i8,i8*%ay,i64 -4
%aA=bitcast i8*%az to i32*
store i32 1342177304,i32*%aA,align 4
%aB=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%aC=bitcast i8*%ay to i8**
store i8*%aB,i8**%aC,align 8
%aD=getelementptr inbounds i8,i8*%ay,i64 8
%aE=bitcast i8*%aD to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLLL4putV_91 to void(...)*),void(...)**%aE,align 8
%aF=getelementptr inbounds i8,i8*%ay,i64 16
%aG=bitcast i8*%aF to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLL4putV_144 to void(...)*),void(...)**%aG,align 8
%aH=getelementptr inbounds i8,i8*%ay,i64 24
%aI=bitcast i8*%aH to i32*
store i32 -2147483647,i32*%aI,align 4
%aJ=bitcast i8**%m to i8***
%aK=load i8**,i8***%aJ,align 8
%aL=load i8*,i8**%aK,align 8
store i8*%aL,i8**%i,align 8
%aM=call i8*@sml_alloc(i32 inreg 20)#0
%aN=getelementptr inbounds i8,i8*%aM,i64 -4
%aO=bitcast i8*%aN to i32*
store i32 1342177296,i32*%aO,align 4
store i8*%aM,i8**%j,align 8
%aP=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%aQ=bitcast i8*%aM to i8**
store i8*%aP,i8**%aQ,align 8
%aR=load i8*,i8**%d,align 8
%aS=getelementptr inbounds i8,i8*%aM,i64 8
%aT=bitcast i8*%aS to i8**
store i8*%aR,i8**%aT,align 8
%aU=getelementptr inbounds i8,i8*%aM,i64 16
%aV=bitcast i8*%aU to i32*
store i32 3,i32*%aV,align 4
%aW=call i8*@sml_alloc(i32 inreg 28)#0
%aX=getelementptr inbounds i8,i8*%aW,i64 -4
%aY=bitcast i8*%aX to i32*
store i32 1342177304,i32*%aY,align 4
%aZ=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%a0=bitcast i8*%aW to i8**
store i8*%aZ,i8**%a0,align 8
%a1=getelementptr inbounds i8,i8*%aW,i64 8
%a2=bitcast i8*%a1 to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLLL4putA_92 to void(...)*),void(...)**%a2,align 8
%a3=getelementptr inbounds i8,i8*%aW,i64 16
%a4=bitcast i8*%a3 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLL4putA_145 to void(...)*),void(...)**%a4,align 8
%a5=getelementptr inbounds i8,i8*%aW,i64 24
%a6=bitcast i8*%a5 to i32*
store i32 -2147483647,i32*%a6,align 4
%a7=call i8*@sml_alloc(i32 inreg 20)#0
%a8=getelementptr inbounds i8,i8*%a7,i64 -4
%a9=bitcast i8*%a8 to i32*
store i32 1342177296,i32*%a9,align 4
store i8*%a7,i8**%i,align 8
%ba=load i8*,i8**%l,align 8
%bb=bitcast i8*%a7 to i8**
store i8*%ba,i8**%bb,align 8
%bc=getelementptr inbounds i8,i8*%a7,i64 8
%bd=bitcast i8*%bc to i32*
store i32%C,i32*%bd,align 4
%be=getelementptr inbounds i8,i8*%a7,i64 16
%bf=bitcast i8*%be to i32*
store i32 1,i32*%bf,align 4
%bg=call i8*@sml_alloc(i32 inreg 28)#0
%bh=getelementptr inbounds i8,i8*%bg,i64 -4
%bi=bitcast i8*%bh to i32*
store i32 1342177304,i32*%bi,align 4
store i8*%bg,i8**%o,align 8
%bj=load i8*,i8**%i,align 8
%bk=bitcast i8*%bg to i8**
store i8*%bj,i8**%bk,align 8
%bl=getelementptr inbounds i8,i8*%bg,i64 8
%bm=bitcast i8*%bl to void(...)**
store void(...)*bitcast(void(i8*,i32)*@_SMLLL7w__close_93 to void(...)*),void(...)**%bm,align 8
%bn=getelementptr inbounds i8,i8*%bg,i64 16
%bo=bitcast i8*%bn to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLL7w__close_146 to void(...)*),void(...)**%bo,align 8
%bp=getelementptr inbounds i8,i8*%bg,i64 24
%bq=bitcast i8*%bp to i32*
store i32 -2147483647,i32*%bq,align 4
%br=load i8*,i8**%m,align 8
%bs=getelementptr inbounds i8,i8*%br,i64 8
%bt=bitcast i8*%bs to i8**
%bu=load i8*,i8**%bt,align 8
store i8*%bu,i8**%i,align 8
%bv=call i8*@sml_alloc(i32 inreg 36)#0
%bw=getelementptr inbounds i8,i8*%bv,i64 -4
%bx=bitcast i8*%bw to i32*
store i32 1342177312,i32*%bx,align 4
store i8*%bv,i8**%j,align 8
%by=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%bz=bitcast i8*%bv to i8**
store i8*%by,i8**%bz,align 8
%bA=load i8*,i8**%l,align 8
%bB=getelementptr inbounds i8,i8*%bv,i64 8
%bC=bitcast i8*%bB to i8**
store i8*%bA,i8**%bC,align 8
%bD=load i8*,i8**%d,align 8
%bE=getelementptr inbounds i8,i8*%bv,i64 16
%bF=bitcast i8*%bE to i8**
store i8*%bD,i8**%bF,align 8
%bG=getelementptr inbounds i8,i8*%bv,i64 24
%bH=bitcast i8*%bG to i32*
store i32%C,i32*%bH,align 4
%bI=getelementptr inbounds i8,i8*%bv,i64 32
%bJ=bitcast i8*%bI to i32*
store i32 7,i32*%bJ,align 4
%bK=call i8*@sml_alloc(i32 inreg 28)#0
%bL=getelementptr inbounds i8,i8*%bK,i64 -4
%bM=bitcast i8*%bL to i32*
store i32 1342177304,i32*%bM,align 4
store i8*%bK,i8**%k,align 8
%bN=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%bO=bitcast i8*%bK to i8**
store i8*%bN,i8**%bO,align 8
%bP=getelementptr inbounds i8,i8*%bK,i64 8
%bQ=bitcast i8*%bP to void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_95 to void(...)*),void(...)**%bQ,align 8
%bR=getelementptr inbounds i8,i8*%bK,i64 16
%bS=bitcast i8*%bR to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_147 to void(...)*),void(...)**%bS,align 8
%bT=getelementptr inbounds i8,i8*%bK,i64 24
%bU=bitcast i8*%bT to i32*
store i32 -2147483647,i32*%bU,align 4
%bV=call i8*@sml_alloc(i32 inreg 12)#0
%bW=getelementptr inbounds i8,i8*%bV,i64 -4
%bX=bitcast i8*%bW to i32*
store i32 1342177288,i32*%bX,align 4
store i8*%bV,i8**%i,align 8
%bY=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%bZ=bitcast i8*%bV to i8**
store i8*%bY,i8**%bZ,align 8
%b0=getelementptr inbounds i8,i8*%bV,i64 8
%b1=bitcast i8*%b0 to i32*
store i32 1,i32*%b1,align 4
%b2=load i8**,i8***%aJ,align 8
%b3=load i8*,i8**%b2,align 8
store i8*%b3,i8**%j,align 8
%b4=call i8*@sml_alloc(i32 inreg 36)#0
%b5=getelementptr inbounds i8,i8*%b4,i64 -4
%b6=bitcast i8*%b5 to i32*
store i32 1342177312,i32*%b6,align 4
store i8*%b4,i8**%k,align 8
%b7=load i8*,i8**%j,align 8
store i8*null,i8**%j,align 8
%b8=bitcast i8*%b4 to i8**
store i8*%b7,i8**%b8,align 8
%b9=load i8*,i8**%l,align 8
%ca=getelementptr inbounds i8,i8*%b4,i64 8
%cb=bitcast i8*%ca to i8**
store i8*%b9,i8**%cb,align 8
%cc=load i8*,i8**%d,align 8
%cd=getelementptr inbounds i8,i8*%b4,i64 16
%ce=bitcast i8*%cd to i8**
store i8*%cc,i8**%ce,align 8
%cf=getelementptr inbounds i8,i8*%b4,i64 24
%cg=bitcast i8*%cf to i32*
store i32%C,i32*%cg,align 4
%ch=getelementptr inbounds i8,i8*%b4,i64 32
%ci=bitcast i8*%ch to i32*
store i32 7,i32*%ci,align 4
%cj=call i8*@sml_alloc(i32 inreg 28)#0
%ck=getelementptr inbounds i8,i8*%cj,i64 -4
%cl=bitcast i8*%ck to i32*
store i32 1342177304,i32*%cl,align 4
store i8*%cj,i8**%n,align 8
%cm=load i8*,i8**%k,align 8
store i8*null,i8**%k,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 void(...)**
store void(...)*bitcast(i32(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_97 to void(...)*),void(...)**%cp,align 8
%cq=getelementptr inbounds i8,i8*%cj,i64 16
%cr=bitcast i8*%cq to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_148 to void(...)*),void(...)**%cr,align 8
%cs=getelementptr inbounds i8,i8*%cj,i64 24
%ct=bitcast i8*%cs to i32*
store i32 -2147483647,i32*%ct,align 4
%cu=call i8*@sml_alloc(i32 inreg 12)#0
%cv=getelementptr inbounds i8,i8*%cu,i64 -4
%cw=bitcast i8*%cv to i32*
store i32 1342177288,i32*%cw,align 4
store i8*%cu,i8**%j,align 8
%cx=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%cy=bitcast i8*%cu to i8**
store i8*%cx,i8**%cy,align 8
%cz=getelementptr inbounds i8,i8*%cu,i64 8
%cA=bitcast i8*%cz to i32*
store i32 1,i32*%cA,align 4
%cB=load i8*,i8**%m,align 8
%cC=getelementptr inbounds i8,i8*%cB,i64 8
%cD=bitcast i8*%cC to i8**
%cE=load i8*,i8**%cD,align 8
store i8*%cE,i8**%k,align 8
%cF=getelementptr inbounds i8,i8*%cB,i64 24
%cG=bitcast i8*%cF to i32*
%cH=load i32,i32*%cG,align 4
%cI=call i8*@sml_alloc(i32 inreg 36)#0
%cJ=getelementptr inbounds i8,i8*%cI,i64 -4
%cK=bitcast i8*%cJ to i32*
store i32 1342177312,i32*%cK,align 4
store i8*%cI,i8**%n,align 8
%cL=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%cM=bitcast i8*%cI to i8**
store i8*%cL,i8**%cM,align 8
%cN=load i8*,i8**%l,align 8
%cO=getelementptr inbounds i8,i8*%cI,i64 8
%cP=bitcast i8*%cO to i8**
store i8*%cN,i8**%cP,align 8
%cQ=load i8*,i8**%d,align 8
%cR=getelementptr inbounds i8,i8*%cI,i64 16
%cS=bitcast i8*%cR to i8**
store i8*%cQ,i8**%cS,align 8
%cT=getelementptr inbounds i8,i8*%cI,i64 24
%cU=bitcast i8*%cT to i32*
store i32%cH,i32*%cU,align 4
%cV=getelementptr inbounds i8,i8*%cI,i64 28
%cW=bitcast i8*%cV to i32*
store i32%C,i32*%cW,align 4
%cX=getelementptr inbounds i8,i8*%cI,i64 32
%cY=bitcast i8*%cX to i32*
store i32 7,i32*%cY,align 4
%cZ=call i8*@sml_alloc(i32 inreg 28)#0
%c0=getelementptr inbounds i8,i8*%cZ,i64 -4
%c1=bitcast i8*%c0 to i32*
store i32 1342177304,i32*%c1,align 4
store i8*%cZ,i8**%p,align 8
%c2=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%c3=bitcast i8*%cZ to i8**
store i8*%c2,i8**%c3,align 8
%c4=getelementptr inbounds i8,i8*%cZ,i64 8
%c5=bitcast i8*%c4 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_99 to void(...)*),void(...)**%c5,align 8
%c6=getelementptr inbounds i8,i8*%cZ,i64 16
%c7=bitcast i8*%c6 to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_99 to void(...)*),void(...)**%c7,align 8
%c8=getelementptr inbounds i8,i8*%cZ,i64 24
%c9=bitcast i8*%c8 to i32*
store i32 -2147483647,i32*%c9,align 4
%da=call i8*@sml_alloc(i32 inreg 12)#0
%db=getelementptr inbounds i8,i8*%da,i64 -4
%dc=bitcast i8*%db to i32*
store i32 1342177288,i32*%dc,align 4
store i8*%da,i8**%k,align 8
%dd=load i8*,i8**%p,align 8
store i8*null,i8**%p,align 8
%de=bitcast i8*%da to i8**
store i8*%dd,i8**%de,align 8
%df=getelementptr inbounds i8,i8*%da,i64 8
%dg=bitcast i8*%df to i32*
store i32 1,i32*%dg,align 4
%dh=load i8**,i8***%aJ,align 8
%di=load i8*,i8**%dh,align 8
store i8*%di,i8**%n,align 8
%dj=getelementptr inbounds i8*,i8**%dh,i64 3
%dk=bitcast i8**%dj to i32*
%dl=load i32,i32*%dk,align 4
%dm=call i8*@sml_alloc(i32 inreg 36)#0
%dn=getelementptr inbounds i8,i8*%dm,i64 -4
%do=bitcast i8*%dn to i32*
store i32 1342177312,i32*%do,align 4
store i8*%dm,i8**%p,align 8
%dp=load i8*,i8**%n,align 8
store i8*null,i8**%n,align 8
%dq=bitcast i8*%dm to i8**
store i8*%dp,i8**%dq,align 8
%dr=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%ds=getelementptr inbounds i8,i8*%dm,i64 8
%dt=bitcast i8*%ds to i8**
store i8*%dr,i8**%dt,align 8
%du=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%dv=getelementptr inbounds i8,i8*%dm,i64 16
%dw=bitcast i8*%dv to i8**
store i8*%du,i8**%dw,align 8
%dx=getelementptr inbounds i8,i8*%dm,i64 24
%dy=bitcast i8*%dx to i32*
store i32%dl,i32*%dy,align 4
%dz=getelementptr inbounds i8,i8*%dm,i64 28
%dA=bitcast i8*%dz to i32*
store i32%C,i32*%dA,align 4
%dB=getelementptr inbounds i8,i8*%dm,i64 32
%dC=bitcast i8*%dB to i32*
store i32 7,i32*%dC,align 4
%dD=call i8*@sml_alloc(i32 inreg 28)#0
%dE=getelementptr inbounds i8,i8*%dD,i64 -4
%dF=bitcast i8*%dE to i32*
store i32 1342177304,i32*%dF,align 4
store i8*%dD,i8**%l,align 8
%dG=load i8*,i8**%p,align 8
store i8*null,i8**%p,align 8
%dH=bitcast i8*%dD to i8**
store i8*%dG,i8**%dH,align 8
%dI=getelementptr inbounds i8,i8*%dD,i64 8
%dJ=bitcast i8*%dI to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101 to void(...)*),void(...)**%dJ,align 8
%dK=getelementptr inbounds i8,i8*%dD,i64 16
%dL=bitcast i8*%dK to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_101 to void(...)*),void(...)**%dL,align 8
%dM=getelementptr inbounds i8,i8*%dD,i64 24
%dN=bitcast i8*%dM to i32*
store i32 -2147483647,i32*%dN,align 4
%dO=call i8*@sml_alloc(i32 inreg 12)#0
%dP=getelementptr inbounds i8,i8*%dO,i64 -4
%dQ=bitcast i8*%dP to i32*
store i32 1342177288,i32*%dQ,align 4
store i8*%dO,i8**%d,align 8
%dR=load i8*,i8**%l,align 8
store i8*null,i8**%l,align 8
%dS=bitcast i8*%dO to i8**
store i8*%dR,i8**%dS,align 8
%dT=getelementptr inbounds i8,i8*%dO,i64 8
%dU=bitcast i8*%dT to i32*
store i32 1,i32*%dU,align 4
%dV=call i8*@sml_alloc(i32 inreg 12)#0
%dW=getelementptr inbounds i8,i8*%dV,i64 -4
%dX=bitcast i8*%dW to i32*
store i32 1342177288,i32*%dX,align 4
store i8*%dV,i8**%l,align 8
%dY=getelementptr inbounds i8,i8*%dV,i64 4
%dZ=bitcast i8*%dY to i32*
store i32 0,i32*%dZ,align 1
%d0=bitcast i8*%dV to i32*
store i32%C,i32*%d0,align 4
%d1=getelementptr inbounds i8,i8*%dV,i64 8
%d2=bitcast i8*%d1 to i32*
store i32 0,i32*%d2,align 4
%d3=load i8*,i8**%m,align 8
%d4=getelementptr inbounds i8,i8*%d3,i64 16
%d5=bitcast i8*%d4 to i8**
%d6=load i8*,i8**%d5,align 8
%d7=getelementptr inbounds i8,i8*%d6,i64 16
%d8=bitcast i8*%d7 to i8*(i8*,i8*)**
%d9=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%d8,align 8
%ea=bitcast i8*%d6 to i8**
%eb=load i8*,i8**%ea,align 8
store i8*%eb,i8**%m,align 8
%ec=call i8*@sml_alloc(i32 inreg 116)#0
%ed=getelementptr inbounds i8,i8*%ec,i64 -4
%ee=bitcast i8*%ed to i32*
store i32 1342177392,i32*%ee,align 4
%ef=getelementptr inbounds i8,i8*%ec,i64 16
%eg=bitcast i8*%ef to i32*
call void@llvm.memset.p0i8.i64(i8*%ec,i8 0,i64 24,i1 false)
store i32%z,i32*%eg,align 4
%eh=load i8*,i8**%o,align 8
%ei=getelementptr inbounds i8,i8*%ec,i64 24
%ej=bitcast i8*%ei to i8**
store i8*%eh,i8**%ej,align 8
%ek=load i8*,i8**%g,align 8
%el=getelementptr inbounds i8,i8*%ec,i64 32
%em=bitcast i8*%el to i8**
store i8*%ek,i8**%em,align 8
%en=load i8*,i8**%e,align 8
%eo=getelementptr inbounds i8,i8*%ec,i64 40
%ep=bitcast i8*%eo to i8**
store i8*%en,i8**%ep,align 8
%eq=load i8*,i8**%l,align 8
%er=getelementptr inbounds i8,i8*%ec,i64 48
%es=bitcast i8*%er to i8**
store i8*%eq,i8**%es,align 8
%et=load i8*,i8**%c,align 8
%eu=getelementptr inbounds i8,i8*%ec,i64 56
%ev=bitcast i8*%eu to i8**
store i8*%et,i8**%ev,align 8
%ew=load i8*,i8**%f,align 8
%ex=getelementptr inbounds i8,i8*%ec,i64 64
%ey=bitcast i8*%ex to i8**
store i8*%ew,i8**%ey,align 8
%ez=load i8*,i8**%h,align 8
%eA=getelementptr inbounds i8,i8*%ec,i64 72
%eB=bitcast i8*%eA to i8**
store i8*%ez,i8**%eB,align 8
%eC=load i8*,i8**%j,align 8
%eD=getelementptr inbounds i8,i8*%ec,i64 80
%eE=bitcast i8*%eD to i8**
store i8*%eC,i8**%eE,align 8
%eF=load i8*,i8**%d,align 8
%eG=getelementptr inbounds i8,i8*%ec,i64 88
%eH=bitcast i8*%eG to i8**
store i8*%eF,i8**%eH,align 8
%eI=load i8*,i8**%i,align 8
%eJ=getelementptr inbounds i8,i8*%ec,i64 96
%eK=bitcast i8*%eJ to i8**
store i8*%eI,i8**%eK,align 8
%eL=load i8*,i8**%k,align 8
%eM=getelementptr inbounds i8,i8*%ec,i64 104
%eN=bitcast i8*%eM to i8**
store i8*%eL,i8**%eN,align 8
%eO=getelementptr inbounds i8,i8*%ec,i64 112
%eP=bitcast i8*%eO to i32*
store i32 16379,i32*%eP,align 4
%eQ=load i8*,i8**%m,align 8
%eR=tail call fastcc i8*%d9(i8*inreg%eQ,i8*inreg%ec)
ret i8*%eR
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_103(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
call void@llvm.gcroot(i8**%f,i8*null)#0
%g=bitcast i8*%b to i8**
%h=load i8*,i8**%g,align 8
store i8*%h,i8**%c,align 8
%i=getelementptr inbounds i8,i8*%b,i64 8
%j=bitcast i8*%i to i8**
%k=load i8*,i8**%j,align 8
store i8*%k,i8**%d,align 8
%l=getelementptr inbounds i8,i8*%b,i64 16
%m=bitcast i8*%l to i8**
%n=load i8*,i8**%m,align 8
store i8*%n,i8**%e,align 8
%o=bitcast i8*%a to i32*
%p=load i32,i32*%o,align 4
%q=call i8*@sml_alloc(i32 inreg 36)#0
%r=getelementptr inbounds i8,i8*%q,i64 -4
%s=bitcast i8*%r to i32*
store i32 1342177312,i32*%s,align 4
store i8*%q,i8**%f,align 8
%t=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%u=bitcast i8*%q to i8**
store i8*%t,i8**%u,align 8
%v=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%w=getelementptr inbounds i8,i8*%q,i64 8
%x=bitcast i8*%w to i8**
store i8*%v,i8**%x,align 8
%y=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%z=getelementptr inbounds i8,i8*%q,i64 16
%A=bitcast i8*%z to i8**
store i8*%y,i8**%A,align 8
%B=getelementptr inbounds i8,i8*%q,i64 24
%C=bitcast i8*%B to i32*
store i32%p,i32*%C,align 4
%D=getelementptr inbounds i8,i8*%q,i64 32
%E=bitcast i8*%D to i32*
store i32 7,i32*%E,align 4
%F=call i8*@sml_alloc(i32 inreg 28)#0
%G=getelementptr inbounds i8,i8*%F,i64 -4
%H=bitcast i8*%G to i32*
store i32 1342177304,i32*%H,align 4
%I=load i8*,i8**%f,align 8
%J=bitcast i8*%F to i8**
store i8*%I,i8**%J,align 8
%K=getelementptr inbounds i8,i8*%F,i64 8
%L=bitcast i8*%K to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_102 to void(...)*),void(...)**%L,align 8
%M=getelementptr inbounds i8,i8*%F,i64 16
%N=bitcast i8*%M to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_102 to void(...)*),void(...)**%N,align 8
%O=getelementptr inbounds i8,i8*%F,i64 24
%P=bitcast i8*%O to i32*
store i32 -2147483647,i32*%P,align 4
ret i8*%F
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_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*@_SMLFN15CharVectorSlice4baseE(i8*inreg%i)
%l=bitcast i8*%k to i8**
%m=load i8*,i8**%l,align 8
%n=getelementptr inbounds i8,i8*%k,i64 8
%o=bitcast i8*%n to i32*
%p=load i32,i32*%o,align 4
%q=getelementptr inbounds i8,i8*%k,i64 12
%r=bitcast i8*%q to i32*
%s=load i32,i32*%r,align 4
%t=call fastcc i8*@_SMLFN4Byte13stringToBytesE(i8*inreg%m)
store i8*%t,i8**%b,align 8
%u=call i8*@sml_alloc(i32 inreg 12)#0
%v=getelementptr inbounds i8,i8*%u,i64 -4
%w=bitcast i8*%v to i32*
store i32 1342177288,i32*%w,align 4
store i8*%u,i8**%c,align 8
%x=getelementptr inbounds i8,i8*%u,i64 4
%y=bitcast i8*%x to i32*
store i32 0,i32*%y,align 1
%z=bitcast i8*%u to i32*
store i32%s,i32*%z,align 4
%A=getelementptr inbounds i8,i8*%u,i64 8
%B=bitcast i8*%A to i32*
store i32 0,i32*%B,align 4
%C=call i8*@sml_alloc(i32 inreg 28)#0
%D=getelementptr inbounds i8,i8*%C,i64 -4
%E=bitcast i8*%D to i32*
store i32 1342177304,i32*%E,align 4
%F=getelementptr inbounds i8,i8*%C,i64 12
%G=bitcast i8*%F to i32*
store i32 0,i32*%G,align 1
%H=load i8*,i8**%b,align 8
%I=bitcast i8*%C to i8**
store i8*%H,i8**%I,align 8
%J=getelementptr inbounds i8,i8*%C,i64 8
%K=bitcast i8*%J to i32*
store i32%p,i32*%K,align 4
%L=load i8*,i8**%c,align 8
%M=getelementptr inbounds i8,i8*%C,i64 16
%N=bitcast i8*%M to i8**
store i8*%L,i8**%N,align 8
%O=getelementptr inbounds i8,i8*%C,i64 24
%P=bitcast i8*%O to i32*
store i32 5,i32*%P,align 4
%Q=tail call fastcc i8*@_SMLFN16Word8VectorSlice5sliceE(i8*inreg%C)
ret i8*%Q
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_106(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=bitcast i8*%k to i8**
%m=load i8*,i8**%l,align 8
store i8*%m,i8**%b,align 8
%n=getelementptr inbounds i8,i8*%k,i64 8
%o=bitcast i8*%n to i32*
%p=load i32,i32*%o,align 4
%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%p,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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_108(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_110(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_112(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_115(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_117(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_119(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_121(i8*inreg%a)#4 gc"smlsharp"{
ret i8*%a
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_124(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*@_SMLLL6getPos_132(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*@_SMLLL6setPos_133(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@_SMLLL6setPos_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*@_SMLLL6endPos_134(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@_SMLLL6endPos_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*@_SMLLL9verifyPos_135(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@_SMLLL9verifyPos_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*@_SMLLL7r__close_137(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@_SMLLL7r__close_77(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*@_SMLLL5avail_138(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*@_SMLLL5avail_79(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_81(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_140(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkReaderE_83(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*@_SMLLL4putV_144(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLLL4putV_91(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*@_SMLLL4putA_145(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLLL4putA_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*@_SMLLL7w__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@_SMLLL7w__close_93(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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_147(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_148(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO8mkWriterE_97(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*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_149(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__vsE_104(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_150(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO6c2w__asE_106(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_151(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_152(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE_153(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextReaderE_154(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_155(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_156(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE_157(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
ret i8*%b
}
define internal fastcc i8*@_SMLLLN23SMLSharp__SMLNJ__POSIX__IO12mkTextWriterE_158(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}
