#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*/ exit(int);
int foo2_com4(int);
int foo_com3(int);
int /*<<< orphan*/ hpfy();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int res1 = foo_com3(6);
  int res2 = foo2_com4(61);
  printf("foo_com3(6): %d\n", res1);
  printf("foo2_com4(61): %d\n", res2);
  if (res1 != (11 + sizeof(int *))) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  if (res2 != 70) {
    printf("Error %d\n", (int)2);
    exit(2);
  };
  hpfy();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1070 <foo_com3@plt>
mov    %eax,-0x8(%rbp)
mov    $0x3d,%edi
call   1050 <foo2_com4@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmp    $0x13,%rax
je     11c0 <main+0x70>
lea    0xe78(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
cmpl   $0x46,-0xc(%rbp)
je     11e5 <main+0x95>
lea    0xe53(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <exit@plt>
mov    $0x0,%al
call   1040 <hpfy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x6,%edi
call   1070 <foo_com3@plt>
mov    %eax,%ebp
mov    $0x3d,%edi
call   1050 <foo2_com4@plt>
mov    %eax,%ebx
lea    0xe8e(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x13,%ebp
jne    11a1 <main+0x51>
cmp    $0x46,%ebx
jne    11bc <main+0x6c>
xor    %eax,%eax
call   1040 <hpfy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe7c(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    0xe61(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"foo_com3(6): %d\0A\00"
@.str.1 = [19 x i8] c"foo2_com4(61): %d\0A\00"
@.str.2 = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @foo_com3(i32 6)
store i32 %4, i32* %2
%5 = call i32 @foo2_com4(i32 61)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = icmp ne i64 %11, 19
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 1)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %0
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 70
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 2)
%21 = call i32 @exit(i32 2)
unreachable
22: ; preds = %16
%23 = call i32 (...) @hpfy()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"foo_com3(6): %d\0A\00"
@.str.1 = [19 x i8] c"foo2_com4(61): %d\0A\00"
@.str.2 = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo_com3(i32 6)
%2 = tail call i32 @foo2_com4(i32 61)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%5 = icmp eq i32 %1, 19
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = icmp eq i32 %2, 70
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 2)
%13 = tail call i32 @exit(i32 2)
unreachable
14: ; preds = %9
%15 = tail call i32 (...) @hpfy()
ret i32 0
}