#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 gcd_division(int, int);
int gcd_recursive(int, int);
int gcd_substraction(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", gcd_division(210, 45) == 15);
  printf("%d", gcd_division(0, 0) == 0);
  printf("%d", gcd_division(20, 77) == 1);
  printf("%d", gcd_substraction(210, 45) == 15);
  printf("%d", gcd_substraction(0, 0) == 0);
  printf("%d", gcd_substraction(20, 77) == 1);
  printf("%d", gcd_recursive(210, 45) == 15);
  printf("%d", gcd_recursive(0, 0) == 0);
  printf("%d", gcd_recursive(20, 77) == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1060 <gcd_division@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1060 <gcd_division@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1060 <gcd_division@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1050 <gcd_substraction@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <gcd_substraction@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe04(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1050 <gcd_substraction@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xdde(%rip),%rdi
call   1030 <printf@plt>
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1040 <gcd_recursive@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xdb8(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <gcd_recursive@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd98(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1040 <gcd_recursive@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1060 <gcd_division@plt>
xor    %esi,%esi
cmp    $0xf,%eax
sete   %sil
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1060 <gcd_division@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1060 <gcd_division@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1050 <gcd_substraction@plt>
xor    %esi,%esi
cmp    $0xf,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <gcd_substraction@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1050 <gcd_substraction@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0xd2,%edi
mov    $0x2d,%esi
call   1040 <gcd_recursive@plt>
xor    %esi,%esi
cmp    $0xf,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <gcd_recursive@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
mov    $0x4d,%esi
call   1040 <gcd_recursive@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @gcd_division(i32 210, i32 45)
%3 = icmp eq i32 %2, 15
%4 = zext i1 %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @gcd_division(i32 0, i32 0)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @gcd_division(i32 20, i32 77)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = call i32 @gcd_substraction(i32 210, i32 45)
%15 = icmp eq i32 %14, 15
%16 = zext i1 %15 to i32
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = call i32 @gcd_substraction(i32 0, i32 0)
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = call i32 @gcd_substraction(i32 20, i32 77)
%23 = icmp eq i32 %22, 1
%24 = zext i1 %23 to i32
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = call i32 @gcd_recursive(i32 210, i32 45)
%27 = icmp eq i32 %26, 15
%28 = zext i1 %27 to i32
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = call i32 @gcd_recursive(i32 0, i32 0)
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = call i32 @gcd_recursive(i32 20, i32 77)
%35 = icmp eq i32 %34, 1
%36 = zext i1 %35 to i32
%37 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @gcd_division(i32 210, i32 45)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @gcd_division(i32 0, i32 0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @gcd_division(i32 20, i32 77)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @gcd_substraction(i32 210, i32 45)
%14 = icmp eq i32 %13, 15
%15 = zext i1 %14 to i32
%16 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @gcd_substraction(i32 0, i32 0)
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = tail call i32 @gcd_substraction(i32 20, i32 77)
%22 = icmp eq i32 %21, 1
%23 = zext i1 %22 to i32
%24 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = tail call i32 @gcd_recursive(i32 210, i32 45)
%26 = icmp eq i32 %25, 15
%27 = zext i1 %26 to i32
%28 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = tail call i32 @gcd_recursive(i32 0, i32 0)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = tail call i32 @gcd_recursive(i32 20, i32 77)
%34 = icmp eq i32 %33, 1
%35 = zext i1 %34 to i32
%36 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
ret i32 0
}