#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*/ pop_stack1();
int /*<<< orphan*/ printStack1();
int /*<<< orphan*/ printStack2();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ push_stack1(int);
int /*<<< orphan*/ push_stack2(int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  printf("There are %d rooms you can put one integer\n", 5);
  push_stack1(1);
  push_stack2(1);
  printStack1();
  printStack2();
  puts("//");
  push_stack1(2);
  printStack1();
  printStack2();
  puts("//");
  push_stack2(2);
  printStack1();
  printStack2();
  puts("//");
  push_stack1(3);
  printStack1();
  printStack2();
  puts("//");
  push_stack2(3);
  printStack1();
  printStack2();
  puts("//");
  pop_stack1();
  printStack1();
  printStack2();
  puts("//");
  pop_stack1();
  printStack1();
  printStack2();
  puts("//");
  pop_stack1();
  printStack1();
  printStack2();
  puts("//");
  pop_stack1();
  printStack1();
  printStack2();
  puts("//");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
mov    $0x5,%esi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1070 <push_stack1@plt>
mov    $0x1,%edi
call   1030 <push_stack2@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xe73(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
call   1070 <push_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xe4f(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
call   1030 <push_stack2@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xe2b(%rip),%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
call   1070 <push_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xe07(%rip),%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
call   1030 <push_stack2@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xde3(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1080 <pop_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xdc2(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1080 <pop_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xda1(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1080 <pop_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xd80(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1080 <pop_stack1@plt>
mov    $0x0,%al
call   1090 <printStack1@plt>
mov    $0x0,%al
call   1040 <printStack2@plt>
lea    0xd5f(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe88(%rip),%rdi
mov    $0x5,%esi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1070 <push_stack1@plt>
mov    $0x1,%edi
call   1030 <push_stack2@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
lea    0xe81(%rip),%rbx
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
call   1070 <push_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
call   1030 <push_stack2@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
call   1070 <push_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
call   1030 <push_stack2@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <pop_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <pop_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <pop_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <pop_stack1@plt>
xor    %eax,%eax
call   1090 <printStack1@plt>
xor    %eax,%eax
call   1040 <printStack2@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"There are %d rooms you can put one integer\0A\00"
@.str.1 = [3 x i8] c"//\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = call i32 @push_stack1(i32 1)
%4 = call i32 @push_stack2(i32 1)
%5 = call i32 (...) @printStack1()
%6 = call i32 (...) @printStack2()
%7 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @push_stack1(i32 2)
%9 = call i32 (...) @printStack1()
%10 = call i32 (...) @printStack2()
%11 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @push_stack2(i32 2)
%13 = call i32 (...) @printStack1()
%14 = call i32 (...) @printStack2()
%15 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @push_stack1(i32 3)
%17 = call i32 (...) @printStack1()
%18 = call i32 (...) @printStack2()
%19 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @push_stack2(i32 3)
%21 = call i32 (...) @printStack1()
%22 = call i32 (...) @printStack2()
%23 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (...) @pop_stack1()
%25 = call i32 (...) @printStack1()
%26 = call i32 (...) @printStack2()
%27 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (...) @pop_stack1()
%29 = call i32 (...) @printStack1()
%30 = call i32 (...) @printStack2()
%31 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 (...) @pop_stack1()
%33 = call i32 (...) @printStack1()
%34 = call i32 (...) @printStack2()
%35 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 (...) @pop_stack1()
%37 = call i32 (...) @printStack1()
%38 = call i32 (...) @printStack2()
%39 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"There are %d rooms you can put one integer\0A\00"
@.str.1 = [3 x i8] c"//\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @push_stack1(i32 1)
%3 = tail call i32 @push_stack2(i32 1)
%4 = tail call i32 (...) @printStack1()
%5 = tail call i32 (...) @printStack2()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @push_stack1(i32 2)
%8 = tail call i32 (...) @printStack1()
%9 = tail call i32 (...) @printStack2()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @push_stack2(i32 2)
%12 = tail call i32 (...) @printStack1()
%13 = tail call i32 (...) @printStack2()
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @push_stack1(i32 3)
%16 = tail call i32 (...) @printStack1()
%17 = tail call i32 (...) @printStack2()
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 @push_stack2(i32 3)
%20 = tail call i32 (...) @printStack1()
%21 = tail call i32 (...) @printStack2()
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = tail call i32 (...) @pop_stack1()
%24 = tail call i32 (...) @printStack1()
%25 = tail call i32 (...) @printStack2()
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = tail call i32 (...) @pop_stack1()
%28 = tail call i32 (...) @printStack1()
%29 = tail call i32 (...) @printStack2()
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%31 = tail call i32 (...) @pop_stack1()
%32 = tail call i32 (...) @printStack1()
%33 = tail call i32 (...) @printStack2()
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%35 = tail call i32 (...) @pop_stack1()
%36 = tail call i32 (...) @printStack1()
%37 = tail call i32 (...) @printStack2()
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}