#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*/ dec(int, int);
int get(int, int);
int /*<<< orphan*/ inc(int, int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int main() {
  char buf[10];
  int i, k;
  while (scanf("%s", buf) > 0) {
    scanf("%d %d", &i, &k);
    if (!strcmp(buf, "inc")) {
      inc(i, k);
    } else if (!strcmp(buf, "dec"))
      dec(i, k);
    else
      printf("%d\n", get(i, k));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
cmp    $0x0,%rax
jle    1216 <main+0xb6>
lea    0xe71(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0xe(%rbp),%rdi
lea    0xe5d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11ca <main+0x6a>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1080 <inc@plt>
jmp    1211 <main+0xb1>
lea    -0xe(%rbp),%rdi
lea    0xe38(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11f3 <main+0x93>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <dec@plt>
jmp    120c <main+0xac>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <get@plt>
mov    %eax,%esi
lea    0xe0a(%rip),%rdi
call   1040 <printf@plt>
jmp    1211 <main+0xb1>
jmp    116f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xe9b(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
test   %rax,%rax
jle    1207 <main+0xb7>
lea    0xe82(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%r12
lea    0xe6e(%rip),%r13
lea    0xe(%rsp),%rbx
lea    0xe73(%rip),%rbp
jmp    11bf <main+0x6f>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
call   1070 <inc@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
test   %rax,%rax
jle    1207 <main+0xb7>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x636e69,0xe(%rsp)
je     11a0 <main+0x50>
cmpl   $0x636564,0xe(%rsp)
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
je     1200 <main+0xb0>
call   1050 <get@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
jmp    11ad <main+0x5d>
nopl   0x0(%rax)
call   1030 <dec@plt>
jmp    11ad <main+0x5d>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [4 x i8] c"inc\00"
@.str.3 = [4 x i8] c"dec\00"
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %32, %0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %33
9: ; preds = %5
%10 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %9
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @inc(i32 %15, i32 %16)
br label %32
18: ; preds = %9
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = call i32 @dec(i32 %23, i32 %24)
br label %31
26: ; preds = %18
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = call i32 @get(i32 %27, i32 %28)
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %26, %22
br label %32
32: ; preds = %31, %14
br label %5
33: ; preds = %5
ret i32 0
}

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