#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*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void bar(int c, int i, int n, int d) {
  print_string("Should be 49\nGot: ");
  print_int(c);
  print_string("\n");
  print_string("Should be 99\nGot: ");
  print_int(i);
  print_string("\n");
  print_string("Should be 3\nGot: ");
  print_int(n);
  print_string("\n");
  print_string("Should be 4\nGot: ");
  print_int(d);
  print_string("\n");
  d = 128;
  print_string("Should be 128\nGot: ");
  print_int(d);
  print_string("\n");
  c = '1';
  print_string("Should be 49\nGot: ");
  print_int(c);
  print_string("\n");
  i = 1000;
  print_string("Should be 1000\nGot: ");
  print_int(i);
  print_string("\n");
  n = -4;
  print_string("Should be -4\nGot: ");
  print_int(n);
  print_string("\n");
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xec4(%rip),%rdi
call   1030 <print_string@plt>
lea    0xeba(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_int@plt>
lea    0xea4(%rip),%rdi
call   1030 <print_string@plt>
lea    0xead(%rip),%rdi
call   1030 <print_string@plt>
mov    -0xc(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe84(%rip),%rdi
call   1030 <print_string@plt>
lea    0xe9f(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x10(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe64(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x80,-0x10(%rbp)
lea    0xe8a(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x10(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe3d(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x31,-0x4(%rbp)
lea    0xe17(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe16(%rip),%rdi
call   1030 <print_string@plt>
movl   $0x3e8,-0x8(%rbp)
lea    0xe50(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_int@plt>
lea    0xdef(%rip),%rdi
call   1030 <print_string@plt>
movl   $0xfffffffc,-0xc(%rbp)
lea    0xe3e(%rip),%rdi
call   1030 <print_string@plt>
mov    -0xc(%rbp),%edi
call   1040 <print_int@plt>
lea    0xdc8(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xec7(%rip),%r14
mov    %r14,%rdi
call   1030 <print_string@plt>
mov    %ebx,%edi
call   1040 <print_int@plt>
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xeb7(%rip),%rdi
call   1030 <print_string@plt>
mov    %ebp,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xeaf(%rip),%rdi
call   1030 <print_string@plt>
mov    %r12d,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xea5(%rip),%rdi
call   1030 <print_string@plt>
mov    %r15d,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xe9b(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x80,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
mov    $0x31,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xe77(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x3e8,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
lea    0xe6e(%rip),%rdi
call   1030 <print_string@plt>
mov    $0xfffffffc,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Should be 49\0AGot: \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [19 x i8] c"Should be 99\0AGot: \00"
@.str.3 = [18 x i8] c"Should be 3\0AGot: \00"
@.str.4 = [18 x i8] c"Should be 4\0AGot: \00"
@.str.5 = [20 x i8] c"Should be 128\0AGot: \00"
@.str.6 = [21 x i8] c"Should be 1000\0AGot: \00"
@.str.7 = [19 x i8] c"Should be -4\0AGot: \00"
define void @bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %5
%11 = call i32 @print_int(i32 %10)
%12 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* %6
%15 = call i32 @print_int(i32 %14)
%16 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %7
%19 = call i32 @print_int(i32 %18)
%20 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%22 = load i32, i32* %8
%23 = call i32 @print_int(i32 %22)
%24 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 128, i32* %8
%25 = call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%26 = load i32, i32* %8
%27 = call i32 @print_int(i32 %26)
%28 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 49, i32* %5
%29 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%30 = load i32, i32* %5
%31 = call i32 @print_int(i32 %30)
%32 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 1000, i32* %6
%33 = call i32 @print_string(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%34 = load i32, i32* %6
%35 = call i32 @print_int(i32 %34)
%36 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 -4, i32* %7
%37 = call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%38 = load i32, i32* %7
%39 = call i32 @print_int(i32 %38)
%40 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Should be 49\0AGot: \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [19 x i8] c"Should be 99\0AGot: \00"
@.str.3 = [18 x i8] c"Should be 3\0AGot: \00"
@.str.4 = [18 x i8] c"Should be 4\0AGot: \00"
@.str.5 = [20 x i8] c"Should be 128\0AGot: \00"
@.str.6 = [21 x i8] c"Should be 1000\0AGot: \00"
@.str.7 = [19 x i8] c"Should be -4\0AGot: \00"
define void @bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @print_int(i32 %0)
%7 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @print_int(i32 %1)
%10 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @print_int(i32 %2)
%13 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 @print_string(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 @print_int(i32 %3)
%16 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @print_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%18 = tail call i32 @print_int(i32 128)
%19 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @print_int(i32 49)
%22 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = tail call i32 @print_string(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%24 = tail call i32 @print_int(i32 1000)
%25 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%26 = tail call i32 @print_string(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%27 = tail call i32 @print_int(i32 -4)
%28 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}