#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 getint();
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ putint(int);
int main() {
  int a;
  a = getint();
  int b;
  b = getint();
  if (a > b) {
    putint(a + b);
    putchar(10);
  }
  if (a < b) {
    putint(a - b);
    putchar(10);
  }
  if (a == b) {
    putint(a * b);
    putchar(10);
  }
  if (a != b) {
    putint(a / b);
    putchar(10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getint@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getint@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1174 <main+0x44>
mov    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1195 <main+0x65>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11b7 <main+0x87>
mov    -0x8(%rbp),%edi
imul   -0xc(%rbp),%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11db <main+0xab>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getint@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getint@plt>
mov    %eax,%r14d
cmp    %eax,%ebx
jle    115e <main+0x2e>
lea    (%r14,%rbx,1),%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
sub    %r14d,%edi
jge    1174 <main+0x44>
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    %r14d,%ebx
jne    117e <main+0x4e>
imul   %ebx,%ebx
jmp    1186 <main+0x56>
mov    %ebx,%eax
cltd
idiv   %r14d
mov    %eax,%ebx
mov    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @getint()
store i32 %4, i32* %2
%5 = call i32 (...) @getint()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = call i32 @putint(i32 %12)
%14 = call i32 @putchar(i32 10)
br label %15
15: ; preds = %9, %0
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = sub nsw i32 %20, %21
%23 = call i32 @putint(i32 %22)
%24 = call i32 @putchar(i32 10)
br label %25
25: ; preds = %19, %15
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %35
29: ; preds = %25
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = mul nsw i32 %30, %31
%33 = call i32 @putint(i32 %32)
%34 = call i32 @putchar(i32 10)
br label %35
35: ; preds = %29, %25
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = icmp ne i32 %36, %37
br i1 %38, label %39, label %45
39: ; preds = %35
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = sdiv i32 %40, %41
%43 = call i32 @putint(i32 %42)
%44 = call i32 @putchar(i32 10)
br label %45
45: ; preds = %39, %35
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getint()
%2 = tail call i32 (...) @getint()
%3 = icmp sgt i32 %1, %2
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = add nsw i32 %2, %1
%6 = tail call i32 @putint(i32 %5)
%7 = tail call i32 @putchar(i32 10)
br label %8
8: ; preds = %4, %0
%9 = icmp slt i32 %1, %2
br i1 %9, label %10, label %14
10: ; preds = %8
%11 = sub nsw i32 %1, %2
%12 = tail call i32 @putint(i32 %11)
%13 = tail call i32 @putchar(i32 10)
br label %14
14: ; preds = %10, %8
%15 = icmp eq i32 %1, %2
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = mul nsw i32 %1, %1
br label %20
18: ; preds = %14
%19 = sdiv i32 %1, %2
br label %20
20: ; preds = %16, %18
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
%22 = tail call i32 @putint(i32 %21)
%23 = tail call i32 @putchar(i32 10)
ret i32 0
}