forked from NUDT-compiler/nudt-compiler-cpp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
853 lines
27 KiB
853 lines
27 KiB
@ints = global [10000 x i32] zeroinitializer
|
|
@intt = global i32 0
|
|
@chas = global [10000 x i32] zeroinitializer
|
|
@chat = global i32 0
|
|
@i = global i32 0
|
|
@ii = global i32 1
|
|
@c = global i32 0
|
|
@get = global [10000 x i32] zeroinitializer
|
|
@get2 = global [10000 x i32] zeroinitializer
|
|
|
|
declare i32 @getint()
|
|
declare float @getfloat()
|
|
declare i32 @getarray(i32* %arg.a)
|
|
declare i32 @getfarray(float* %arg.a)
|
|
declare i32 @getch()
|
|
declare void @putint(i32 %arg.x)
|
|
declare void @putfloat(float %arg.x)
|
|
declare void @putarray(i32 %arg.n, i32* %arg.a)
|
|
declare void @putfarray(i32 %arg.n, float* %arg.a)
|
|
declare void @putch(i32 %arg.x)
|
|
declare void @starttime()
|
|
declare void @stoptime()
|
|
define i32 @isdigit(i32 %arg.x) {
|
|
entry:
|
|
%t0 = alloca i32
|
|
store i32 %arg.x, i32* %t0
|
|
%t1 = load i32, i32* %t0
|
|
%t2 = icmp sge i32 %t1, 48
|
|
%t3 = zext i1 %t2 to i32
|
|
%t4 = icmp ne i32 %t3, 0
|
|
br i1 %t4, label %land.rhs.3, label %if.end.2
|
|
if.then.1:
|
|
ret i32 1
|
|
if.end.2:
|
|
ret i32 0
|
|
land.rhs.3:
|
|
%t5 = load i32, i32* %t0
|
|
%t6 = icmp sle i32 %t5, 57
|
|
%t7 = zext i1 %t6 to i32
|
|
%t8 = icmp ne i32 %t7, 0
|
|
br i1 %t8, label %if.then.1, label %if.end.2
|
|
}
|
|
define i32 @power(i32 %arg.b, i32 %arg.a) {
|
|
entry:
|
|
%t11 = alloca i32
|
|
%t9 = alloca i32
|
|
store i32 %arg.b, i32* %t9
|
|
%t10 = alloca i32
|
|
store i32 %arg.a, i32* %t10
|
|
store i32 1, i32* %t11
|
|
br label %while.cond.4
|
|
while.cond.4:
|
|
%t12 = load i32, i32* %t10
|
|
%t13 = icmp ne i32 %t12, 0
|
|
%t14 = zext i1 %t13 to i32
|
|
%t15 = icmp ne i32 %t14, 0
|
|
br i1 %t15, label %while.body.5, label %while.end.6
|
|
while.body.5:
|
|
%t16 = load i32, i32* %t11
|
|
%t17 = load i32, i32* %t9
|
|
%t18 = mul i32 %t16, %t17
|
|
store i32 %t18, i32* %t11
|
|
%t19 = load i32, i32* %t10
|
|
%t20 = sub i32 %t19, 1
|
|
store i32 %t20, i32* %t10
|
|
br label %while.cond.4
|
|
while.end.6:
|
|
%t21 = load i32, i32* %t11
|
|
ret i32 %t21
|
|
}
|
|
define i32 @getstr(i32* %arg.get) {
|
|
entry:
|
|
%t22 = alloca i32
|
|
%t24 = alloca i32
|
|
%t23 = call i32 @getch()
|
|
store i32 %t23, i32* %t22
|
|
store i32 0, i32* %t24
|
|
br label %while.cond.7
|
|
while.cond.7:
|
|
%t25 = load i32, i32* %t22
|
|
%t26 = icmp ne i32 %t25, 13
|
|
%t27 = zext i1 %t26 to i32
|
|
%t28 = icmp ne i32 %t27, 0
|
|
br i1 %t28, label %land.rhs.10, label %while.end.9
|
|
while.body.8:
|
|
%t33 = load i32, i32* %t24
|
|
%t34 = getelementptr inbounds i32, i32* %arg.get, i32 %t33
|
|
%t35 = load i32, i32* %t22
|
|
store i32 %t35, i32* %t34
|
|
%t36 = load i32, i32* %t24
|
|
%t37 = add i32 %t36, 1
|
|
store i32 %t37, i32* %t24
|
|
%t38 = call i32 @getch()
|
|
store i32 %t38, i32* %t22
|
|
br label %while.cond.7
|
|
while.end.9:
|
|
%t39 = load i32, i32* %t24
|
|
ret i32 %t39
|
|
land.rhs.10:
|
|
%t29 = load i32, i32* %t22
|
|
%t30 = icmp ne i32 %t29, 10
|
|
%t31 = zext i1 %t30 to i32
|
|
%t32 = icmp ne i32 %t31, 0
|
|
br i1 %t32, label %while.body.8, label %while.end.9
|
|
}
|
|
define void @intpush(i32 %arg.x) {
|
|
entry:
|
|
%t40 = alloca i32
|
|
store i32 %arg.x, i32* %t40
|
|
%t41 = load i32, i32* @intt
|
|
%t42 = add i32 %t41, 1
|
|
store i32 %t42, i32* @intt
|
|
%t43 = load i32, i32* @intt
|
|
%t44 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t43
|
|
%t45 = load i32, i32* %t40
|
|
store i32 %t45, i32* %t44
|
|
ret void
|
|
}
|
|
define void @chapush(i32 %arg.x) {
|
|
entry:
|
|
%t46 = alloca i32
|
|
store i32 %arg.x, i32* %t46
|
|
%t47 = load i32, i32* @chat
|
|
%t48 = add i32 %t47, 1
|
|
store i32 %t48, i32* @chat
|
|
%t49 = load i32, i32* @chat
|
|
%t50 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t49
|
|
%t51 = load i32, i32* %t46
|
|
store i32 %t51, i32* %t50
|
|
ret void
|
|
}
|
|
define i32 @intpop() {
|
|
entry:
|
|
%t52 = load i32, i32* @intt
|
|
%t53 = sub i32 %t52, 1
|
|
store i32 %t53, i32* @intt
|
|
%t54 = load i32, i32* @intt
|
|
%t55 = add i32 %t54, 1
|
|
%t56 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t55
|
|
%t57 = load i32, i32* %t56
|
|
ret i32 %t57
|
|
}
|
|
define i32 @chapop() {
|
|
entry:
|
|
%t58 = load i32, i32* @chat
|
|
%t59 = sub i32 %t58, 1
|
|
store i32 %t59, i32* @chat
|
|
%t60 = load i32, i32* @chat
|
|
%t61 = add i32 %t60, 1
|
|
%t62 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t61
|
|
%t63 = load i32, i32* %t62
|
|
ret i32 %t63
|
|
}
|
|
define void @intadd(i32 %arg.x) {
|
|
entry:
|
|
%t64 = alloca i32
|
|
store i32 %arg.x, i32* %t64
|
|
%t65 = load i32, i32* @intt
|
|
%t66 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t65
|
|
%t67 = load i32, i32* @intt
|
|
%t68 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t67
|
|
%t69 = load i32, i32* %t68
|
|
%t70 = mul i32 %t69, 10
|
|
store i32 %t70, i32* %t66
|
|
%t71 = load i32, i32* @intt
|
|
%t72 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t71
|
|
%t73 = load i32, i32* @intt
|
|
%t74 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 %t73
|
|
%t75 = load i32, i32* %t74
|
|
%t76 = load i32, i32* %t64
|
|
%t77 = add i32 %t75, %t76
|
|
store i32 %t77, i32* %t72
|
|
ret void
|
|
}
|
|
define i32 @find() {
|
|
entry:
|
|
%t78 = call i32 @chapop()
|
|
store i32 %t78, i32* @c
|
|
%t79 = load i32, i32* @ii
|
|
%t80 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t79
|
|
store i32 32, i32* %t80
|
|
%t81 = load i32, i32* @ii
|
|
%t82 = add i32 %t81, 1
|
|
%t83 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t82
|
|
%t84 = load i32, i32* @c
|
|
store i32 %t84, i32* %t83
|
|
%t85 = load i32, i32* @ii
|
|
%t86 = add i32 %t85, 2
|
|
store i32 %t86, i32* @ii
|
|
%t87 = load i32, i32* @chat
|
|
%t88 = icmp eq i32 %t87, 0
|
|
%t89 = zext i1 %t88 to i32
|
|
%t90 = icmp ne i32 %t89, 0
|
|
br i1 %t90, label %if.then.11, label %if.end.12
|
|
if.then.11:
|
|
ret i32 0
|
|
if.end.12:
|
|
ret i32 1
|
|
}
|
|
define i32 @main() {
|
|
entry:
|
|
%t91 = alloca i32
|
|
%t356 = alloca i32
|
|
%t410 = alloca i32
|
|
%t412 = alloca i32
|
|
%t414 = alloca i32
|
|
store i32 0, i32* @intt
|
|
store i32 0, i32* @chat
|
|
%t92 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 0
|
|
%t93 = call i32 @getstr(i32* %t92)
|
|
store i32 %t93, i32* %t91
|
|
br label %while.cond.13
|
|
while.cond.13:
|
|
%t94 = load i32, i32* @i
|
|
%t95 = load i32, i32* %t91
|
|
%t96 = icmp slt i32 %t94, %t95
|
|
%t97 = zext i1 %t96 to i32
|
|
%t98 = icmp ne i32 %t97, 0
|
|
br i1 %t98, label %while.body.14, label %while.end.15
|
|
while.body.14:
|
|
%t99 = load i32, i32* @i
|
|
%t100 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t99
|
|
%t101 = load i32, i32* %t100
|
|
%t102 = call i32 @isdigit(i32 %t101)
|
|
%t103 = icmp eq i32 %t102, 1
|
|
%t104 = zext i1 %t103 to i32
|
|
%t105 = icmp ne i32 %t104, 0
|
|
br i1 %t105, label %if.then.16, label %if.else.17
|
|
while.end.15:
|
|
br label %while.cond.82
|
|
if.then.16:
|
|
%t106 = load i32, i32* @ii
|
|
%t107 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t106
|
|
%t108 = load i32, i32* @i
|
|
%t109 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t108
|
|
%t110 = load i32, i32* %t109
|
|
store i32 %t110, i32* %t107
|
|
%t111 = load i32, i32* @ii
|
|
%t112 = add i32 %t111, 1
|
|
store i32 %t112, i32* @ii
|
|
br label %if.end.18
|
|
if.else.17:
|
|
%t113 = load i32, i32* @i
|
|
%t114 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t113
|
|
%t115 = load i32, i32* %t114
|
|
%t116 = icmp eq i32 %t115, 40
|
|
%t117 = zext i1 %t116 to i32
|
|
%t118 = icmp ne i32 %t117, 0
|
|
br i1 %t118, label %if.then.19, label %if.end.20
|
|
if.end.18:
|
|
%t350 = load i32, i32* @i
|
|
%t351 = add i32 %t350, 1
|
|
store i32 %t351, i32* @i
|
|
br label %while.cond.13
|
|
if.then.19:
|
|
call void @chapush(i32 40)
|
|
br label %if.end.20
|
|
if.end.20:
|
|
%t120 = load i32, i32* @i
|
|
%t121 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t120
|
|
%t122 = load i32, i32* %t121
|
|
%t123 = icmp eq i32 %t122, 94
|
|
%t124 = zext i1 %t123 to i32
|
|
%t125 = icmp ne i32 %t124, 0
|
|
br i1 %t125, label %if.then.21, label %if.end.22
|
|
if.then.21:
|
|
call void @chapush(i32 94)
|
|
br label %if.end.22
|
|
if.end.22:
|
|
%t127 = load i32, i32* @i
|
|
%t128 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t127
|
|
%t129 = load i32, i32* %t128
|
|
%t130 = icmp eq i32 %t129, 41
|
|
%t131 = zext i1 %t130 to i32
|
|
%t132 = icmp ne i32 %t131, 0
|
|
br i1 %t132, label %if.then.23, label %if.end.24
|
|
if.then.23:
|
|
%t133 = call i32 @chapop()
|
|
store i32 %t133, i32* @c
|
|
br label %while.cond.25
|
|
if.end.24:
|
|
%t147 = load i32, i32* @i
|
|
%t148 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t147
|
|
%t149 = load i32, i32* %t148
|
|
%t150 = icmp eq i32 %t149, 43
|
|
%t151 = zext i1 %t150 to i32
|
|
%t152 = icmp ne i32 %t151, 0
|
|
br i1 %t152, label %if.then.28, label %if.end.29
|
|
while.cond.25:
|
|
%t134 = load i32, i32* @c
|
|
%t135 = icmp ne i32 %t134, 40
|
|
%t136 = zext i1 %t135 to i32
|
|
%t137 = icmp ne i32 %t136, 0
|
|
br i1 %t137, label %while.body.26, label %while.end.27
|
|
while.body.26:
|
|
%t138 = load i32, i32* @ii
|
|
%t139 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t138
|
|
store i32 32, i32* %t139
|
|
%t140 = load i32, i32* @ii
|
|
%t141 = add i32 %t140, 1
|
|
%t142 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t141
|
|
%t143 = load i32, i32* @c
|
|
store i32 %t143, i32* %t142
|
|
%t144 = load i32, i32* @ii
|
|
%t145 = add i32 %t144, 2
|
|
store i32 %t145, i32* @ii
|
|
%t146 = call i32 @chapop()
|
|
store i32 %t146, i32* @c
|
|
br label %while.cond.25
|
|
while.end.27:
|
|
br label %if.end.24
|
|
if.then.28:
|
|
br label %while.cond.30
|
|
if.end.29:
|
|
%t194 = load i32, i32* @i
|
|
%t195 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t194
|
|
%t196 = load i32, i32* %t195
|
|
%t197 = icmp eq i32 %t196, 45
|
|
%t198 = zext i1 %t197 to i32
|
|
%t199 = icmp ne i32 %t198, 0
|
|
br i1 %t199, label %if.then.40, label %if.end.41
|
|
while.cond.30:
|
|
%t153 = load i32, i32* @chat
|
|
%t154 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t153
|
|
%t155 = load i32, i32* %t154
|
|
%t156 = icmp eq i32 %t155, 43
|
|
%t157 = zext i1 %t156 to i32
|
|
%t158 = icmp ne i32 %t157, 0
|
|
br i1 %t158, label %while.body.31, label %lor.rhs.37
|
|
while.body.31:
|
|
%t189 = call i32 @find()
|
|
%t190 = icmp eq i32 %t189, 0
|
|
%t191 = zext i1 %t190 to i32
|
|
%t192 = icmp ne i32 %t191, 0
|
|
br i1 %t192, label %if.then.38, label %if.end.39
|
|
while.end.32:
|
|
call void @chapush(i32 43)
|
|
br label %if.end.29
|
|
lor.rhs.33:
|
|
%t183 = load i32, i32* @chat
|
|
%t184 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t183
|
|
%t185 = load i32, i32* %t184
|
|
%t186 = icmp eq i32 %t185, 94
|
|
%t187 = zext i1 %t186 to i32
|
|
%t188 = icmp ne i32 %t187, 0
|
|
br i1 %t188, label %while.body.31, label %while.end.32
|
|
lor.rhs.34:
|
|
%t177 = load i32, i32* @chat
|
|
%t178 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t177
|
|
%t179 = load i32, i32* %t178
|
|
%t180 = icmp eq i32 %t179, 37
|
|
%t181 = zext i1 %t180 to i32
|
|
%t182 = icmp ne i32 %t181, 0
|
|
br i1 %t182, label %while.body.31, label %lor.rhs.33
|
|
lor.rhs.35:
|
|
%t171 = load i32, i32* @chat
|
|
%t172 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t171
|
|
%t173 = load i32, i32* %t172
|
|
%t174 = icmp eq i32 %t173, 47
|
|
%t175 = zext i1 %t174 to i32
|
|
%t176 = icmp ne i32 %t175, 0
|
|
br i1 %t176, label %while.body.31, label %lor.rhs.34
|
|
lor.rhs.36:
|
|
%t165 = load i32, i32* @chat
|
|
%t166 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t165
|
|
%t167 = load i32, i32* %t166
|
|
%t168 = icmp eq i32 %t167, 42
|
|
%t169 = zext i1 %t168 to i32
|
|
%t170 = icmp ne i32 %t169, 0
|
|
br i1 %t170, label %while.body.31, label %lor.rhs.35
|
|
lor.rhs.37:
|
|
%t159 = load i32, i32* @chat
|
|
%t160 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t159
|
|
%t161 = load i32, i32* %t160
|
|
%t162 = icmp eq i32 %t161, 45
|
|
%t163 = zext i1 %t162 to i32
|
|
%t164 = icmp ne i32 %t163, 0
|
|
br i1 %t164, label %while.body.31, label %lor.rhs.36
|
|
if.then.38:
|
|
br label %while.end.32
|
|
if.end.39:
|
|
br label %while.cond.30
|
|
if.then.40:
|
|
br label %while.cond.42
|
|
if.end.41:
|
|
%t241 = load i32, i32* @i
|
|
%t242 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t241
|
|
%t243 = load i32, i32* %t242
|
|
%t244 = icmp eq i32 %t243, 42
|
|
%t245 = zext i1 %t244 to i32
|
|
%t246 = icmp ne i32 %t245, 0
|
|
br i1 %t246, label %if.then.52, label %if.end.53
|
|
while.cond.42:
|
|
%t200 = load i32, i32* @chat
|
|
%t201 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t200
|
|
%t202 = load i32, i32* %t201
|
|
%t203 = icmp eq i32 %t202, 43
|
|
%t204 = zext i1 %t203 to i32
|
|
%t205 = icmp ne i32 %t204, 0
|
|
br i1 %t205, label %while.body.43, label %lor.rhs.49
|
|
while.body.43:
|
|
%t236 = call i32 @find()
|
|
%t237 = icmp eq i32 %t236, 0
|
|
%t238 = zext i1 %t237 to i32
|
|
%t239 = icmp ne i32 %t238, 0
|
|
br i1 %t239, label %if.then.50, label %if.end.51
|
|
while.end.44:
|
|
call void @chapush(i32 45)
|
|
br label %if.end.41
|
|
lor.rhs.45:
|
|
%t230 = load i32, i32* @chat
|
|
%t231 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t230
|
|
%t232 = load i32, i32* %t231
|
|
%t233 = icmp eq i32 %t232, 94
|
|
%t234 = zext i1 %t233 to i32
|
|
%t235 = icmp ne i32 %t234, 0
|
|
br i1 %t235, label %while.body.43, label %while.end.44
|
|
lor.rhs.46:
|
|
%t224 = load i32, i32* @chat
|
|
%t225 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t224
|
|
%t226 = load i32, i32* %t225
|
|
%t227 = icmp eq i32 %t226, 37
|
|
%t228 = zext i1 %t227 to i32
|
|
%t229 = icmp ne i32 %t228, 0
|
|
br i1 %t229, label %while.body.43, label %lor.rhs.45
|
|
lor.rhs.47:
|
|
%t218 = load i32, i32* @chat
|
|
%t219 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t218
|
|
%t220 = load i32, i32* %t219
|
|
%t221 = icmp eq i32 %t220, 47
|
|
%t222 = zext i1 %t221 to i32
|
|
%t223 = icmp ne i32 %t222, 0
|
|
br i1 %t223, label %while.body.43, label %lor.rhs.46
|
|
lor.rhs.48:
|
|
%t212 = load i32, i32* @chat
|
|
%t213 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t212
|
|
%t214 = load i32, i32* %t213
|
|
%t215 = icmp eq i32 %t214, 42
|
|
%t216 = zext i1 %t215 to i32
|
|
%t217 = icmp ne i32 %t216, 0
|
|
br i1 %t217, label %while.body.43, label %lor.rhs.47
|
|
lor.rhs.49:
|
|
%t206 = load i32, i32* @chat
|
|
%t207 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t206
|
|
%t208 = load i32, i32* %t207
|
|
%t209 = icmp eq i32 %t208, 45
|
|
%t210 = zext i1 %t209 to i32
|
|
%t211 = icmp ne i32 %t210, 0
|
|
br i1 %t211, label %while.body.43, label %lor.rhs.48
|
|
if.then.50:
|
|
br label %while.end.44
|
|
if.end.51:
|
|
br label %while.cond.42
|
|
if.then.52:
|
|
br label %while.cond.54
|
|
if.end.53:
|
|
%t276 = load i32, i32* @i
|
|
%t277 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t276
|
|
%t278 = load i32, i32* %t277
|
|
%t279 = icmp eq i32 %t278, 47
|
|
%t280 = zext i1 %t279 to i32
|
|
%t281 = icmp ne i32 %t280, 0
|
|
br i1 %t281, label %if.then.62, label %if.end.63
|
|
while.cond.54:
|
|
%t247 = load i32, i32* @chat
|
|
%t248 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t247
|
|
%t249 = load i32, i32* %t248
|
|
%t250 = icmp eq i32 %t249, 42
|
|
%t251 = zext i1 %t250 to i32
|
|
%t252 = icmp ne i32 %t251, 0
|
|
br i1 %t252, label %while.body.55, label %lor.rhs.59
|
|
while.body.55:
|
|
%t271 = call i32 @find()
|
|
%t272 = icmp eq i32 %t271, 0
|
|
%t273 = zext i1 %t272 to i32
|
|
%t274 = icmp ne i32 %t273, 0
|
|
br i1 %t274, label %if.then.60, label %if.end.61
|
|
while.end.56:
|
|
call void @chapush(i32 42)
|
|
br label %if.end.53
|
|
lor.rhs.57:
|
|
%t265 = load i32, i32* @chat
|
|
%t266 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t265
|
|
%t267 = load i32, i32* %t266
|
|
%t268 = icmp eq i32 %t267, 94
|
|
%t269 = zext i1 %t268 to i32
|
|
%t270 = icmp ne i32 %t269, 0
|
|
br i1 %t270, label %while.body.55, label %while.end.56
|
|
lor.rhs.58:
|
|
%t259 = load i32, i32* @chat
|
|
%t260 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t259
|
|
%t261 = load i32, i32* %t260
|
|
%t262 = icmp eq i32 %t261, 37
|
|
%t263 = zext i1 %t262 to i32
|
|
%t264 = icmp ne i32 %t263, 0
|
|
br i1 %t264, label %while.body.55, label %lor.rhs.57
|
|
lor.rhs.59:
|
|
%t253 = load i32, i32* @chat
|
|
%t254 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t253
|
|
%t255 = load i32, i32* %t254
|
|
%t256 = icmp eq i32 %t255, 47
|
|
%t257 = zext i1 %t256 to i32
|
|
%t258 = icmp ne i32 %t257, 0
|
|
br i1 %t258, label %while.body.55, label %lor.rhs.58
|
|
if.then.60:
|
|
br label %while.end.56
|
|
if.end.61:
|
|
br label %while.cond.54
|
|
if.then.62:
|
|
br label %while.cond.64
|
|
if.end.63:
|
|
%t311 = load i32, i32* @i
|
|
%t312 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get, i32 0, i32 %t311
|
|
%t313 = load i32, i32* %t312
|
|
%t314 = icmp eq i32 %t313, 37
|
|
%t315 = zext i1 %t314 to i32
|
|
%t316 = icmp ne i32 %t315, 0
|
|
br i1 %t316, label %if.then.72, label %if.end.73
|
|
while.cond.64:
|
|
%t282 = load i32, i32* @chat
|
|
%t283 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t282
|
|
%t284 = load i32, i32* %t283
|
|
%t285 = icmp eq i32 %t284, 42
|
|
%t286 = zext i1 %t285 to i32
|
|
%t287 = icmp ne i32 %t286, 0
|
|
br i1 %t287, label %while.body.65, label %lor.rhs.69
|
|
while.body.65:
|
|
%t306 = call i32 @find()
|
|
%t307 = icmp eq i32 %t306, 0
|
|
%t308 = zext i1 %t307 to i32
|
|
%t309 = icmp ne i32 %t308, 0
|
|
br i1 %t309, label %if.then.70, label %if.end.71
|
|
while.end.66:
|
|
call void @chapush(i32 47)
|
|
br label %if.end.63
|
|
lor.rhs.67:
|
|
%t300 = load i32, i32* @chat
|
|
%t301 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t300
|
|
%t302 = load i32, i32* %t301
|
|
%t303 = icmp eq i32 %t302, 94
|
|
%t304 = zext i1 %t303 to i32
|
|
%t305 = icmp ne i32 %t304, 0
|
|
br i1 %t305, label %while.body.65, label %while.end.66
|
|
lor.rhs.68:
|
|
%t294 = load i32, i32* @chat
|
|
%t295 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t294
|
|
%t296 = load i32, i32* %t295
|
|
%t297 = icmp eq i32 %t296, 37
|
|
%t298 = zext i1 %t297 to i32
|
|
%t299 = icmp ne i32 %t298, 0
|
|
br i1 %t299, label %while.body.65, label %lor.rhs.67
|
|
lor.rhs.69:
|
|
%t288 = load i32, i32* @chat
|
|
%t289 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t288
|
|
%t290 = load i32, i32* %t289
|
|
%t291 = icmp eq i32 %t290, 47
|
|
%t292 = zext i1 %t291 to i32
|
|
%t293 = icmp ne i32 %t292, 0
|
|
br i1 %t293, label %while.body.65, label %lor.rhs.68
|
|
if.then.70:
|
|
br label %while.end.66
|
|
if.end.71:
|
|
br label %while.cond.64
|
|
if.then.72:
|
|
br label %while.cond.74
|
|
if.end.73:
|
|
%t346 = load i32, i32* @ii
|
|
%t347 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t346
|
|
store i32 32, i32* %t347
|
|
%t348 = load i32, i32* @ii
|
|
%t349 = add i32 %t348, 1
|
|
store i32 %t349, i32* @ii
|
|
br label %if.end.18
|
|
while.cond.74:
|
|
%t317 = load i32, i32* @chat
|
|
%t318 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t317
|
|
%t319 = load i32, i32* %t318
|
|
%t320 = icmp eq i32 %t319, 42
|
|
%t321 = zext i1 %t320 to i32
|
|
%t322 = icmp ne i32 %t321, 0
|
|
br i1 %t322, label %while.body.75, label %lor.rhs.79
|
|
while.body.75:
|
|
%t341 = call i32 @find()
|
|
%t342 = icmp eq i32 %t341, 0
|
|
%t343 = zext i1 %t342 to i32
|
|
%t344 = icmp ne i32 %t343, 0
|
|
br i1 %t344, label %if.then.80, label %if.end.81
|
|
while.end.76:
|
|
call void @chapush(i32 37)
|
|
br label %if.end.73
|
|
lor.rhs.77:
|
|
%t335 = load i32, i32* @chat
|
|
%t336 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t335
|
|
%t337 = load i32, i32* %t336
|
|
%t338 = icmp eq i32 %t337, 94
|
|
%t339 = zext i1 %t338 to i32
|
|
%t340 = icmp ne i32 %t339, 0
|
|
br i1 %t340, label %while.body.75, label %while.end.76
|
|
lor.rhs.78:
|
|
%t329 = load i32, i32* @chat
|
|
%t330 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t329
|
|
%t331 = load i32, i32* %t330
|
|
%t332 = icmp eq i32 %t331, 37
|
|
%t333 = zext i1 %t332 to i32
|
|
%t334 = icmp ne i32 %t333, 0
|
|
br i1 %t334, label %while.body.75, label %lor.rhs.77
|
|
lor.rhs.79:
|
|
%t323 = load i32, i32* @chat
|
|
%t324 = getelementptr inbounds [10000 x i32], [10000 x i32]* @chas, i32 0, i32 %t323
|
|
%t325 = load i32, i32* %t324
|
|
%t326 = icmp eq i32 %t325, 47
|
|
%t327 = zext i1 %t326 to i32
|
|
%t328 = icmp ne i32 %t327, 0
|
|
br i1 %t328, label %while.body.75, label %lor.rhs.78
|
|
if.then.80:
|
|
br label %while.end.76
|
|
if.end.81:
|
|
br label %while.cond.74
|
|
while.cond.82:
|
|
%t352 = load i32, i32* @chat
|
|
%t353 = icmp sgt i32 %t352, 0
|
|
%t354 = zext i1 %t353 to i32
|
|
%t355 = icmp ne i32 %t354, 0
|
|
br i1 %t355, label %while.body.83, label %while.end.84
|
|
while.body.83:
|
|
%t357 = call i32 @chapop()
|
|
store i32 %t357, i32* %t356
|
|
%t358 = load i32, i32* @ii
|
|
%t359 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t358
|
|
store i32 32, i32* %t359
|
|
%t360 = load i32, i32* @ii
|
|
%t361 = add i32 %t360, 1
|
|
%t362 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t361
|
|
%t363 = load i32, i32* %t356
|
|
store i32 %t363, i32* %t362
|
|
%t364 = load i32, i32* @ii
|
|
%t365 = add i32 %t364, 2
|
|
store i32 %t365, i32* @ii
|
|
br label %while.cond.82
|
|
while.end.84:
|
|
%t366 = load i32, i32* @ii
|
|
%t367 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t366
|
|
store i32 64, i32* %t367
|
|
store i32 1, i32* @i
|
|
br label %while.cond.85
|
|
while.cond.85:
|
|
%t368 = load i32, i32* @i
|
|
%t369 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t368
|
|
%t370 = load i32, i32* %t369
|
|
%t371 = icmp ne i32 %t370, 64
|
|
%t372 = zext i1 %t371 to i32
|
|
%t373 = icmp ne i32 %t372, 0
|
|
br i1 %t373, label %while.body.86, label %while.end.87
|
|
while.body.86:
|
|
%t374 = load i32, i32* @i
|
|
%t375 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t374
|
|
%t376 = load i32, i32* %t375
|
|
%t377 = icmp eq i32 %t376, 43
|
|
%t378 = zext i1 %t377 to i32
|
|
%t379 = icmp ne i32 %t378, 0
|
|
br i1 %t379, label %if.then.88, label %lor.rhs.95
|
|
while.end.87:
|
|
%t505 = getelementptr inbounds [10000 x i32], [10000 x i32]* @ints, i32 0, i32 1
|
|
%t506 = load i32, i32* %t505
|
|
call void @putint(i32 %t506)
|
|
ret i32 0
|
|
if.then.88:
|
|
%t411 = call i32 @intpop()
|
|
store i32 %t411, i32* %t410
|
|
%t413 = call i32 @intpop()
|
|
store i32 %t413, i32* %t412
|
|
store i32 0, i32* %t414
|
|
%t415 = load i32, i32* @i
|
|
%t416 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t415
|
|
%t417 = load i32, i32* %t416
|
|
%t418 = icmp eq i32 %t417, 43
|
|
%t419 = zext i1 %t418 to i32
|
|
%t420 = icmp ne i32 %t419, 0
|
|
br i1 %t420, label %if.then.96, label %if.end.97
|
|
if.else.89:
|
|
%t471 = load i32, i32* @i
|
|
%t472 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t471
|
|
%t473 = load i32, i32* %t472
|
|
%t474 = icmp ne i32 %t473, 32
|
|
%t475 = zext i1 %t474 to i32
|
|
%t476 = icmp ne i32 %t475, 0
|
|
br i1 %t476, label %if.then.108, label %if.end.109
|
|
if.end.90:
|
|
%t503 = load i32, i32* @i
|
|
%t504 = add i32 %t503, 1
|
|
store i32 %t504, i32* @i
|
|
br label %while.cond.85
|
|
lor.rhs.91:
|
|
%t404 = load i32, i32* @i
|
|
%t405 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t404
|
|
%t406 = load i32, i32* %t405
|
|
%t407 = icmp eq i32 %t406, 94
|
|
%t408 = zext i1 %t407 to i32
|
|
%t409 = icmp ne i32 %t408, 0
|
|
br i1 %t409, label %if.then.88, label %if.else.89
|
|
lor.rhs.92:
|
|
%t398 = load i32, i32* @i
|
|
%t399 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t398
|
|
%t400 = load i32, i32* %t399
|
|
%t401 = icmp eq i32 %t400, 37
|
|
%t402 = zext i1 %t401 to i32
|
|
%t403 = icmp ne i32 %t402, 0
|
|
br i1 %t403, label %if.then.88, label %lor.rhs.91
|
|
lor.rhs.93:
|
|
%t392 = load i32, i32* @i
|
|
%t393 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t392
|
|
%t394 = load i32, i32* %t393
|
|
%t395 = icmp eq i32 %t394, 47
|
|
%t396 = zext i1 %t395 to i32
|
|
%t397 = icmp ne i32 %t396, 0
|
|
br i1 %t397, label %if.then.88, label %lor.rhs.92
|
|
lor.rhs.94:
|
|
%t386 = load i32, i32* @i
|
|
%t387 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t386
|
|
%t388 = load i32, i32* %t387
|
|
%t389 = icmp eq i32 %t388, 42
|
|
%t390 = zext i1 %t389 to i32
|
|
%t391 = icmp ne i32 %t390, 0
|
|
br i1 %t391, label %if.then.88, label %lor.rhs.93
|
|
lor.rhs.95:
|
|
%t380 = load i32, i32* @i
|
|
%t381 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t380
|
|
%t382 = load i32, i32* %t381
|
|
%t383 = icmp eq i32 %t382, 45
|
|
%t384 = zext i1 %t383 to i32
|
|
%t385 = icmp ne i32 %t384, 0
|
|
br i1 %t385, label %if.then.88, label %lor.rhs.94
|
|
if.then.96:
|
|
%t421 = load i32, i32* %t410
|
|
%t422 = load i32, i32* %t412
|
|
%t423 = add i32 %t421, %t422
|
|
store i32 %t423, i32* %t414
|
|
br label %if.end.97
|
|
if.end.97:
|
|
%t424 = load i32, i32* @i
|
|
%t425 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t424
|
|
%t426 = load i32, i32* %t425
|
|
%t427 = icmp eq i32 %t426, 45
|
|
%t428 = zext i1 %t427 to i32
|
|
%t429 = icmp ne i32 %t428, 0
|
|
br i1 %t429, label %if.then.98, label %if.end.99
|
|
if.then.98:
|
|
%t430 = load i32, i32* %t412
|
|
%t431 = load i32, i32* %t410
|
|
%t432 = sub i32 %t430, %t431
|
|
store i32 %t432, i32* %t414
|
|
br label %if.end.99
|
|
if.end.99:
|
|
%t433 = load i32, i32* @i
|
|
%t434 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t433
|
|
%t435 = load i32, i32* %t434
|
|
%t436 = icmp eq i32 %t435, 42
|
|
%t437 = zext i1 %t436 to i32
|
|
%t438 = icmp ne i32 %t437, 0
|
|
br i1 %t438, label %if.then.100, label %if.end.101
|
|
if.then.100:
|
|
%t439 = load i32, i32* %t410
|
|
%t440 = load i32, i32* %t412
|
|
%t441 = mul i32 %t439, %t440
|
|
store i32 %t441, i32* %t414
|
|
br label %if.end.101
|
|
if.end.101:
|
|
%t442 = load i32, i32* @i
|
|
%t443 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t442
|
|
%t444 = load i32, i32* %t443
|
|
%t445 = icmp eq i32 %t444, 47
|
|
%t446 = zext i1 %t445 to i32
|
|
%t447 = icmp ne i32 %t446, 0
|
|
br i1 %t447, label %if.then.102, label %if.end.103
|
|
if.then.102:
|
|
%t448 = load i32, i32* %t412
|
|
%t449 = load i32, i32* %t410
|
|
%t450 = sdiv i32 %t448, %t449
|
|
store i32 %t450, i32* %t414
|
|
br label %if.end.103
|
|
if.end.103:
|
|
%t451 = load i32, i32* @i
|
|
%t452 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t451
|
|
%t453 = load i32, i32* %t452
|
|
%t454 = icmp eq i32 %t453, 37
|
|
%t455 = zext i1 %t454 to i32
|
|
%t456 = icmp ne i32 %t455, 0
|
|
br i1 %t456, label %if.then.104, label %if.end.105
|
|
if.then.104:
|
|
%t457 = load i32, i32* %t412
|
|
%t458 = load i32, i32* %t410
|
|
%t459 = srem i32 %t457, %t458
|
|
store i32 %t459, i32* %t414
|
|
br label %if.end.105
|
|
if.end.105:
|
|
%t460 = load i32, i32* @i
|
|
%t461 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t460
|
|
%t462 = load i32, i32* %t461
|
|
%t463 = icmp eq i32 %t462, 94
|
|
%t464 = zext i1 %t463 to i32
|
|
%t465 = icmp ne i32 %t464, 0
|
|
br i1 %t465, label %if.then.106, label %if.end.107
|
|
if.then.106:
|
|
%t466 = load i32, i32* %t412
|
|
%t467 = load i32, i32* %t410
|
|
%t468 = call i32 @power(i32 %t466, i32 %t467)
|
|
store i32 %t468, i32* %t414
|
|
br label %if.end.107
|
|
if.end.107:
|
|
%t469 = load i32, i32* %t414
|
|
call void @intpush(i32 %t469)
|
|
br label %if.end.90
|
|
if.then.108:
|
|
%t477 = load i32, i32* @i
|
|
%t478 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t477
|
|
%t479 = load i32, i32* %t478
|
|
%t480 = sub i32 %t479, 48
|
|
call void @intpush(i32 %t480)
|
|
store i32 1, i32* @ii
|
|
br label %while.cond.110
|
|
if.end.109:
|
|
br label %if.end.90
|
|
while.cond.110:
|
|
%t482 = load i32, i32* @i
|
|
%t483 = load i32, i32* @ii
|
|
%t484 = add i32 %t482, %t483
|
|
%t485 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t484
|
|
%t486 = load i32, i32* %t485
|
|
%t487 = icmp ne i32 %t486, 32
|
|
%t488 = zext i1 %t487 to i32
|
|
%t489 = icmp ne i32 %t488, 0
|
|
br i1 %t489, label %while.body.111, label %while.end.112
|
|
while.body.111:
|
|
%t490 = load i32, i32* @i
|
|
%t491 = load i32, i32* @ii
|
|
%t492 = add i32 %t490, %t491
|
|
%t493 = getelementptr inbounds [10000 x i32], [10000 x i32]* @get2, i32 0, i32 %t492
|
|
%t494 = load i32, i32* %t493
|
|
%t495 = sub i32 %t494, 48
|
|
call void @intadd(i32 %t495)
|
|
%t497 = load i32, i32* @ii
|
|
%t498 = add i32 %t497, 1
|
|
store i32 %t498, i32* @ii
|
|
br label %while.cond.110
|
|
while.end.112:
|
|
%t499 = load i32, i32* @i
|
|
%t500 = load i32, i32* @ii
|
|
%t501 = add i32 %t499, %t500
|
|
%t502 = sub i32 %t501, 1
|
|
store i32 %t502, i32* @i
|
|
br label %if.end.109
|
|
}
|