#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*/ amd64_option();
int /*<<< orphan*/ change_timing(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ cprint(int, int, char *);
int get_key();
int getval(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ popclear();
void get_option_1() {
  int rp = 0, rcd = 0, ras = 0, sflag = 0;
  while (!sflag) {
    switch (get_key()) {
    case 2:
      popclear();
      cprint(8 + 3, 11 + 8, "tRCD: ");
      rcd = getval(8 + 3, 11 + 15, 0);
      popclear();
      cprint(8 + 3, 11 + 8, "tRP: ");
      rp = getval(8 + 3, 11 + 15, 0);
      popclear();
      cprint(8 + 3, 11 + 8, "tRAS: ");
      ras = getval(8 + 3, 11 + 15, 0);
      popclear();
      change_timing(0, rcd, rp, ras);
      break;
    case 3:
      popclear();
      cprint(8 + 3, 11 + 8, "tRCD: ");
      rcd = getval(8 + 3, 11 + 15, 0);
      change_timing(0, rcd, 0, 0);
      break;
    case 4:
      popclear();
      cprint(8 + 3, 11 + 8, "tRP: ");
      rp = getval(8 + 3, 11 + 15, 0);
      change_timing(0, 0, rp, 0);
      break;
    case 5:
      popclear();
      cprint(8 + 3, 11 + 8, "tRAS: ");
      ras = getval(8 + 3, 11 + 15, 0);
      change_timing(0, 0, 0, ras);
      break;
    case 6:
      popclear();
      amd64_option();
      sflag++;
      popclear();
      break;
    case 7:
      break;
    case 11:
    case 57:
      sflag++;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<get_option_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    119a <get_option_1+0x3a>
jmp    1378 <get_option_1+0x218>
xor    %eax,%eax
call   1060 <get_key@plt>
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x37,%eax
ja     1373 <get_option_1+0x213>
mov    -0x18(%rbp),%rax
lea    0xe42(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xf01(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xed7(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xeac(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popclear@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
call   1080 <change_timing@plt>
jmp    1373 <get_option_1+0x213>
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xe52(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%edx
call   1080 <change_timing@plt>
jmp    1373 <get_option_1+0x213>
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xe15(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
call   1080 <change_timing@plt>
jmp    1373 <get_option_1+0x213>
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
lea    0xdd7(%rip),%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1080 <change_timing@plt>
jmp    1373 <get_option_1+0x213>
mov    $0x0,%al
call   1050 <popclear@plt>
mov    $0x0,%al
call   1070 <amd64_option@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <popclear@plt>
jmp    1373 <get_option_1+0x213>
jmp    1373 <get_option_1+0x213>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1184 <get_option_1+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_option_1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe8e(%rip),%r13
lea    0xf67(%rip),%r15
lea    0xf67(%rip),%r12
lea    0xf66(%rip),%r14
jmp    11c0 <get_option_1+0x60>
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r15,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
xor    %edi,%edi
mov    %eax,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1080 <change_timing@plt>
xor    %eax,%eax
call   1060 <get_key@plt>
add    $0xfffffffe,%eax
cmp    $0x37,%eax
ja     11c0 <get_option_1+0x60>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r15,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,0x4(%rsp)
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r12,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r14,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popclear@plt>
xor    %edi,%edi
mov    0x4(%rsp),%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1080 <change_timing@plt>
jmp    11c0 <get_option_1+0x60>
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r12,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
jmp    11b9 <get_option_1+0x59>
xor    %eax,%eax
call   1050 <popclear@plt>
mov    $0xb,%edi
mov    $0x13,%esi
mov    %r14,%rdx
call   1040 <cprint@plt>
mov    $0xb,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1030 <getval@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %eax,%ecx
call   1080 <change_timing@plt>
jmp    11c0 <get_option_1+0x60>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1050 <popclear@plt>
xor    %eax,%eax
call   1070 <amd64_option@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <popclear@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"tRCD: \00"
@.str.1 = [6 x i8] c"tRP: \00"
@.str.2 = [7 x i8] c"tRAS: \00"
define void @get_option_1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %54, %0
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %55
9: ; preds = %5
%10 = call i32 (...) @get_key()
switch i32 %10, label %54 [
i32 2, label %11
i32 3, label %26
i32 4, label %32
i32 5, label %38
i32 6, label %44
i32 7, label %50
i32 11, label %51
i32 57, label %51
]
11: ; preds = %9
%12 = call i32 (...) @popclear()
%13 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %14, i32* %2
%15 = call i32 (...) @popclear()
%16 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %17, i32* %1
%18 = call i32 (...) @popclear()
%19 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %20, i32* %3
%21 = call i32 (...) @popclear()
%22 = load i32, i32* %2
%23 = load i32, i32* %1
%24 = load i32, i32* %3
%25 = call i32 @change_timing(i32 0, i32 %22, i32 %23, i32 %24)
br label %54
26: ; preds = %9
%27 = call i32 (...) @popclear()
%28 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%29 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %29, i32* %2
%30 = load i32, i32* %2
%31 = call i32 @change_timing(i32 0, i32 %30, i32 0, i32 0)
br label %54
32: ; preds = %9
%33 = call i32 (...) @popclear()
%34 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %35, i32* %1
%36 = load i32, i32* %1
%37 = call i32 @change_timing(i32 0, i32 0, i32 %36, i32 0)
br label %54
38: ; preds = %9
%39 = call i32 (...) @popclear()
%40 = call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%41 = call i32 @getval(i32 11, i32 26, i32 0)
store i32 %41, i32* %3
%42 = load i32, i32* %3
%43 = call i32 @change_timing(i32 0, i32 0, i32 0, i32 %42)
br label %54
44: ; preds = %9
%45 = call i32 (...) @popclear()
%46 = call i32 (...) @amd64_option()
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
%49 = call i32 (...) @popclear()
br label %54
50: ; preds = %9
br label %54
51: ; preds = %9, %9
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %54
54: ; preds = %9, %51, %50, %44, %38, %32, %26, %11
br label %5
55: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"tRCD: \00"
@.str.1 = [6 x i8] c"tRP: \00"
@.str.2 = [7 x i8] c"tRAS: \00"
define void @get_option_1() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 (...) @get_key()
switch i32 %2, label %3 [
i32 2, label %4
i32 3, label %16
i32 4, label %21
i32 5, label %26
i32 6, label %31
i32 57, label %35
i32 11, label %35
]
3: ; preds = %1, %26, %21, %16, %4
br label %1
4: ; preds = %1
%5 = tail call i32 (...) @popclear()
%6 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @getval(i32 11, i32 26, i32 0)
%8 = tail call i32 (...) @popclear()
%9 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @getval(i32 11, i32 26, i32 0)
%11 = tail call i32 (...) @popclear()
%12 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @getval(i32 11, i32 26, i32 0)
%14 = tail call i32 (...) @popclear()
%15 = tail call i32 @change_timing(i32 0, i32 %7, i32 %10, i32 %13)
br label %3
16: ; preds = %1
%17 = tail call i32 (...) @popclear()
%18 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @getval(i32 11, i32 26, i32 0)
%20 = tail call i32 @change_timing(i32 0, i32 %19, i32 0, i32 0)
br label %3
21: ; preds = %1
%22 = tail call i32 (...) @popclear()
%23 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%24 = tail call i32 @getval(i32 11, i32 26, i32 0)
%25 = tail call i32 @change_timing(i32 0, i32 0, i32 %24, i32 0)
br label %3
26: ; preds = %1
%27 = tail call i32 (...) @popclear()
%28 = tail call i32 @cprint(i32 11, i32 19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%29 = tail call i32 @getval(i32 11, i32 26, i32 0)
%30 = tail call i32 @change_timing(i32 0, i32 0, i32 0, i32 %29)
br label %3
31: ; preds = %1
%32 = tail call i32 (...) @popclear()
%33 = tail call i32 (...) @amd64_option()
%34 = tail call i32 (...) @popclear()
br label %35
35: ; preds = %1, %1, %31
ret void
}