#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*/ flushall();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int num1;
  int num2;
  int ans;
  printf("Please enter two numbers to be added to together\n");
  scanf("%d", &num1);
  scanf("%d", &num2);
  flushall();
  ans = num1 + num2;
  if (ans < 10) {
    printf("Answer: %d, also your answer is smaller than 10", ans);
  } else if (ans > 10) {
    printf("Answer: %d, also your answer is larger than 10", ans);
  } else {
    printf("Answer: %d, your number is 10", ans);
  }
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xebe(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1040 <flushall@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    11ad <main+0x6d>
mov    -0x10(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e3 <main+0xa3>
cmpl   $0xa,-0x10(%rbp)
jle    11cd <main+0x8d>
mov    -0x10(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11de <main+0x9e>
mov    -0x10(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e3 <main+0xa3>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
xor    %eax,%eax
call   1050 <flushall@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
cmp    $0x9,%esi
jg     119f <main+0x4f>
lea    0xe66(%rip),%rdi
jmp    11b9 <main+0x69>
cmp    $0xa,%esi
jne    11b2 <main+0x62>
lea    0xeb7(%rip),%rdi
mov    $0xa,%esi
jmp    11b9 <main+0x69>
lea    0xe7a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Please enter two numbers to be added to together\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [48 x i8] c"Answer: %d, also your answer is smaller than 10\00"
@.str.3 = [47 x i8] c"Answer: %d, also your answer is larger than 10\00"
@.str.4 = [30 x i8] c"Answer: %d, your number is 10\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = call i32 (...) @flushall()
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = load i32, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %27
17: ; preds = %0
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 10
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %21)
br label %26
23: ; preds = %17
%24 = load i32, i32* %4
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %23, %20
br label %27
27: ; preds = %26, %14
%28 = call i32 (...) @getchar()
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [48 x i8] c"Answer: %d, also your answer is smaller than 10\00"
@.str.3 = [47 x i8] c"Answer: %d, also your answer is larger than 10\00"
@.str.4 = [30 x i8] c"Answer: %d, your number is 10\00"
@str = [49 x i8] c"Please enter two numbers to be added to together\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (...) @flushall()
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %21
15: ; preds = %0
%16 = icmp eq i32 %11, 10
br i1 %16, label %19, label %17
17: ; preds = %15
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %11)
br label %21
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 10)
br label %21
21: ; preds = %17, %19, %13
%22 = call i32 (...) @getchar()
ret i32 0
}