; ModuleID = 'simpleruntime.c' %struct.IntList = type { i32, %struct.IntList*, i32 } %struct.VContext = type { %struct.Value*, %struct.VContext*, i32 } %struct.Value = type { i32, %union.anon.0, i32 } %union.anon.0 = type { %struct.anon.7 } %struct.anon.7 = type { %struct.VExp*, %struct.VContext*, %struct.Continuation* } %struct.VExp = type { i32, i32, i32, %union.anon.1, i32 } %union.anon.1 = type { %struct.anon.6 } %struct.anon.6 = type { i32, i32, %union.SyscallArg, i32, %struct.Value* } %union.SyscallArg = type { %struct.IntList* } %struct.Continuation = type { i32, %union.anon.8, %struct.Continuation* } %union.anon.8 = type { %struct.anon.9 } %struct.anon.9 = type { %struct.VExp*, %struct.VContext* } %struct.ValueStack = type { %union.anon.11 } %union.anon.11 = type { %struct.anon.12 } %struct.anon.12 = type { %struct.Value*, %struct.ValueStack* } %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } @.str = private unnamed_addr constant [16 x i8] c"divided by zero\00", align 1 @.str1 = private unnamed_addr constant [36 x i8] c"cannot use non-integer value in mod\00", align 1 @allocateIntList.pool = internal unnamed_addr global %struct.IntList* null, align 8 @syscall_arginfo = constant [8 x [4 x i32]] [[4 x i32] [i32 1, i32 0, i32 -1, i32 -1], [4 x i32] [i32 3, i32 1, i32 0, i32 2], [4 x i32] [i32 2, i32 0, i32 2, i32 -1], [4 x i32] [i32 2, i32 0, i32 2, i32 -1], [4 x i32] [i32 3, i32 0, i32 0, i32 2], [4 x i32] [i32 2, i32 0, i32 2, i32 -1], [4 x i32] [i32 1, i32 2, i32 -1, i32 -1], [4 x i32] [i32 2, i32 1, i32 2, i32 -1]], align 16 @allocateVContext.pool = internal unnamed_addr global %struct.VContext* null, align 8 @allocateContinuation.pool = internal unnamed_addr global %struct.Continuation* null, align 8 @funcNames.names = internal unnamed_addr constant [14 x i8*] [i8* getelementptr inbounds ([2 x i8]* @.str2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8]* @.str8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8]* @.str9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8]* @.str10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8]* @.str11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8]* @.str12, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8]* @.str13, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8]* @.str14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8]* @.str15, i32 0, i32 0)], align 16 @.str2 = private unnamed_addr constant [2 x i8] c"+\00", align 1 @.str3 = private unnamed_addr constant [2 x i8] c"-\00", align 1 @.str4 = private unnamed_addr constant [2 x i8] c"*\00", align 1 @.str5 = private unnamed_addr constant [2 x i8] c"/\00", align 1 @.str6 = private unnamed_addr constant [2 x i8] c"%\00", align 1 @.str7 = private unnamed_addr constant [2 x i8] c">\00", align 1 @.str8 = private unnamed_addr constant [2 x i8] c"<\00", align 1 @.str9 = private unnamed_addr constant [3 x i8] c"<=\00", align 1 @.str10 = private unnamed_addr constant [3 x i8] c">=\00", align 1 @.str11 = private unnamed_addr constant [3 x i8] c"==\00", align 1 @.str12 = private unnamed_addr constant [3 x i8] c"/=\00", align 1 @.str13 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @.str14 = private unnamed_addr constant [8 x i8] c"toFloat\00", align 1 @.str15 = private unnamed_addr constant [6 x i8] c"toInt\00", align 1 @syscallNames.names = internal unnamed_addr constant [8 x i8*] [i8* getelementptr inbounds ([5 x i8]* @.str16, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8]* @.str17, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8]* @.str18, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str19, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str20, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @.str21, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8]* @.str22, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @.str23, i32 0, i32 0)], align 16 @.str16 = private unnamed_addr constant [5 x i8] c"exit\00", align 1 @.str17 = private unnamed_addr constant [8 x i8] c"openCmd\00", align 1 @.str18 = private unnamed_addr constant [6 x i8] c"close\00", align 1 @.str19 = private unnamed_addr constant [9 x i8] c"getCharF\00", align 1 @.str20 = private unnamed_addr constant [9 x i8] c"putCharF\00", align 1 @.str21 = private unnamed_addr constant [10 x i8] c"peekCharF\00", align 1 @.str22 = private unnamed_addr constant [7 x i8] c"getArg\00", align 1 @.str23 = private unnamed_addr constant [10 x i8] c"systemCmd\00", align 1 @.str24 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str25 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 @.str26 = private unnamed_addr constant [7 x i8] c"(\5Cv%d \00", align 1 @.str28 = private unnamed_addr constant [4 x i8] c"v%d\00", align 1 @.str32 = private unnamed_addr constant [5 x i8] c"(%s \00", align 1 @.str33 = private unnamed_addr constant [13 x i8] c"(makeIntList\00", align 1 @.str34 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str35 = private unnamed_addr constant [4 x i8] c"(%s\00", align 1 @.str36 = private unnamed_addr constant [14 x i8] c" (makeIntList\00", align 1 @.str37 = private unnamed_addr constant [5 x i8] c" ...\00", align 1 @allocateVExp.pool = internal unnamed_addr global %struct.VExp* null, align 8 @allocateValue.pool = internal unnamed_addr global %struct.Value* null, align 8 @allocateValueStack.pool = internal unnamed_addr global %struct.ValueStack* null, align 8 @.str38 = private unnamed_addr constant [30 x i8] c"too many arguments to syscall\00", align 1 @.str39 = private unnamed_addr constant [42 x i8] c"cannot apply non-integer value to syscall\00", align 1 @.str40 = private unnamed_addr constant [42 x i8] c"cannot apply non-intlist value to syscall\00", align 1 @constructBoolExp.p_true = internal unnamed_addr global %struct.VExp* null, align 8 @constructBoolExp.p_false = internal unnamed_addr global %struct.VExp* null, align 8 @incCounter.count = internal unnamed_addr global i64 0, align 8 @incCounter.unit = internal unnamed_addr global i64 262144, align 8 @stderr = external global %struct._IO_FILE* @.str41 = private unnamed_addr constant [11 x i8] c"count=%ld\0A\00", align 1 @.str42 = private unnamed_addr constant [37 x i8] c"cannot use numeric value as function\00", align 1 @.str43 = private unnamed_addr constant [52 x i8] c"cannot apply built-in function on non-numeric value\00", align 1 @.str44 = private unnamed_addr constant [44 x i8] c"cannot append non-integer number to IntList\00", align 1 @stdin = external global %struct._IO_FILE* @stdout = external global %struct._IO_FILE* @.str45 = private unnamed_addr constant [15 x i8] c"exception: %s\0A\00", align 1 @.str47 = private unnamed_addr constant [3 x i8] c"rb\00", align 1 @.str48 = private unnamed_addr constant [3 x i8] c"wb\00", align 1 @.str49 = private unnamed_addr constant [3 x i8] c"ab\00", align 1 @.str50 = private unnamed_addr constant [4 x i8] c"rwb\00", align 1 @.str52 = private unnamed_addr constant [8 x i8] c"putChar\00", align 1 @.str53 = private unnamed_addr constant [8 x i8] c"getChar\00", align 1 @.str54 = private unnamed_addr constant [9 x i8] c"peekChar\00", align 1 @.str55 = private unnamed_addr constant [12 x i8] c"makeIntList\00", align 1 @str = private unnamed_addr constant [45 x i8] c"exception: insufficient arguments to syscall\00" @switch.table = private unnamed_addr constant [4 x i8*] [i8* getelementptr inbounds ([3 x i8]* @.str47, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8]* @.str48, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8]* @.str49, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8]* @.str50, i64 0, i64 0)] ; Function Attrs: nounwind readnone uwtable define { i32, i64 } @intNumber(i32 %a) #0 { %1 = zext i32 %a to i64 %2 = insertvalue { i32, i64 } { i32 0, i64 undef }, i64 %1, 1 ret { i32, i64 } %2 } ; Function Attrs: nounwind readnone uwtable define { i32, i64 } @doubleNumber(double %a) #0 { %1 = bitcast double %a to i64 %2 = insertvalue { i32, i64 } { i32 1, i64 undef }, i64 %1, 1 ret { i32, i64 } %2 } ; Function Attrs: nounwind readnone uwtable define { i32, i64 } @addNumber(i32 %a.coerce0, i64 %a.coerce1, i32 %b.coerce0, i64 %b.coerce1) #0 { %1 = icmp eq i32 %a.coerce0, 0 %2 = icmp eq i32 %b.coerce0, 0 br i1 %1, label %3, label %13 ;