#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*/ scanf(char *, int *, ...);
int main() {
  int t;
  int i;
  int a;
  int b;
  int n;
  int ans;
  scanf("%d", &t);
  for (i = 0; i < t; ++i) {
    scanf("%d%d%d", &a, &b, &n);
    if (1 == n) {
      ans = a;
    } else if (2 == n) {
      ans = b;
    } else {
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ad <main+0x9d>
lea    0xeb5(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1030 <scanf@plt>
mov    $0x1,%eax
cmp    -0x18(%rbp),%eax
jne    1177 <main+0x67>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    119a <main+0x8a>
mov    $0x2,%eax
cmp    -0x18(%rbp),%eax
jne    1190 <main+0x80>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1195 <main+0x85>
jmp    1195 <main+0x85>
jmp    119a <main+0x8a>
jmp    119f <main+0x8f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <main+0x28>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    116b <main+0x5b>
lea    0xec6(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <scanf@plt>
add    $0x1,%ebp
cmp    (%rsp),%ebp
jl     1150 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %0, %12
%13 = phi i32 [ %15, %12 ], [ 0, %0 ]
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%15 = add nuw nsw i32 %13, 1
%16 = load i32, i32* %1
%17 = icmp slt i32 %15, %16
br i1 %17, label %12, label %18
18: ; preds = %12, %0
ret i32 0
}