@sml_check_flag=external local_unnamed_addr global i32
@_SMLZ8Overflow=external unnamed_addr constant i8*
@a=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i8*)*@_SMLFN5Int167compareE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common7compareE_107 to void(...)*),i32 -2147483647}>,align 8
@b=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i16(i8*)*@_SMLFN5Int163minE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common3minE_108 to void(...)*),i32 -2147483647}>,align 8
@c=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i16(i8*)*@_SMLFN5Int163maxE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common3maxE_109 to void(...)*),i32 -2147483647}>,align 8
@d=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i16)*@_SMLFN5Int164signE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4signE_110 to void(...)*),i32 -2147483647}>,align 8
@e=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:67.16(1648)\00"}>,align 8
@f=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:73.66(1968)\00"}>,align 8
@g=private unnamed_addr constant<{[4x i8],i32,[2x i8]}><{[4x i8]zeroinitializer,i32 -2147483646,[2x i8]c"0\00"}>,align 8
@h=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i32)*@_SMLFN5Int163fmtE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common3fmtE_112 to void(...)*),i32 -2147483647}>,align 8
@i=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:89.18(2459)\00"}>,align 8
@j=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:91.44(2564)\00"}>,align 8
@k=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:91.50(2570)\00"}>,align 8
@l=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:91.48(2568)\00"}>,align 8
@m=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:93.44(2678)\00"}>,align 8
@n=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:93.50(2684)\00"}>,align 8
@o=private unnamed_addr constant<{[4x i8],i32,[42x i8]}><{[4x i8]zeroinitializer,i32 -2147483606,[42x i8]c"src/basis/main/Int_common.sml:93.48(2682)\00"}>,align 8
@p=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i16)*@_SMLFN5Int167toLargeE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int167toLargeE_117 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int167toLargeE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@p,i64 0,i32 2)to i8*)
@q=private unnamed_addr constant<{[4x i8],i32,[36x i8]}><{[4x i8]zeroinitializer,i32 -2147483612,[36x i8]c"src/basis/main/Int16.sml:15.20(305)\00"}>,align 8
@r=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i16(i8*)*@_SMLFN5Int169fromLargeE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int169fromLargeE_118 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int169fromLargeE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@r,i64 0,i32 2)to i8*)
@s=private unnamed_addr constant<{[4x i8],i32,i32,[4x i8],i32}><{[4x i8]zeroinitializer,i32 -805306360,i32 16,[4x i8]zeroinitializer,i32 0}>,align 8
@_SMLZN5Int169precisionE=local_unnamed_addr constant i8*bitcast(i32*getelementptr inbounds(<{[4x i8],i32,i32,[4x i8],i32}>,<{[4x i8],i32,i32,[4x i8],i32}>*@s,i64 0,i32 2)to i8*)
@t=private unnamed_addr constant<{[4x i8],i32,i16,[6x i8],i32}><{[4x i8]zeroinitializer,i32 -805306360,i16 -32768,[6x i8]zeroinitializer,i32 0}>,align 8
@_SMLZN5Int166minIntE=local_unnamed_addr constant i8*bitcast(i16*getelementptr inbounds(<{[4x i8],i32,i16,[6x i8],i32}>,<{[4x i8],i32,i16,[6x i8],i32}>*@t,i64 0,i32 2)to i8*)
@u=private unnamed_addr constant<{[4x i8],i32,i16,[6x i8],i32}><{[4x i8]zeroinitializer,i32 -805306360,i16 32767,[6x i8]zeroinitializer,i32 0}>,align 8
@_SMLZN5Int166maxIntE=local_unnamed_addr constant i8*bitcast(i16*getelementptr inbounds(<{[4x i8],i32,i16,[6x i8],i32}>,<{[4x i8],i32,i16,[6x i8],i32}>*@u,i64 0,i32 2)to i8*)
@_SMLZN5Int167compareE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@a,i64 0,i32 2)to i8*)
@_SMLZN5Int163minE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@b,i64 0,i32 2)to i8*)
@_SMLZN5Int163maxE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@c,i64 0,i32 2)to i8*)
@_SMLZN5Int164signE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@d,i64 0,i32 2)to i8*)
@v=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i8*)*@_SMLFN5Int168sameSignE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int168sameSignE_119 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int168sameSignE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@v,i64 0,i32 2)to i8*)
@_SMLZN5Int163fmtE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@h,i64 0,i32 2)to i8*)
@w=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i16)*@_SMLFN5Int168toStringE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int168toStringE_120 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int168toStringE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@w,i64 0,i32 2)to i8*)
@x=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i32,i32)*@_SMLFN5Int164scanE to void(...)*),void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLLN5Int164scanE_122 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int164scanE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@x,i64 0,i32 2)to i8*)
@y=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN5Int1610fromStringE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int1610fromStringE_123 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN5Int1610fromStringE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@y,i64 0,i32 2)to i8*)
@_SML_ftab20bb944d2a1e9531_Int16=external global i8
@z=private unnamed_addr global i8 0
declare void@llvm.gcroot(i8**,i8*)#0
declare{i16,i1}@llvm.sadd.with.overflow.i16(i16,i16)#0
declare{i16,i1}@llvm.smul.with.overflow.i16(i16,i16)#0
declare{i16,i1}@llvm.ssub.with.overflow.i16(i16,i16)#0
declare i8*@sml_alloc(i32 inreg)local_unnamed_addr#0
declare void@sml_check(i32 inreg)local_unnamed_addr
declare void@sml_gcroot(i8*,void()*,i8*,i8*)local_unnamed_addr#0
declare void@sml_raise(i8*inreg)local_unnamed_addr#1
declare i8*@_SMLFN10CharVector8fromListE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8@_SMLFN17SMLSharp__ScanChar10intToDigitE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN17SMLSharp__ScanChar10radixToIntE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN17SMLSharp__ScanChar7scanIntE(i32 inreg,i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN6IntInf5toIntE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN6IntInf7fromIntE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN9StringCvt10scanStringE(i32 inreg,i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main5c37eb24573fc5f9_StringCvt()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main5d4c3ea7bd6f9540_IntInf()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main4fb8d2c1f12728b2_SMLSharp_ScanChar()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_mainadbb5309e852b68c_CharVector()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_load5c37eb24573fc5f9_StringCvt(i8*)local_unnamed_addr
declare void@_SML_load5d4c3ea7bd6f9540_IntInf(i8*)local_unnamed_addr
declare void@_SML_load4fb8d2c1f12728b2_SMLSharp_ScanChar(i8*)local_unnamed_addr
declare void@_SML_loadadbb5309e852b68c_CharVector(i8*)local_unnamed_addr
define private void@_SML_tabb20bb944d2a1e9531_Int16()#3{
unreachable
}
define void@_SML_load20bb944d2a1e9531_Int16(i8*%a)local_unnamed_addr#0{
%b=load i8,i8*@z,align 1
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 1,i8*@z,align 1
tail call void@_SML_load5c37eb24573fc5f9_StringCvt(i8*%a)#0
tail call void@_SML_load5d4c3ea7bd6f9540_IntInf(i8*%a)#0
tail call void@_SML_load4fb8d2c1f12728b2_SMLSharp_ScanChar(i8*%a)#0
tail call void@_SML_loadadbb5309e852b68c_CharVector(i8*%a)#0
tail call void@sml_gcroot(i8*%a,void()*@_SML_tabb20bb944d2a1e9531_Int16,i8*@_SML_ftab20bb944d2a1e9531_Int16,i8*null)#0
ret void
}
define void@_SML_main20bb944d2a1e9531_Int16()local_unnamed_addr#2 gc"smlsharp"{
%a=load i8,i8*@z,align 1
%b=and i8%a,2
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 3,i8*@z,align 1
tail call void@_SML_main5c37eb24573fc5f9_StringCvt()#2
tail call void@_SML_main5d4c3ea7bd6f9540_IntInf()#2
tail call void@_SML_main4fb8d2c1f12728b2_SMLSharp_ScanChar()#2
tail call void@_SML_mainadbb5309e852b68c_CharVector()#2
br label%d
}
define fastcc i32@_SMLFN5Int167compareE(i8*inreg%a)#4 gc"smlsharp"{
%b=bitcast i8*%a to i16*
%c=load i16,i16*%b,align 2
%d=getelementptr inbounds i8,i8*%a,i64 2
%e=bitcast i8*%d to i16*
%f=load i16,i16*%e,align 2
%g=icmp slt i16%c,%f
%h=icmp ne i16%c,%f
%i=zext i1%h to i32
%j=select i1%g,i32 2,i32%i
ret i32%j
}
define fastcc i16@_SMLFN5Int163minE(i8*inreg%a)#4 gc"smlsharp"{
%b=bitcast i8*%a to i16*
%c=load i16,i16*%b,align 2
%d=getelementptr inbounds i8,i8*%a,i64 2
%e=bitcast i8*%d to i16*
%f=load i16,i16*%e,align 2
%g=icmp slt i16%c,%f
%h=select i1%g,i16%c,i16%f
ret i16%h
}
define fastcc i16@_SMLFN5Int163maxE(i8*inreg%a)#4 gc"smlsharp"{
%b=bitcast i8*%a to i16*
%c=load i16,i16*%b,align 2
%d=getelementptr inbounds i8,i8*%a,i64 2
%e=bitcast i8*%d to i16*
%f=load i16,i16*%e,align 2
%g=icmp sgt i16%c,%f
%h=select i1%g,i16%c,i16%f
ret i16%h
}
define fastcc i32@_SMLFN5Int164signE(i16 inreg%a)#4 gc"smlsharp"{
%b=icmp sgt i16%a,-1
%c=icmp ne i16%a,0
%d=zext i1%c to i32
%e=select i1%b,i32%d,i32 -1
ret i32%e
}
define internal fastcc i8*@_SMLL4loop_69(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
i:
%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=bitcast i8**%d to i16**
br label%g
g:
%h=phi i8*[%P,%C],[%b,%i]
store i8*%h,i8**%c,align 8
%j=load atomic i32,i32*@sml_check_flag unordered,align 4
%k=icmp eq i32%j,0
br i1%k,label%n,label%l
l:
call void@sml_check(i32 inreg%j)
%m=load i8*,i8**%c,align 8
br label%n
n:
%o=phi i8*[%m,%l],[%h,%g]
%p=bitcast i8*%o to i16*
%q=load i16,i16*%p,align 2
%r=getelementptr inbounds i8,i8*%o,i64 8
%s=bitcast i8*%r to i8**
%t=load i8*,i8**%s,align 8
store i8*%t,i8**%c,align 8
%u=icmp slt i16%q,0
br i1%u,label%w,label%v
v:
ret i8*%t
w:
%x=load i16*,i16**%f,align 8
%y=load i16,i16*%x,align 2
%z=srem i16%q,%y
%A=sdiv i16%q,%y
%B=icmp eq i16%z,-32768
br i1%B,label%Z,label%C
C:
%D=sub nsw i16 0,%z
%E=sext i16%D to i32
%F=call fastcc i8@_SMLFN17SMLSharp__ScanChar10intToDigitE(i32 inreg%E)
%G=call i8*@sml_alloc(i32 inreg 20)#0
%H=getelementptr inbounds i8,i8*%G,i64 -4
%I=bitcast i8*%H to i32*
store i32 1342177296,i32*%I,align 4
store i8*%G,i8**%e,align 8
%J=getelementptr inbounds i8,i8*%G,i64 1
call void@llvm.memset.p0i8.i32(i8*%J,i8 0,i32 7,i1 false)
store i8%F,i8*%G,align 1
%K=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%L=getelementptr inbounds i8,i8*%G,i64 8
%M=bitcast i8*%L to i8**
store i8*%K,i8**%M,align 8
%N=getelementptr inbounds i8,i8*%G,i64 16
%O=bitcast i8*%N to i32*
store i32 2,i32*%O,align 4
%P=call i8*@sml_alloc(i32 inreg 20)#0
%Q=getelementptr inbounds i8,i8*%P,i64 -4
%R=bitcast i8*%Q to i32*
store i32 1342177296,i32*%R,align 4
%S=getelementptr inbounds i8,i8*%P,i64 2
call void@llvm.memset.p0i8.i32(i8*%S,i8 0,i32 6,i1 false)
%T=bitcast i8*%P to i16*
store i16%A,i16*%T,align 2
%U=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%V=getelementptr inbounds i8,i8*%P,i64 8
%W=bitcast i8*%V to i8**
store i8*%U,i8**%W,align 8
%X=getelementptr inbounds i8,i8*%P,i64 16
%Y=bitcast i8*%X to i32*
store i32 2,i32*%Y,align 4
br label%g
Z:
store i8*null,i8**%d,align 8
%aa=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%aa,i8**%c,align 8
%ab=call i8*@sml_alloc(i32 inreg 20)#0
%ac=getelementptr inbounds i8,i8*%ab,i64 -4
%ad=bitcast i8*%ac to i32*
store i32 1342177296,i32*%ad,align 4
store i8*%ab,i8**%d,align 8
%ae=load i8*,i8**%c,align 8
store i8*null,i8**%c,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 i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@f,i64 0,i32 2,i64 0),i8**%ah,align 8
%ai=getelementptr inbounds i8,i8*%ab,i64 16
%aj=bitcast i8*%ai to i32*
store i32 3,i32*%aj,align 4
%ak=call i8*@sml_alloc(i32 inreg 60)#0
%al=getelementptr inbounds i8,i8*%ak,i64 -4
%am=bitcast i8*%al to i32*
store i32 1342177336,i32*%am,align 4
%an=getelementptr inbounds i8,i8*%ak,i64 56
%ao=bitcast i8*%an to i32*
store i32 1,i32*%ao,align 4
%ap=load i8*,i8**%d,align 8
%aq=bitcast i8*%ak to i8**
store i8*%ap,i8**%aq,align 8
call void@sml_raise(i8*inreg%ak)#1
unreachable
}
define internal fastcc i8*@_SMLLN10Int__common3fmtE_73(i8*inreg%a,i16 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
%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 i32*
br label%l
i:
call void@sml_check(i32 inreg%e)
%j=bitcast i8**%c to i32**
%k=load i32*,i32**%j,align 8
br label%l
l:
%m=phi i32*[%k,%i],[%h,%g]
store i8*null,i8**%c,align 8
%n=load i32,i32*%m,align 4
%o=call fastcc i32@_SMLFN17SMLSharp__ScanChar10radixToIntE(i32 inreg%n)
%p=ashr i32%o,15
%q=add nsw i32%p,1
%r=icmp ugt i32%q,1
br i1%r,label%M,label%s
s:
%t=trunc i32%o to i16
%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**%d,align 8
%x=bitcast i8*%u to i16*
store i16%t,i16*%x,align 2
%y=getelementptr inbounds i8,i8*%u,i64 8
%z=bitcast i8*%y to i32*
store i32 0,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**%d,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*)*@_SMLL4loop_69 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*)*@_SMLL4loop_69 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
%L=icmp eq i16%b,0
br i1%L,label%ae,label%af
M:
%N=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%N,i8**%c,align 8
%O=call i8*@sml_alloc(i32 inreg 20)#0
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
store i32 1342177296,i32*%Q,align 4
store i8*%O,i8**%d,align 8
%R=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%S=bitcast i8*%O to i8**
store i8*%R,i8**%S,align 8
%T=getelementptr inbounds i8,i8*%O,i64 8
%U=bitcast i8*%T to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@e,i64 0,i32 2,i64 0),i8**%U,align 8
%V=getelementptr inbounds i8,i8*%O,i64 16
%W=bitcast i8*%V to i32*
store i32 3,i32*%W,align 4
%X=call i8*@sml_alloc(i32 inreg 60)#0
%Y=getelementptr inbounds i8,i8*%X,i64 -4
%Z=bitcast i8*%Y to i32*
store i32 1342177336,i32*%Z,align 4
%aa=getelementptr inbounds i8,i8*%X,i64 56
%ab=bitcast i8*%aa to i32*
store i32 1,i32*%ab,align 4
%ac=load i8*,i8**%d,align 8
%ad=bitcast i8*%X to i8**
store i8*%ac,i8**%ad,align 8
call void@sml_raise(i8*inreg%X)#1
unreachable
ae:
ret i8*getelementptr inbounds(<{[4x i8],i32,[2x i8]}>,<{[4x i8],i32,[2x i8]}>*@g,i64 0,i32 2,i64 0)
af:
%ag=icmp slt i16%b,1
br i1%ag,label%aF,label%ah
ah:
%ai=sub nsw i16 0,%b
%aj=call i8*@sml_alloc(i32 inreg 20)#0
%ak=getelementptr inbounds i8,i8*%aj,i64 -4
%al=bitcast i8*%ak to i32*
store i32 1342177296,i32*%al,align 4
%am=getelementptr inbounds i8,i8*%aj,i64 2
call void@llvm.memset.p0i8.i32(i8*%am,i8 0,i32 6,i1 false)
%an=bitcast i8*%aj to i16*
store i16%ai,i16*%an,align 2
%ao=getelementptr inbounds i8,i8*%aj,i64 8
%ap=bitcast i8*%ao to i8**
store i8*null,i8**%ap,align 8
%aq=getelementptr inbounds i8,i8*%aj,i64 16
%ar=bitcast i8*%aq to i32*
store i32 2,i32*%ar,align 4
store i8*null,i8**%c,align 8
%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
%av=getelementptr inbounds i8,i8*%as,i64 2
call void@llvm.memset.p0i8.i32(i8*%av,i8 0,i32 6,i1 false)
%aw=bitcast i8*%as to i16*
store i16%ai,i16*%aw,align 2
%ax=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%ay=getelementptr inbounds i8,i8*%as,i64 8
%az=bitcast i8*%ay to i8**
store i8*%ax,i8**%az,align 8
%aA=getelementptr inbounds i8,i8*%as,i64 16
%aB=bitcast i8*%aA to i32*
store i32 2,i32*%aB,align 4
%aC=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%aD=call fastcc i8*@_SMLL4loop_69(i8*inreg%aC,i8*inreg%as)
%aE=tail call fastcc i8*@_SMLFN10CharVector8fromListE(i8*inreg%aD)
ret i8*%aE
aF:
%aG=call i8*@sml_alloc(i32 inreg 20)#0
%aH=getelementptr inbounds i8,i8*%aG,i64 -4
%aI=bitcast i8*%aH to i32*
store i32 1342177296,i32*%aI,align 4
%aJ=getelementptr inbounds i8,i8*%aG,i64 2
call void@llvm.memset.p0i8.i32(i8*%aJ,i8 0,i32 6,i1 false)
%aK=bitcast i8*%aG to i16*
store i16%b,i16*%aK,align 2
%aL=getelementptr inbounds i8,i8*%aG,i64 8
%aM=bitcast i8*%aL to i8**
store i8*null,i8**%aM,align 8
%aN=getelementptr inbounds i8,i8*%aG,i64 16
%aO=bitcast i8*%aN to i32*
store i32 2,i32*%aO,align 4
%aP=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%aQ=call fastcc i8*@_SMLL4loop_69(i8*inreg%aP,i8*inreg%aG)
store i8*%aQ,i8**%c,align 8
%aR=call i8*@sml_alloc(i32 inreg 20)#0
%aS=getelementptr inbounds i8,i8*%aR,i64 -4
%aT=bitcast i8*%aS to i32*
store i32 1342177296,i32*%aT,align 4
%aU=getelementptr inbounds i8,i8*%aR,i64 1
call void@llvm.memset.p0i8.i32(i8*%aU,i8 0,i32 7,i1 false)
store i8 126,i8*%aR,align 1
%aV=load i8*,i8**%c,align 8
%aW=getelementptr inbounds i8,i8*%aR,i64 8
%aX=bitcast i8*%aW to i8**
store i8*%aV,i8**%aX,align 8
%aY=getelementptr inbounds i8,i8*%aR,i64 16
%aZ=bitcast i8*%aY to i32*
store i32 2,i32*%aZ,align 4
%a0=tail call fastcc i8*@_SMLFN10CharVector8fromListE(i8*inreg%aR)
ret i8*%a0
}
define fastcc i8*@_SMLFN5Int163fmtE(i32 inreg%a)#4 gc"smlsharp"{
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
%c=call i8*@sml_alloc(i32 inreg 12)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 1342177288,i32*%f,align 4
store i8*%c,i8**%b,align 8
store i32%a,i32*%d,align 4
%g=getelementptr inbounds i8,i8*%c,i64 8
%h=bitcast i8*%g to i32*
store i32 0,i32*%h,align 4
%i=call i8*@sml_alloc(i32 inreg 28)#0
%j=getelementptr inbounds i8,i8*%i,i64 -4
%k=bitcast i8*%j to i32*
store i32 1342177304,i32*%k,align 4
%l=load i8*,i8**%b,align 8
%m=bitcast i8*%i to i8**
store i8*%l,i8**%m,align 8
%n=getelementptr inbounds i8,i8*%i,i64 8
%o=bitcast i8*%n to void(...)**
store void(...)*bitcast(i8*(i8*,i16)*@_SMLLN10Int__common3fmtE_73 to void(...)*),void(...)**%o,align 8
%p=getelementptr inbounds i8,i8*%i,i64 16
%q=bitcast i8*%p to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common3fmtE_111 to void(...)*),void(...)**%q,align 8
%r=getelementptr inbounds i8,i8*%i,i64 24
%s=bitcast i8*%r to i32*
store i32 -2147483647,i32*%s,align 4
ret i8*%i
}
define internal fastcc i8*@_SMLL7posloop_77(i8*inreg%a,i16 inreg%b,i8*inreg%c)#2 gc"smlsharp"{
h:
%d=alloca i8*,align 8
%e=alloca i8*,align 8
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
br label%f
f:
%g=phi i8*[%q,%bI],[%a,%h]
%i=phi i8*[%bM,%bI],[%c,%h]
%j=phi i16[%bJ,%bI],[%b,%h]
store i8*%i,i8**%e,align 8
%k=load atomic i32,i32*@sml_check_flag unordered,align 4
%l=icmp eq i32%k,0
br i1%l,label%p,label%m
m:
call void@sml_check(i32 inreg%k)
%n=load i8*,i8**%e,align 8
%o=load i8*,i8**%d,align 8
br label%p
p:
%q=phi i8*[%o,%m],[%g,%f]
%r=phi i8*[%n,%m],[%i,%f]
%s=getelementptr inbounds i8,i8*%q,i64 12
%t=bitcast i8*%s to i32*
%u=load i32,i32*%t,align 4
%v=getelementptr inbounds i8,i8*%q,i64 8
%w=bitcast i8*%v to i32*
%x=load i32,i32*%w,align 4
%y=icmp eq i8*%r,null
br i1%y,label%z,label%az
z:
%A=add i32%u,1
%B=sub i32 0,%u
%C=and i32%A,%B
%D=add i32%u,7
%E=add i32%D,%C
%F=and i32%E,-8
%G=lshr i32%C,3
%H=shl i32%x,%G
%I=or i32%F,4
%J=icmp eq i32%x,0
br i1%J,label%N,label%K
K:
%L=bitcast i8*%q to i8**
%M=load i8*,i8**%L,align 8
br label%Y
N:
%O=call i8*@sml_alloc(i32 inreg%u)#0
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
store i32%u,i32*%Q,align 4
%R=load i8*,i8**%d,align 8
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%O,i8*%R,i32%u,i1 false)
%S=getelementptr inbounds i8,i8*%R,i64 12
%T=bitcast i8*%S to i32*
%U=load i32,i32*%T,align 4
%V=getelementptr inbounds i8,i8*%R,i64 8
%W=bitcast i8*%V to i32*
%X=load i32,i32*%W,align 4
br label%Y
Y:
%Z=phi i32[%X,%N],[%x,%K]
%aa=phi i32[%U,%N],[%u,%K]
%ab=phi i8*[%O,%N],[%M,%K]
store i8*%ab,i8**%e,align 8
store i8*null,i8**%d,align 8
%ac=call i8*@sml_alloc(i32 inreg%I)#0
%ad=or i32%F,1342177280
%ae=getelementptr inbounds i8,i8*%ac,i64 -4
%af=bitcast i8*%ae to i32*
store i32%ad,i32*%af,align 4
store i8*%ac,i8**%d,align 8
call void@llvm.memset.p0i8.i32(i8*%ac,i8 0,i32%I,i1 false)
%ag=bitcast i8*%ac to i16*
store i16%j,i16*%ag,align 2
%ah=icmp eq i32%Z,0
%ai=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%aj=sext i32%C to i64
%ak=getelementptr inbounds i8,i8*%ac,i64%aj
br i1%ah,label%an,label%al
al:
%am=bitcast i8*%ak to i8**
store i8*%ai,i8**%am,align 8
br label%ao
an:
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%ak,i8*%ai,i32%aa,i1 false)
br label%ao
ao:
%ap=sext i32%F to i64
%aq=getelementptr inbounds i8,i8*%ac,i64%ap
%ar=bitcast i8*%aq to i32*
store i32%H,i32*%ar,align 4
%as=call i8*@sml_alloc(i32 inreg 12)#0
%at=getelementptr inbounds i8,i8*%as,i64 -4
%au=bitcast i8*%at to i32*
store i32 1342177288,i32*%au,align 4
%av=load i8*,i8**%d,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 1,i32*%ay,align 4
ret i8*%as
az:
%aA=getelementptr inbounds i8,i8*%q,i64 16
%aB=bitcast i8*%aA to i16*
%aC=load i16,i16*%aB,align 2
%aD=call{i16,i1}@llvm.smul.with.overflow.i16(i16%j,i16%aC)#0
%aE=extractvalue{i16,i1}%aD,1
br i1%aE,label%aF,label%aX
aF:
%aG=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%aG,i8**%d,align 8
%aH=call i8*@sml_alloc(i32 inreg 20)#0
%aI=getelementptr inbounds i8,i8*%aH,i64 -4
%aJ=bitcast i8*%aI to i32*
store i32 1342177296,i32*%aJ,align 4
store i8*%aH,i8**%e,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 i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@j,i64 0,i32 2,i64 0),i8**%aN,align 8
%aO=getelementptr inbounds i8,i8*%aH,i64 16
%aP=bitcast i8*%aO to i32*
store i32 3,i32*%aP,align 4
%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**%e,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=mul nsw i16%aC,%j
%aZ=bitcast i8*%r to i32*
%a0=load i32,i32*%aZ,align 4
%a1=ashr i32%a0,15
%a2=add nsw i32%a1,1
%a3=icmp ugt i32%a2,1
br i1%a3,label%a8,label%a4
a4:
%a5=trunc i32%a0 to i16
%a6=call{i16,i1}@llvm.sadd.with.overflow.i16(i16%aY,i16%a5)#0
%a7=extractvalue{i16,i1}%a6,1
br i1%a7,label%bq,label%bI
a8:
%a9=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%a9,i8**%d,align 8
%ba=call i8*@sml_alloc(i32 inreg 20)#0
%bb=getelementptr inbounds i8,i8*%ba,i64 -4
%bc=bitcast i8*%bb to i32*
store i32 1342177296,i32*%bc,align 4
store i8*%ba,i8**%e,align 8
%bd=load i8*,i8**%d,align 8
store i8*null,i8**%d,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 i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@k,i64 0,i32 2,i64 0),i8**%bg,align 8
%bh=getelementptr inbounds i8,i8*%ba,i64 16
%bi=bitcast i8*%bh to i32*
store i32 3,i32*%bi,align 4
%bj=call i8*@sml_alloc(i32 inreg 60)#0
%bk=getelementptr inbounds i8,i8*%bj,i64 -4
%bl=bitcast i8*%bk to i32*
store i32 1342177336,i32*%bl,align 4
%bm=getelementptr inbounds i8,i8*%bj,i64 56
%bn=bitcast i8*%bm to i32*
store i32 1,i32*%bn,align 4
%bo=load i8*,i8**%e,align 8
%bp=bitcast i8*%bj to i8**
store i8*%bo,i8**%bp,align 8
call void@sml_raise(i8*inreg%bj)#1
unreachable
bq:
%br=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%br,i8**%d,align 8
%bs=call i8*@sml_alloc(i32 inreg 20)#0
%bt=getelementptr inbounds i8,i8*%bs,i64 -4
%bu=bitcast i8*%bt to i32*
store i32 1342177296,i32*%bu,align 4
store i8*%bs,i8**%e,align 8
%bv=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%bw=bitcast i8*%bs to i8**
store i8*%bv,i8**%bw,align 8
%bx=getelementptr inbounds i8,i8*%bs,i64 8
%by=bitcast i8*%bx to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@l,i64 0,i32 2,i64 0),i8**%by,align 8
%bz=getelementptr inbounds i8,i8*%bs,i64 16
%bA=bitcast i8*%bz to i32*
store i32 3,i32*%bA,align 4
%bB=call i8*@sml_alloc(i32 inreg 60)#0
%bC=getelementptr inbounds i8,i8*%bB,i64 -4
%bD=bitcast i8*%bC to i32*
store i32 1342177336,i32*%bD,align 4
%bE=getelementptr inbounds i8,i8*%bB,i64 56
%bF=bitcast i8*%bE to i32*
store i32 1,i32*%bF,align 4
%bG=load i8*,i8**%e,align 8
%bH=bitcast i8*%bB to i8**
store i8*%bG,i8**%bH,align 8
call void@sml_raise(i8*inreg%bB)#1
unreachable
bI:
%bJ=add nsw i16%aY,%a5
%bK=getelementptr inbounds i8,i8*%r,i64 8
%bL=bitcast i8*%bK to i8**
%bM=load i8*,i8**%bL,align 8
br label%f
}
define internal fastcc i8*@_SMLL7negloop_81(i8*inreg%a,i16 inreg%b,i8*inreg%c)#2 gc"smlsharp"{
h:
%d=alloca i8*,align 8
%e=alloca i8*,align 8
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
br label%f
f:
%g=phi i8*[%q,%bI],[%a,%h]
%i=phi i8*[%bM,%bI],[%c,%h]
%j=phi i16[%bJ,%bI],[%b,%h]
store i8*%i,i8**%e,align 8
%k=load atomic i32,i32*@sml_check_flag unordered,align 4
%l=icmp eq i32%k,0
br i1%l,label%p,label%m
m:
call void@sml_check(i32 inreg%k)
%n=load i8*,i8**%e,align 8
%o=load i8*,i8**%d,align 8
br label%p
p:
%q=phi i8*[%o,%m],[%g,%f]
%r=phi i8*[%n,%m],[%i,%f]
%s=getelementptr inbounds i8,i8*%q,i64 12
%t=bitcast i8*%s to i32*
%u=load i32,i32*%t,align 4
%v=getelementptr inbounds i8,i8*%q,i64 8
%w=bitcast i8*%v to i32*
%x=load i32,i32*%w,align 4
%y=icmp eq i8*%r,null
br i1%y,label%z,label%az
z:
%A=add i32%u,1
%B=sub i32 0,%u
%C=and i32%A,%B
%D=add i32%u,7
%E=add i32%D,%C
%F=and i32%E,-8
%G=lshr i32%C,3
%H=shl i32%x,%G
%I=or i32%F,4
%J=icmp eq i32%x,0
br i1%J,label%N,label%K
K:
%L=bitcast i8*%q to i8**
%M=load i8*,i8**%L,align 8
br label%Y
N:
%O=call i8*@sml_alloc(i32 inreg%u)#0
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
store i32%u,i32*%Q,align 4
%R=load i8*,i8**%d,align 8
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%O,i8*%R,i32%u,i1 false)
%S=getelementptr inbounds i8,i8*%R,i64 12
%T=bitcast i8*%S to i32*
%U=load i32,i32*%T,align 4
%V=getelementptr inbounds i8,i8*%R,i64 8
%W=bitcast i8*%V to i32*
%X=load i32,i32*%W,align 4
br label%Y
Y:
%Z=phi i32[%X,%N],[%x,%K]
%aa=phi i32[%U,%N],[%u,%K]
%ab=phi i8*[%O,%N],[%M,%K]
store i8*%ab,i8**%e,align 8
store i8*null,i8**%d,align 8
%ac=call i8*@sml_alloc(i32 inreg%I)#0
%ad=or i32%F,1342177280
%ae=getelementptr inbounds i8,i8*%ac,i64 -4
%af=bitcast i8*%ae to i32*
store i32%ad,i32*%af,align 4
store i8*%ac,i8**%d,align 8
call void@llvm.memset.p0i8.i32(i8*%ac,i8 0,i32%I,i1 false)
%ag=bitcast i8*%ac to i16*
store i16%j,i16*%ag,align 2
%ah=icmp eq i32%Z,0
%ai=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%aj=sext i32%C to i64
%ak=getelementptr inbounds i8,i8*%ac,i64%aj
br i1%ah,label%an,label%al
al:
%am=bitcast i8*%ak to i8**
store i8*%ai,i8**%am,align 8
br label%ao
an:
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%ak,i8*%ai,i32%aa,i1 false)
br label%ao
ao:
%ap=sext i32%F to i64
%aq=getelementptr inbounds i8,i8*%ac,i64%ap
%ar=bitcast i8*%aq to i32*
store i32%H,i32*%ar,align 4
%as=call i8*@sml_alloc(i32 inreg 12)#0
%at=getelementptr inbounds i8,i8*%as,i64 -4
%au=bitcast i8*%at to i32*
store i32 1342177288,i32*%au,align 4
%av=load i8*,i8**%d,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 1,i32*%ay,align 4
ret i8*%as
az:
%aA=getelementptr inbounds i8,i8*%q,i64 16
%aB=bitcast i8*%aA to i16*
%aC=load i16,i16*%aB,align 2
%aD=call{i16,i1}@llvm.smul.with.overflow.i16(i16%j,i16%aC)#0
%aE=extractvalue{i16,i1}%aD,1
br i1%aE,label%aF,label%aX
aF:
%aG=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%aG,i8**%d,align 8
%aH=call i8*@sml_alloc(i32 inreg 20)#0
%aI=getelementptr inbounds i8,i8*%aH,i64 -4
%aJ=bitcast i8*%aI to i32*
store i32 1342177296,i32*%aJ,align 4
store i8*%aH,i8**%e,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 i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@m,i64 0,i32 2,i64 0),i8**%aN,align 8
%aO=getelementptr inbounds i8,i8*%aH,i64 16
%aP=bitcast i8*%aO to i32*
store i32 3,i32*%aP,align 4
%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**%e,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=mul nsw i16%aC,%j
%aZ=bitcast i8*%r to i32*
%a0=load i32,i32*%aZ,align 4
%a1=ashr i32%a0,15
%a2=add nsw i32%a1,1
%a3=icmp ugt i32%a2,1
br i1%a3,label%a8,label%a4
a4:
%a5=trunc i32%a0 to i16
%a6=call{i16,i1}@llvm.ssub.with.overflow.i16(i16%aY,i16%a5)#0
%a7=extractvalue{i16,i1}%a6,1
br i1%a7,label%bq,label%bI
a8:
%a9=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%a9,i8**%d,align 8
%ba=call i8*@sml_alloc(i32 inreg 20)#0
%bb=getelementptr inbounds i8,i8*%ba,i64 -4
%bc=bitcast i8*%bb to i32*
store i32 1342177296,i32*%bc,align 4
store i8*%ba,i8**%e,align 8
%bd=load i8*,i8**%d,align 8
store i8*null,i8**%d,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 i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@n,i64 0,i32 2,i64 0),i8**%bg,align 8
%bh=getelementptr inbounds i8,i8*%ba,i64 16
%bi=bitcast i8*%bh to i32*
store i32 3,i32*%bi,align 4
%bj=call i8*@sml_alloc(i32 inreg 60)#0
%bk=getelementptr inbounds i8,i8*%bj,i64 -4
%bl=bitcast i8*%bk to i32*
store i32 1342177336,i32*%bl,align 4
%bm=getelementptr inbounds i8,i8*%bj,i64 56
%bn=bitcast i8*%bm to i32*
store i32 1,i32*%bn,align 4
%bo=load i8*,i8**%e,align 8
%bp=bitcast i8*%bj to i8**
store i8*%bo,i8**%bp,align 8
call void@sml_raise(i8*inreg%bj)#1
unreachable
bq:
%br=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%br,i8**%d,align 8
%bs=call i8*@sml_alloc(i32 inreg 20)#0
%bt=getelementptr inbounds i8,i8*%bs,i64 -4
%bu=bitcast i8*%bt to i32*
store i32 1342177296,i32*%bu,align 4
store i8*%bs,i8**%e,align 8
%bv=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%bw=bitcast i8*%bs to i8**
store i8*%bv,i8**%bw,align 8
%bx=getelementptr inbounds i8,i8*%bs,i64 8
%by=bitcast i8*%bx to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@o,i64 0,i32 2,i64 0),i8**%by,align 8
%bz=getelementptr inbounds i8,i8*%bs,i64 16
%bA=bitcast i8*%bz to i32*
store i32 3,i32*%bA,align 4
%bB=call i8*@sml_alloc(i32 inreg 60)#0
%bC=getelementptr inbounds i8,i8*%bB,i64 -4
%bD=bitcast i8*%bC to i32*
store i32 1342177336,i32*%bD,align 4
%bE=getelementptr inbounds i8,i8*%bB,i64 56
%bF=bitcast i8*%bE to i32*
store i32 1,i32*%bF,align 4
%bG=load i8*,i8**%e,align 8
%bH=bitcast i8*%bB to i8**
store i8*%bG,i8**%bH,align 8
call void@sml_raise(i8*inreg%bB)#1
unreachable
bI:
%bJ=sub nsw i16%aY,%a5
%bK=getelementptr inbounds i8,i8*%r,i64 8
%bL=bitcast i8*%bK to i8**
%bM=load i8*,i8**%bL,align 8
br label%f
}
define internal fastcc i8*@_SMLLN10Int__common4scanE_85(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
m:
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
call void@llvm.gcroot(i8**%f,i8*null)#0
store i8*%a,i8**%e,align 8
store i8*%b,i8**%c,align 8
%g=load atomic i32,i32*@sml_check_flag unordered,align 4
%h=icmp eq i32%g,0
br i1%h,label%k,label%i
i:
call void@sml_check(i32 inreg%g)
%j=load i8*,i8**%e,align 8
br label%k
k:
%l=phi i8*[%j,%i],[%a,%m]
%n=getelementptr inbounds i8,i8*%l,i64 12
%o=bitcast i8*%n to i32*
%p=load i32,i32*%o,align 4
%q=getelementptr inbounds i8,i8*%l,i64 16
%r=bitcast i8*%q to i32*
%s=load i32,i32*%r,align 4
%t=add i32%s,7
%u=sub i32 0,%s
%v=and i32%t,%u
%w=call fastcc i8*@_SMLFN17SMLSharp__ScanChar7scanIntE(i32 inreg%p,i32 inreg%s)
%x=getelementptr inbounds i8,i8*%w,i64 16
%y=bitcast i8*%x to i8*(i8*,i8*)**
%z=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%y,align 8
%A=bitcast i8*%w to i8**
%B=load i8*,i8**%A,align 8
store i8*%B,i8**%d,align 8
%C=load i8*,i8**%e,align 8
%D=getelementptr inbounds i8,i8*%C,i64 8
%E=bitcast i8*%D to i32*
%F=load i32,i32*%E,align 4
%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 4,i32*%J,align 4
store i32%F,i32*%H,align 4
%K=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%L=call fastcc i8*%z(i8*inreg%K,i8*inreg%G)
%M=getelementptr inbounds i8,i8*%L,i64 16
%N=bitcast i8*%M to i8*(i8*,i8*)**
%O=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%N,align 8
%P=bitcast i8*%L to i8**
%Q=load i8*,i8**%P,align 8
%R=bitcast i8**%e to i8***
%S=load i8**,i8***%R,align 8
%T=load i8*,i8**%S,align 8
%U=call fastcc i8*%O(i8*inreg%Q,i8*inreg%T)
%V=getelementptr inbounds i8,i8*%U,i64 16
%W=bitcast i8*%V to i8*(i8*,i8*)**
%X=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%W,align 8
%Y=bitcast i8*%U to i8**
%Z=load i8*,i8**%Y,align 8
%aa=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%ab=call fastcc i8*%X(i8*inreg%Z,i8*inreg%aa)
%ac=icmp eq i8*%ab,null
br i1%ac,label%ad,label%ae
ad:
ret i8*null
ae:
%af=bitcast i8*%ab to i8**
%ag=load i8*,i8**%af,align 8
store i8*%ag,i8**%c,align 8
%ah=load i8*,i8**%e,align 8
%ai=getelementptr inbounds i8,i8*%ah,i64 12
%aj=bitcast i8*%ai to i32*
%ak=load i32,i32*%aj,align 4
%al=icmp eq i32%ak,0
br i1%al,label%ar,label%am
am:
%an=sext i32%v to i64
%ao=getelementptr inbounds i8,i8*%ag,i64%an
%ap=bitcast i8*%ao to i8**
%aq=load i8*,i8**%ap,align 8
br label%aB
ar:
%as=getelementptr inbounds i8,i8*%ah,i64 16
%at=bitcast i8*%as to i32*
%au=load i32,i32*%at,align 4
%av=call i8*@sml_alloc(i32 inreg%au)#0
%aw=getelementptr inbounds i8,i8*%av,i64 -4
%ax=bitcast i8*%aw to i32*
store i32%au,i32*%ax,align 4
%ay=load i8*,i8**%c,align 8
%az=sext i32%v to i64
%aA=getelementptr inbounds i8,i8*%ay,i64%az
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%av,i8*%aA,i32%au,i1 false)
br label%aB
aB:
%aC=phi i8*[%ay,%ar],[%ag,%am]
%aD=phi i8*[%av,%ar],[%aq,%am]
%aE=bitcast i8*%aC to i8**
store i8*%aD,i8**%d,align 8
%aF=bitcast i8**%c to i8***
%aG=load i8*,i8**%aE,align 8
%aH=getelementptr inbounds i8,i8*%aG,i64 12
%aI=bitcast i8*%aH to i32*
%aJ=load i32,i32*%aI,align 4
%aK=ashr i32%aJ,15
%aL=add nsw i32%aK,1
%aM=icmp ugt i32%aL,1
br i1%aM,label%a1,label%aN
aN:
%aO=trunc i32%aJ to i16
%aP=load i8*,i8**%e,align 8
%aQ=getelementptr inbounds i8,i8*%aP,i64 16
%aR=bitcast i8*%aQ to i32*
%aS=load i32,i32*%aR,align 4
%aT=getelementptr inbounds i8,i8*%aP,i64 12
%aU=bitcast i8*%aT to i32*
%aV=load i32,i32*%aU,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
store i8*%aW,i8**%f,align 8
%aZ=icmp eq i32%aV,0
%a0=load i8*,i8**%d,align 8
br i1%aZ,label%bl,label%bj
a1:
store i8*null,i8**%d,align 8
store i8*null,i8**%e,align 8
%a2=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%a2,i8**%c,align 8
%a3=call i8*@sml_alloc(i32 inreg 20)#0
%a4=getelementptr inbounds i8,i8*%a3,i64 -4
%a5=bitcast i8*%a4 to i32*
store i32 1342177296,i32*%a5,align 4
store i8*%a3,i8**%d,align 8
%a6=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%a7=bitcast i8*%a3 to i8**
store i8*%a6,i8**%a7,align 8
%a8=getelementptr inbounds i8,i8*%a3,i64 8
%a9=bitcast i8*%a8 to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[42x i8]}>,<{[4x i8],i32,[42x i8]}>*@i,i64 0,i32 2,i64 0),i8**%a9,align 8
%ba=getelementptr inbounds i8,i8*%a3,i64 16
%bb=bitcast i8*%ba to i32*
store i32 3,i32*%bb,align 4
%bc=call i8*@sml_alloc(i32 inreg 60)#0
%bd=getelementptr inbounds i8,i8*%bc,i64 -4
%be=bitcast i8*%bd to i32*
store i32 1342177336,i32*%be,align 4
%bf=getelementptr inbounds i8,i8*%bc,i64 56
%bg=bitcast i8*%bf to i32*
store i32 1,i32*%bg,align 4
%bh=load i8*,i8**%d,align 8
%bi=bitcast i8*%bc to i8**
store i8*%bh,i8**%bi,align 8
call void@sml_raise(i8*inreg%bc)#1
unreachable
bj:
%bk=bitcast i8*%aW to i8**
store i8*%a0,i8**%bk,align 8
br label%bm
bl:
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%aW,i8*%a0,i32%aS,i1 false)
br label%bm
bm:
%bn=getelementptr inbounds i8,i8*%aW,i64 8
%bo=bitcast i8*%bn to i32*
store i32%aV,i32*%bo,align 4
%bp=getelementptr inbounds i8,i8*%aW,i64 12
%bq=bitcast i8*%bp to i32*
store i32%aS,i32*%bq,align 4
%br=getelementptr inbounds i8,i8*%aW,i64 16
%bs=bitcast i8*%br to i16*
store i16%aO,i16*%bs,align 2
%bt=getelementptr inbounds i8,i8*%aW,i64 24
%bu=bitcast i8*%bt to i32*
store i32%p,i32*%bu,align 4
%bv=call i8*@sml_alloc(i32 inreg 28)#0
%bw=getelementptr inbounds i8,i8*%bv,i64 -4
%bx=bitcast i8*%bw to i32*
store i32 1342177304,i32*%bx,align 4
%by=load i8*,i8**%f,align 8
%bz=bitcast i8*%bv to i8**
store i8*%by,i8**%bz,align 8
%bA=getelementptr inbounds i8,i8*%bv,i64 8
%bB=bitcast i8*%bA to void(...)**
store void(...)*bitcast(i8*(i8*,i16,i8*)*@_SMLL7posloop_77 to void(...)*),void(...)**%bB,align 8
%bC=getelementptr inbounds i8,i8*%bv,i64 16
%bD=bitcast i8*%bC to void(...)**
store void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLL7posloop_113 to void(...)*),void(...)**%bD,align 8
%bE=getelementptr inbounds i8,i8*%bv,i64 24
%bF=bitcast i8*%bE to i32*
store i32 -2147483647,i32*%bF,align 4
%bG=load i8*,i8**%e,align 8
%bH=getelementptr inbounds i8,i8*%bG,i64 16
%bI=bitcast i8*%bH to i32*
%bJ=load i32,i32*%bI,align 4
%bK=getelementptr inbounds i8,i8*%bG,i64 12
%bL=bitcast i8*%bK to i32*
%bM=load i32,i32*%bL,align 4
store i8*null,i8**%e,align 8
%bN=call i8*@sml_alloc(i32 inreg 28)#0
%bO=getelementptr inbounds i8,i8*%bN,i64 -4
%bP=bitcast i8*%bO to i32*
store i32 1342177304,i32*%bP,align 4
store i8*%bN,i8**%e,align 8
%bQ=icmp eq i32%bM,0
%bR=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
br i1%bQ,label%bU,label%bS
bS:
%bT=bitcast i8*%bN to i8**
store i8*%bR,i8**%bT,align 8
br label%bV
bU:
call void@llvm.memcpy.p0i8.p0i8.i32(i8*%bN,i8*%bR,i32%bJ,i1 false)
br label%bV
bV:
%bW=getelementptr inbounds i8,i8*%bN,i64 8
%bX=bitcast i8*%bW to i32*
store i32%bM,i32*%bX,align 4
%bY=getelementptr inbounds i8,i8*%bN,i64 12
%bZ=bitcast i8*%bY to i32*
store i32%bJ,i32*%bZ,align 4
%b0=getelementptr inbounds i8,i8*%bN,i64 16
%b1=bitcast i8*%b0 to i16*
store i16%aO,i16*%b1,align 2
%b2=getelementptr inbounds i8,i8*%bN,i64 24
%b3=bitcast i8*%b2 to i32*
store i32%p,i32*%b3,align 4
%b4=call i8*@sml_alloc(i32 inreg 28)#0
%b5=getelementptr inbounds i8,i8*%b4,i64 -4
%b6=bitcast i8*%b5 to i32*
store i32 1342177304,i32*%b6,align 4
%b7=load i8*,i8**%e,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 void(...)**
store void(...)*bitcast(i8*(i8*,i16,i8*)*@_SMLL7negloop_81 to void(...)*),void(...)**%ca,align 8
%cb=getelementptr inbounds i8,i8*%b4,i64 16
%cc=bitcast i8*%cb to void(...)**
store void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLL7negloop_114 to void(...)*),void(...)**%cc,align 8
%cd=getelementptr inbounds i8,i8*%b4,i64 24
%ce=bitcast i8*%cd to i32*
store i32 -2147483647,i32*%ce,align 4
%cf=load i8**,i8***%aF,align 8
%cg=load i8*,i8**%cf,align 8
%ch=getelementptr inbounds i8,i8*%cg,i64 8
%ci=bitcast i8*%ch to i32*
%cj=load i32,i32*%ci,align 4
%ck=icmp eq i32%cj,0
%cl=bitcast i8*%cg to i8**
%cm=load i8*,i8**%cl,align 8
br i1%ck,label%cp,label%cn
cn:
%co=tail call fastcc i8*@_SMLL7negloop_81(i8*inreg%b7,i16 inreg 0,i8*inreg%cm)
ret i8*%co
cp:
%cq=load i8*,i8**%f,align 8
%cr=tail call fastcc i8*@_SMLL7posloop_77(i8*inreg%cq,i16 inreg 0,i8*inreg%cm)
ret i8*%cr
}
define internal fastcc i8*@_SMLLN10Int__common4scanE_86(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%b,i8**%c,align 8
%e=bitcast i8*%a to i32*
%f=load i32,i32*%e,align 4
%g=getelementptr inbounds i8,i8*%a,i64 4
%h=bitcast i8*%g to i32*
%i=load i32,i32*%h,align 4
%j=getelementptr inbounds i8,i8*%a,i64 8
%k=bitcast i8*%j to i32*
%l=load i32,i32*%k,align 4
%m=call i8*@sml_alloc(i32 inreg 28)#0
%n=getelementptr inbounds i8,i8*%m,i64 -4
%o=bitcast i8*%n to i32*
store i32 1342177304,i32*%o,align 4
store i8*%m,i8**%d,align 8
%p=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%q=bitcast i8*%m to i8**
store i8*%p,i8**%q,align 8
%r=getelementptr inbounds i8,i8*%m,i64 8
%s=bitcast i8*%r to i32*
store i32%f,i32*%s,align 4
%t=getelementptr inbounds i8,i8*%m,i64 12
%u=bitcast i8*%t to i32*
store i32%i,i32*%u,align 4
%v=getelementptr inbounds i8,i8*%m,i64 16
%w=bitcast i8*%v to i32*
store i32%l,i32*%w,align 4
%x=getelementptr inbounds i8,i8*%m,i64 24
%y=bitcast i8*%x to i32*
store i32 1,i32*%y,align 4
%z=call i8*@sml_alloc(i32 inreg 28)#0
%A=getelementptr inbounds i8,i8*%z,i64 -4
%B=bitcast i8*%A to i32*
store i32 1342177304,i32*%B,align 4
%C=load i8*,i8**%d,align 8
%D=bitcast i8*%z to i8**
store i8*%C,i8**%D,align 8
%E=getelementptr inbounds i8,i8*%z,i64 8
%F=bitcast i8*%E to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4scanE_85 to void(...)*),void(...)**%F,align 8
%G=getelementptr inbounds i8,i8*%z,i64 16
%H=bitcast i8*%G to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4scanE_85 to void(...)*),void(...)**%H,align 8
%I=getelementptr inbounds i8,i8*%z,i64 24
%J=bitcast i8*%I to i32*
store i32 1,i32*%J,align 4
ret i8*%z
}
define internal fastcc i8*@_SMLLN10Int__common4scanE_87(i8*inreg%a,i32 inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=bitcast i8*%a to i32*
%e=load i32,i32*%d,align 4
%f=getelementptr inbounds i8,i8*%a,i64 4
%g=bitcast i8*%f to i32*
%h=load i32,i32*%g,align 4
%i=call i8*@sml_alloc(i32 inreg 20)#0
%j=bitcast i8*%i to i32*
%k=getelementptr inbounds i8,i8*%i,i64 -4
%l=bitcast i8*%k to i32*
store i32 1342177296,i32*%l,align 4
store i8*%i,i8**%c,align 8
store i32%b,i32*%j,align 4
%m=getelementptr inbounds i8,i8*%i,i64 4
%n=bitcast i8*%m to i32*
store i32%e,i32*%n,align 4
%o=getelementptr inbounds i8,i8*%i,i64 8
%p=bitcast i8*%o to i32*
store i32%h,i32*%p,align 4
%q=getelementptr inbounds i8,i8*%i,i64 16
%r=bitcast i8*%q to i32*
store i32 0,i32*%r,align 4
%s=call i8*@sml_alloc(i32 inreg 28)#0
%t=getelementptr inbounds i8,i8*%s,i64 -4
%u=bitcast i8*%t to i32*
store i32 1342177304,i32*%u,align 4
%v=load i8*,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 void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4scanE_86 to void(...)*),void(...)**%y,align 8
%z=getelementptr inbounds i8,i8*%s,i64 16
%A=bitcast i8*%z to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4scanE_86 to void(...)*),void(...)**%A,align 8
%B=getelementptr inbounds i8,i8*%s,i64 24
%C=bitcast i8*%B to i32*
store i32 -2147483647,i32*%C,align 4
ret i8*%s
}
define internal fastcc i8*@_SMLLN10Int__common4scanE_88(i32 inreg%a,i32 inreg%b)unnamed_addr#4 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 1342177288,i32*%g,align 4
store i8*%d,i8**%c,align 8
store i32%a,i32*%e,align 4
%h=getelementptr inbounds i8,i8*%d,i64 4
%i=bitcast i8*%h to i32*
store i32%b,i32*%i,align 4
%j=getelementptr inbounds i8,i8*%d,i64 8
%k=bitcast i8*%j to i32*
store i32 0,i32*%k,align 4
%l=call i8*@sml_alloc(i32 inreg 28)#0
%m=getelementptr inbounds i8,i8*%l,i64 -4
%n=bitcast i8*%m to i32*
store i32 1342177304,i32*%n,align 4
%o=load i8*,i8**%c,align 8
%p=bitcast i8*%l to i8**
store i8*%o,i8**%p,align 8
%q=getelementptr inbounds i8,i8*%l,i64 8
%r=bitcast i8*%q to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN10Int__common4scanE_87 to void(...)*),void(...)**%r,align 8
%s=getelementptr inbounds i8,i8*%l,i64 16
%t=bitcast i8*%s to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN10Int__common4scanE_115 to void(...)*),void(...)**%t,align 8
%u=getelementptr inbounds i8,i8*%l,i64 24
%v=bitcast i8*%u to i32*
store i32 -2147483647,i32*%v,align 4
ret i8*%l
}
define fastcc i8*@_SMLFN5Int167toLargeE(i16 inreg%a)#2 gc"smlsharp"{
%b=load atomic i32,i32*@sml_check_flag unordered,align 4
%c=icmp eq i32%b,0
br i1%c,label%e,label%d
d:
tail call void@sml_check(i32 inreg%b)
br label%e
e:
%f=sext i16%a to i32
%g=tail call fastcc i8*@_SMLFN6IntInf7fromIntE(i32 inreg%f)
ret i8*%g
}
define fastcc i16@_SMLFN5Int169fromLargeE(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 i32@_SMLFN6IntInf5toIntE(i8*inreg%i)
%l=ashr i32%k,15
%m=add nsw i32%l,1
%n=icmp ugt i32%m,1
br i1%n,label%q,label%o
o:
%p=trunc i32%k to i16
ret i16%p
q:
%r=load i8*,i8**@_SMLZ8Overflow,align 8
store i8*%r,i8**%b,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**%c,align 8
%v=load i8*,i8**%b,align 8
store i8*null,i8**%b,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,[36x i8]}>,<{[4x i8],i32,[36x i8]}>*@q,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**%c,align 8
%H=bitcast i8*%B to i8**
store i8*%G,i8**%H,align 8
call void@sml_raise(i8*inreg%B)#1
unreachable
}
define fastcc i32@_SMLFN5Int168sameSignE(i8*inreg%a)#2 gc"smlsharp"{
%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%e,label%g
e:
%f=bitcast i8*%a to i16*
br label%j
g:
call void@sml_check(i32 inreg%c)
%h=bitcast i8**%b to i16**
%i=load i16*,i16**%h,align 8
br label%j
j:
%k=phi i16*[%i,%g],[%f,%e]
%l=load i16,i16*%k,align 2
%m=icmp sgt i16%l,-1
%n=icmp ne i16%l,0
%o=zext i1%n to i32
%p=select i1%m,i32%o,i32 -1
store i8*null,i8**%b,align 8
%q=getelementptr inbounds i16,i16*%k,i64 1
%r=load i16,i16*%q,align 2
%s=icmp sgt i16%r,-1
%t=icmp ne i16%r,0
%u=zext i1%t to i32
%v=select i1%s,i32%u,i32 -1
%w=icmp eq i32%p,%v
%x=zext i1%w to i32
ret i32%x
}
define fastcc i8*@_SMLFN5Int168toStringE(i16 inreg%a)#2 gc"smlsharp"{
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=call fastcc i8*@_SMLFN5Int163fmtE(i32 inreg 1)
%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
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 2)#0
%n=getelementptr inbounds i8,i8*%m,i64 -4
%o=bitcast i8*%n to i32*
store i32 2,i32*%o,align 4
%p=bitcast i8*%m to i16*
store i16%a,i16*%p,align 2
%q=load i8*,i8**%b,align 8
%r=tail call fastcc i8*%j(i8*inreg%q,i8*inreg%m)
ret i8*%r
}
define internal fastcc i8*@_SMLLN5Int164scanE_102(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 4
store i8*null,i8**%c,align 8
%m=getelementptr inbounds i8,i8*%i,i64 4
%n=bitcast i8*%m to i32*
%o=load i32,i32*%n,align 4
%p=call fastcc i8*@_SMLLN10Int__common4scanE_88(i32 inreg%l,i32 inreg%o)
%q=getelementptr inbounds i8,i8*%p,i64 16
%r=bitcast i8*%q to i8*(i8*,i8*)**
%s=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%r,align 8
%t=bitcast i8*%p to i8**
%u=load i8*,i8**%t,align 8
store i8*%u,i8**%c,align 8
%v=call i8*@sml_alloc(i32 inreg 4)#0
%w=bitcast i8*%v to i32*
%x=getelementptr inbounds i8,i8*%v,i64 -4
%y=bitcast i8*%x to i32*
store i32 4,i32*%y,align 4
store i32%b,i32*%w,align 4
%z=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%A=call fastcc i8*%s(i8*inreg%z,i8*inreg%v)
ret i8*%A
}
define fastcc i8*@_SMLFN5Int164scanE(i32 inreg%a,i32 inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 1342177288,i32*%g,align 4
store i8*%d,i8**%c,align 8
store i32%a,i32*%e,align 4
%h=getelementptr inbounds i8,i8*%d,i64 4
%i=bitcast i8*%h to i32*
store i32%b,i32*%i,align 4
%j=getelementptr inbounds i8,i8*%d,i64 8
%k=bitcast i8*%j to i32*
store i32 0,i32*%k,align 4
%l=call i8*@sml_alloc(i32 inreg 28)#0
%m=getelementptr inbounds i8,i8*%l,i64 -4
%n=bitcast i8*%m to i32*
store i32 1342177304,i32*%n,align 4
%o=load i8*,i8**%c,align 8
%p=bitcast i8*%l to i8**
store i8*%o,i8**%p,align 8
%q=getelementptr inbounds i8,i8*%l,i64 8
%r=bitcast i8*%q to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN5Int164scanE_102 to void(...)*),void(...)**%r,align 8
%s=getelementptr inbounds i8,i8*%l,i64 16
%t=bitcast i8*%s to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN5Int164scanE_121 to void(...)*),void(...)**%t,align 8
%u=getelementptr inbounds i8,i8*%l,i64 24
%v=bitcast i8*%u to i32*
store i32 -2147483647,i32*%v,align 4
ret i8*%l
}
define fastcc i8*@_SMLFN5Int1610fromStringE(i8*inreg%a)#2 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%h,label%g
g:
call void@sml_check(i32 inreg%e)
br label%h
h:
%i=call fastcc i8*@_SMLFN9StringCvt10scanStringE(i32 inreg 0,i32 inreg 2)
%j=getelementptr inbounds i8,i8*%i,i64 16
%k=bitcast i8*%j to i8*(i8*,i8*)**
%l=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%k,align 8
%m=bitcast i8*%i to i8**
%n=load i8*,i8**%m,align 8
store i8*%n,i8**%d,align 8
%o=call fastcc i8*@_SMLLN10Int__common4scanE_88(i32 inreg 0,i32 inreg 4)
%p=getelementptr inbounds i8,i8*%o,i64 16
%q=bitcast i8*%p to i8*(i8*,i8*)**
%r=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%q,align 8
%s=bitcast i8*%o to i8**
%t=load i8*,i8**%s,align 8
store i8*%t,i8**%c,align 8
%u=call i8*@sml_alloc(i32 inreg 4)#0
%v=bitcast i8*%u to i32*
%w=getelementptr inbounds i8,i8*%u,i64 -4
%x=bitcast i8*%w to i32*
store i32 4,i32*%x,align 4
store i32 1,i32*%v,align 4
%y=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%z=call fastcc i8*%r(i8*inreg%y,i8*inreg%u)
%A=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%B=call fastcc i8*%l(i8*inreg%A,i8*inreg%z)
%C=getelementptr inbounds i8,i8*%B,i64 16
%D=bitcast i8*%C to i8*(i8*,i8*)**
%E=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%D,align 8
%F=bitcast i8*%B to i8**
%G=load i8*,i8**%F,align 8
%H=load i8*,i8**%b,align 8
%I=tail call fastcc i8*%E(i8*inreg%G,i8*inreg%H)
ret i8*%I
}
define internal fastcc i8*@_SMLLN10Int__common7compareE_107(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=getelementptr inbounds i8,i8*%b,i64 2
%f=bitcast i8*%e to i16*
%g=load i16,i16*%f,align 2
%h=icmp slt i16%d,%g
%i=icmp ne i16%d,%g
%j=zext i1%i to i32
%k=select i1%h,i32 2,i32%j
%l=tail call i8*@sml_alloc(i32 inreg 4)#0
%m=bitcast i8*%l to i32*
%n=getelementptr inbounds i8,i8*%l,i64 -4
%o=bitcast i8*%n to i32*
store i32 4,i32*%o,align 4
store i32%k,i32*%m,align 4
ret i8*%l
}
define internal fastcc i8*@_SMLLN10Int__common3minE_108(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=getelementptr inbounds i8,i8*%b,i64 2
%f=bitcast i8*%e to i16*
%g=load i16,i16*%f,align 2
%h=icmp slt i16%d,%g
%i=select i1%h,i16%d,i16%g
%j=tail call i8*@sml_alloc(i32 inreg 2)#0
%k=getelementptr inbounds i8,i8*%j,i64 -4
%l=bitcast i8*%k to i32*
store i32 2,i32*%l,align 4
%m=bitcast i8*%j to i16*
store i16%i,i16*%m,align 2
ret i8*%j
}
define internal fastcc i8*@_SMLLN10Int__common3maxE_109(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=getelementptr inbounds i8,i8*%b,i64 2
%f=bitcast i8*%e to i16*
%g=load i16,i16*%f,align 2
%h=icmp sgt i16%d,%g
%i=select i1%h,i16%d,i16%g
%j=tail call i8*@sml_alloc(i32 inreg 2)#0
%k=getelementptr inbounds i8,i8*%j,i64 -4
%l=bitcast i8*%k to i32*
store i32 2,i32*%l,align 4
%m=bitcast i8*%j to i16*
store i16%i,i16*%m,align 2
ret i8*%j
}
define internal fastcc i8*@_SMLLN10Int__common4signE_110(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=icmp sgt i16%d,-1
%f=icmp ne i16%d,0
%g=zext i1%f to i32
%h=select i1%e,i32%g,i32 -1
%i=tail call i8*@sml_alloc(i32 inreg 4)#0
%j=bitcast i8*%i to i32*
%k=getelementptr inbounds i8,i8*%i,i64 -4
%l=bitcast i8*%k to i32*
store i32 4,i32*%l,align 4
store i32%h,i32*%j,align 4
ret i8*%i
}
define internal fastcc i8*@_SMLLN10Int__common3fmtE_111(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=tail call fastcc i8*@_SMLLN10Int__common3fmtE_73(i8*inreg%a,i16 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN10Int__common3fmtE_112(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLFN5Int163fmtE(i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLL7posloop_113(i8*inreg%a,i8*inreg%b,i8*inreg%c)#2 gc"smlsharp"{
%d=bitcast i8*%b to i16*
%e=load i16,i16*%d,align 2
%f=tail call fastcc i8*@_SMLL7posloop_77(i8*inreg%a,i16 inreg%e,i8*inreg%c)
ret i8*%f
}
define internal fastcc i8*@_SMLL7negloop_114(i8*inreg%a,i8*inreg%b,i8*inreg%c)#2 gc"smlsharp"{
%d=bitcast i8*%b to i16*
%e=load i16,i16*%d,align 2
%f=tail call fastcc i8*@_SMLL7negloop_81(i8*inreg%a,i16 inreg%e,i8*inreg%c)
ret i8*%f
}
define internal fastcc i8*@_SMLLN10Int__common4scanE_115(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN10Int__common4scanE_87(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN5Int167toLargeE_117(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=tail call fastcc i8*@_SMLFN5Int167toLargeE(i16 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN5Int169fromLargeE_118(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i16@_SMLFN5Int169fromLargeE(i8*inreg%b)
%d=tail call i8*@sml_alloc(i32 inreg 2)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 2,i32*%f,align 4
%g=bitcast i8*%d to i16*
store i16%c,i16*%g,align 2
ret i8*%d
}
define internal fastcc i8*@_SMLLN5Int168sameSignE_119(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLFN5Int168sameSignE(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*@_SMLLN5Int168toStringE_120(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i16*
%d=load i16,i16*%c,align 2
%e=tail call fastcc i8*@_SMLFN5Int168toStringE(i16 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN5Int164scanE_121(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*@_SMLLN5Int164scanE_102(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN5Int164scanE_122(i8*inreg%a,i8*inreg%b,i8*inreg%c)#4 gc"smlsharp"{
%d=bitcast i8*%b to i32*
%e=load i32,i32*%d,align 4
%f=bitcast i8*%c to i32*
%g=load i32,i32*%f,align 4
%h=tail call fastcc i8*@_SMLFN5Int164scanE(i32 inreg%e,i32 inreg%g)
ret i8*%h
}
define internal fastcc i8*@_SMLLN5Int1610fromStringE_123(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN5Int1610fromStringE(i8*inreg%b)
ret i8*%c
}
declare void@llvm.memcpy.p0i8.p0i8.i32(i8*,i8*,i32,i1)#0
declare void@llvm.memset.p0i8.i32(i8*,i8,i32,i1)#0
attributes#0={nounwind}
attributes#1={noreturn}
attributes#2={uwtable}
attributes#3={noreturn nounwind}
attributes#4={nounwind uwtable}
