#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int o, i, j, ans;
  scanf("%d", &o);
  scanf("%d", &i);
  scanf("%d", &j);
  if (o == 1) {
    ans = i + j;
  }
  if (o == 2) {
    ans = i - j;
  }
  if (o == 3) {
    ans = i * j;
  }
  if (o == 4) {
    ans = i / j;
  }
  if (o == 5) {
    ans = i % j;
  }
  printf("%d\n", ans);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1172 <main+0x52>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1185 <main+0x65>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1199 <main+0x79>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    11ad <main+0x8d>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x14(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    11c1 <main+0xa1>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%ecx
lea    (%rcx,%rax,1),%esi
mov    %eax,%edi
sub    %ecx,%edi
cmp    $0x2,%edx
cmovne %esi,%edi
mov    %ecx,%esi
imul   %eax,%esi
cmp    $0x3,%edx
cmovne %edi,%esi
cmp    $0x5,%edx
je     1188 <main+0x68>
cmp    $0x4,%edx
jne    118d <main+0x6d>
cltd
idiv   %ecx
mov    %eax,%esi
jmp    118d <main+0x6d>
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
store i32 %14, i32* %5
br label %15
15: ; preds = %11, %0
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = sub nsw i32 %19, %20
store i32 %21, i32* %5
br label %22
22: ; preds = %18, %15
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 3
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = mul nsw i32 %26, %27
store i32 %28, i32* %5
br label %29
29: ; preds = %25, %22
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 4
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = load i32, i32* %3
%34 = load i32, i32* %4
%35 = sdiv i32 %33, %34
store i32 %35, i32* %5
br label %36
36: ; preds = %32, %29
%37 = load i32, i32* %2
%38 = icmp eq i32 %37, 5
br i1 %38, label %39, label %43
39: ; preds = %36
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = srem i32 %40, %41
store i32 %42, i32* %5
br label %43
43: ; preds = %39, %36
%44 = load i32, i32* %5
%45 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
%15 = select i1 %11, i32 %14, i32 undef
%16 = icmp eq i32 %10, 2
%17 = sub nsw i32 %12, %13
%18 = select i1 %16, i32 %17, i32 %15
%19 = icmp eq i32 %10, 3
%20 = mul nsw i32 %13, %12
%21 = select i1 %19, i32 %20, i32 %18
switch i32 %10, label %26 [
i32 4, label %22
i32 5, label %24
]
22: ; preds = %0
%23 = sdiv i32 %12, %13
br label %26
24: ; preds = %0
%25 = srem i32 %12, %13
br label %26
26: ; preds = %0, %22, %24
%27 = phi i32 [ %25, %24 ], [ %23, %22 ], [ %21, %0 ]
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %27)
ret i32 0
}