#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int *stack_constructor();
int /*<<< orphan*/ stack_destructor(int *);
int /*<<< orphan*/ stack_pop(int *);
int stack_push(int *, int);
int stack_top(int *, int *);
int main() {
  int *stack_1 = stack_constructor();
  int *stack_2 = stack_constructor();
  int times = 0, temp = 0;
  scanf("%d", &times);
  for (int i = 0; i < times; ++i) {
    scanf("%d", &temp);
    printf("push %d into %s: %s\n", temp, "stack_1",
           stack_push(stack_1, temp) ? "success" : "failed");
  }
  scanf("%d", &times);
  for (int i = 0; i < times; ++i) {
    int num = 0;
    int flag = stack_top(stack_1, &num);
    printf("get the top from stack_1: %s\n", flag ? "success" : "failed");
    if (flag) {
      printf("The top: %d\n", num);
      stack_pop(stack_1);
    } else {
      puts("The top: None");
    }
    flag = stack_push(stack_2, num);
    printf("push %d into %s: %s\n", num, "stack_2",
           flag ? "success" : "failed");
    flag = stack_push(stack_2, num + 1);
    printf("push %d into %s: %s\n", num + 1, "stack_2",
           flag ? "success" : "failed");
  }
  int num = 0;
  printf("The num in stack_1:");
  while (stack_top(stack_1, &num)) {
    printf(" %d", num);
    stack_pop(stack_1);
  }
  printf("\nThe num in stack_2:");
  while (stack_top(stack_2, &num)) {
    printf(" %d", num);
    stack_pop(stack_2);
  }
  putchar('\n');
  stack_destructor(stack_1);
  stack_destructor(stack_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <stack_constructor@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1080 <stack_constructor@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
lea    0xeb8(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1090 <scanf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1245 <main+0xb5>
lea    0xe95(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   10a0 <stack_push@plt>
mov    -0x38(%rbp),%esi
mov    %eax,%edx
lea    0xe11(%rip),%rcx
lea    0xe02(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
lea    0xdd7(%rip),%rdi
lea    0xde5(%rip),%rdx
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11da <main+0x4a>
lea    0xe36(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1090 <scanf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    136c <main+0x1dc>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <stack_top@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%ecx
lea    0xd9c(%rip),%rsi
lea    0xd8d(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x30(%rbp)
je     12ce <main+0x13e>
mov    -0x2c(%rbp),%esi
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   10b0 <stack_pop@plt>
jmp    12da <main+0x14a>
lea    0xd82(%rip),%rdi
call   1050 <puts@plt>
mov    -0x18(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   10a0 <stack_push@plt>
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xd2f(%rip),%rcx
lea    0xd20(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
lea    0xcf5(%rip),%rdi
lea    0xd53(%rip),%rdx
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
call   10a0 <stack_push@plt>
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
mov    -0x30(%rbp),%edx
lea    0xcea(%rip),%rcx
lea    0xcdb(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
lea    0xcb0(%rip),%rdi
lea    0xd0e(%rip),%rdx
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    125c <main+0xcc>
movl   $0x0,-0x34(%rbp)
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x34(%rbp),%rsi
call   1040 <stack_top@plt>
cmp    $0x0,%eax
je     13b6 <main+0x226>
mov    -0x34(%rbp),%esi
lea    0xce0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   10b0 <stack_pop@plt>
jmp    1381 <main+0x1f1>
lea    0xcc8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x34(%rbp),%rsi
call   1040 <stack_top@plt>
cmp    $0x0,%eax
je     13f9 <main+0x269>
mov    -0x34(%rbp),%esi
lea    0xc9d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <stack_pop@plt>
jmp    13c4 <main+0x234>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rdi
call   1070 <stack_destructor@plt>
mov    -0x18(%rbp),%rdi
call   1070 <stack_destructor@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %eax,%eax
call   1080 <stack_constructor@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1080 <stack_constructor@plt>
mov    %rax,0x20(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x14(%rsp)
lea    0xeb7(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1090 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
jle    124c <main+0xbc>
lea    0xe9f(%rip),%r14
lea    0xe16(%rip),%r13
lea    0xe24(%rip),%rbp
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
lea    0x14(%rsp),%rsi
call   1090 <scanf@plt>
mov    0x14(%rsp),%r15d
mov    %rbx,%rdi
mov    %r15d,%esi
call   10a0 <stack_push@plt>
test   %eax,%eax
lea    0xdf7(%rip),%rcx
lea    0xdf8(%rip),%rax
cmove  %rax,%rcx
mov    %r13,%rdi
mov    %r15d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r12d
cmp    0x10(%rsp),%r12d
jl     1200 <main+0x70>
lea    0xe2f(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1090 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
mov    %rbx,0x18(%rsp)
jle    1375 <main+0x1e5>
lea    0xdb1(%rip),%rbp
lea    0xda2(%rip),%r14
xor    %r13d,%r13d
jmp    131e <main+0x18e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xdc0(%rip),%rdi
call   1050 <puts@plt>
mov    0xc(%rsp),%esi
mov    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <stack_push@plt>
mov    0xc(%rsp),%esi
test   %eax,%eax
lea    0xd63(%rip),%r14
mov    %r14,%rcx
cmove  %rbp,%rcx
mov    %rbp,%r15
lea    0xd35(%rip),%rbp
mov    %rbp,%rdi
lea    0xd90(%rip),%r12
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%esi
add    $0x1,%esi
mov    %rbx,%rdi
call   10a0 <stack_push@plt>
mov    0xc(%rsp),%esi
add    $0x1,%esi
test   %eax,%eax
mov    %r14,%rcx
cmove  %r15,%rcx
mov    %rbp,%rdi
mov    %r15,%rbp
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmp    0x10(%rsp),%r13d
mov    0x18(%rsp),%rbx
jge    1375 <main+0x1e5>
movl   $0x0,0xc(%rsp)
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
call   1040 <stack_top@plt>
mov    %eax,%r15d
test   %eax,%eax
cmove  %rbp,%r14
lea    0xce9(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
test   %r15d,%r15d
je     1290 <main+0x100>
mov    0xc(%rsp),%esi
lea    0xce9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10b0 <stack_pop@plt>
jmp    129c <main+0x10c>
movl   $0x0,0xc(%rsp)
lea    0xce9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <stack_top@plt>
test   %eax,%eax
je     13d5 <main+0x245>
lea    0xcde(%rip),%r15
lea    0xc(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10b0 <stack_pop@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <stack_top@plt>
test   %eax,%eax
jne    13b0 <main+0x220>
lea    0xca9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc(%rsp),%rsi
mov    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <stack_top@plt>
test   %eax,%eax
je     1435 <main+0x2a5>
lea    0xc81(%rip),%r15
lea    0xc(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nop
mov    0xc(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10b0 <stack_pop@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <stack_top@plt>
test   %eax,%eax
jne    1410 <main+0x280>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%rdi
call   1070 <stack_destructor@plt>
mov    %rbx,%rdi
call   1070 <stack_destructor@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [21 x i8] c"push %d into %s: %s\0A\00"
@.str.2 = [8 x i8] c"stack_1\00"
@.str.3 = [8 x i8] c"success\00"
@.str.4 = [7 x i8] c"failed\00"
@.str.5 = [30 x i8] c"get the top from stack_1: %s\0A\00"
@.str.6 = [13 x i8] c"The top: %d\0A\00"
@.str.7 = [14 x i8] c"The top: None\00"
@.str.8 = [8 x i8] c"stack_2\00"
@.str.9 = [20 x i8] c"The num in stack_1:\00"
@.str.10 = [4 x i8] c" %d\00"
@.str.11 = [21 x i8] c"\0AThe num in stack_2:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32* (...) @stack_constructor()
store i32* %11, i32** %2
%12 = call i32* (...) @stack_constructor()
store i32* %12, i32** %3
store i32 0, i32* %4
store i32 0, i32* %5
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 0, i32* %6
br label %14
14: ; preds = %28, %0
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%20 = load i32, i32* %5
%21 = load i32*, i32** %2
%22 = load i32, i32* %5
%23 = call i32 @stack_push(i32* %21, i32 %22)
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i64
%26 = select i1 %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %18
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %14
31: ; preds = %14
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 0, i32* %7
br label %33
33: ; preds = %75, %31
%34 = load i32, i32* %7
%35 = load i32, i32* %4
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %78
37: ; preds = %33
store i32 0, i32* %8
%38 = load i32*, i32** %2
%39 = call i32 @stack_top(i32* %38, i32* %8)
store i32 %39, i32* %9
%40 = load i32, i32* %9
%41 = icmp ne i32 %40, 0
%42 = zext i1 %41 to i64
%43 = select i1 %41, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %43)
%45 = load i32, i32* %9
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %52
47: ; preds = %37
%48 = load i32, i32* %8
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %48)
%50 = load i32*, i32** %2
%51 = call i32 @stack_pop(i32* %50)
br label %54
52: ; preds = %37
%53 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %54
54: ; preds = %52, %47
%55 = load i32*, i32** %3
%56 = load i32, i32* %8
%57 = call i32 @stack_push(i32* %55, i32 %56)
store i32 %57, i32* %9
%58 = load i32, i32* %8
%59 = load i32, i32* %9
%60 = icmp ne i32 %59, 0
%61 = zext i1 %60 to i64
%62 = select i1 %60, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %62)
%64 = load i32*, i32** %3
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
%67 = call i32 @stack_push(i32* %64, i32 %66)
store i32 %67, i32* %9
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 1
%70 = load i32, i32* %9
%71 = icmp ne i32 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %69, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %73)
br label %75
75: ; preds = %54
%76 = load i32, i32* %7
%77 = add nsw i32 %76, 1
store i32 %77, i32* %7
br label %33
78: ; preds = %33
store i32 0, i32* %10
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
br label %80
80: ; preds = %84, %78
%81 = load i32*, i32** %2
%82 = call i32 @stack_top(i32* %81, i32* %10)
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %89
84: ; preds = %80
%85 = load i32, i32* %10
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %85)
%87 = load i32*, i32** %2
%88 = call i32 @stack_pop(i32* %87)
br label %80
89: ; preds = %80
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %91
91: ; preds = %95, %89
%92 = load i32*, i32** %3
%93 = call i32 @stack_top(i32* %92, i32* %10)
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %91
%96 = load i32, i32* %10
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %96)
%98 = load i32*, i32** %3
%99 = call i32 @stack_pop(i32* %98)
br label %91
100: ; preds = %91
%101 = call i32 @putchar(i8 signext 10)
%102 = load i32*, i32** %2
%103 = call i32 @stack_destructor(i32* %102)
%104 = load i32*, i32** %3
%105 = call i32 @stack_destructor(i32* %104)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [21 x i8] c"push %d into %s: %s\0A\00"
@.str.2 = [8 x i8] c"stack_1\00"
@.str.3 = [8 x i8] c"success\00"
@.str.4 = [7 x i8] c"failed\00"
@.str.5 = [30 x i8] c"get the top from stack_1: %s\0A\00"
@.str.6 = [13 x i8] c"The top: %d\0A\00"
@.str.7 = [14 x i8] c"The top: None\00"
@.str.8 = [8 x i8] c"stack_2\00"
@.str.9 = [20 x i8] c"The num in stack_1:\00"
@.str.10 = [4 x i8] c" %d\00"
@.str.11 = [21 x i8] c"\0AThe num in stack_2:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = tail call i32* (...) @stack_constructor()
%6 = tail call i32* (...) @stack_constructor()
%7 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%8 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %18, %0
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = bitcast i32* %3 to i8*
br label %34
18: ; preds = %0, %18
%19 = phi i32 [ %26, %18 ], [ 0, %0 ]
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%21 = load i32, i32* %2
%22 = call i32 @stack_push(i32* %5, i32 %21)
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %24)
%26 = add nuw nsw i32 %19, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %18, label %12
29: ; preds = %46, %12
%30 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%32 = call i32 @stack_top(i32* %5, i32* %4)
%33 = icmp eq i32 %32, 0
br i1 %33, label %70, label %64
34: ; preds = %16, %46
%35 = phi i32 [ 0, %16 ], [ %61, %46 ]
store i32 0, i32* %3
%36 = call i32 @stack_top(i32* %5, i32* %3)
%37 = icmp eq i32 %36, 0
%38 = select i1 %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %38)
br i1 %37, label %44, label %40
40: ; preds = %34
%41 = load i32, i32* %3
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %41)
%43 = call i32 @stack_pop(i32* %5)
br label %46
44: ; preds = %34
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %46
46: ; preds = %44, %40
%47 = load i32, i32* %3
%48 = call i32 @stack_push(i32* %6, i32 %47)
%49 = load i32, i32* %3
%50 = icmp eq i32 %48, 0
%51 = select i1 %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %49, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %51)
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
%55 = call i32 @stack_push(i32* %6, i32 %54)
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
%58 = icmp eq i32 %55, 0
%59 = select i1 %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %57, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %59)
%61 = add nuw nsw i32 %35, 1
%62 = load i32, i32* %1
%63 = icmp slt i32 %61, %62
br i1 %63, label %34, label %29
64: ; preds = %29, %64
%65 = load i32, i32* %4
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %65)
%67 = call i32 @stack_pop(i32* %5)
%68 = call i32 @stack_top(i32* %5, i32* %4)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %64
70: ; preds = %64, %29
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
%72 = call i32 @stack_top(i32* %6, i32* %4)
%73 = icmp eq i32 %72, 0
br i1 %73, label %80, label %74
74: ; preds = %70, %74
%75 = load i32, i32* %4
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %75)
%77 = call i32 @stack_pop(i32* %6)
%78 = call i32 @stack_top(i32* %6, i32* %4)
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %74
80: ; preds = %74, %70
%81 = call i32 @putchar(i8 signext 10)
%82 = call i32 @stack_destructor(i32* %5)
%83 = call i32 @stack_destructor(i32* %6)
ret i32 0
}