#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 jogar(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  int casos, i, vencedor;
  char escolhaDoJogador01[32], escolhaDoJogador02[32];
  scanf("%d\n", &casos);
  for (i = 1; i <= casos; i++) {
    scanf("%s %s\n", escolhaDoJogador01, escolhaDoJogador02);
    vencedor = jogar(escolhaDoJogador01, escolhaDoJogador02);
    if (vencedor == 0) {
      printf("Caso #%d: De novo!\n", i);
    } else if (vencedor == 1) {
      printf("Caso #%d: Bazinga!\n", i);
    } else {
      printf("Caso #%d: Raj trapaceou!\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ed <main+0xbd>
lea    -0x30(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <jogar@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    11a8 <main+0x78>
mov    -0xc(%rbp),%esi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xaa>
cmpl   $0x1,-0x10(%rbp)
jne    11c6 <main+0x96>
mov    -0xc(%rbp),%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11d5 <main+0xa5>
mov    -0xc(%rbp),%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xaa>
jmp    11df <main+0xaf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c1 <main+0x91>
mov    $0x1,%ebx
lea    0x30(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xeb1(%rip),%r13
lea    0xebe(%rip),%rbp
lea    0xe8f(%rip),%r14
nopl   0x0(%rax)
lea    0xe7d(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <jogar@plt>
cmp    $0x1,%eax
mov    %rbp,%rdi
cmove  %r13,%rdi
test   %eax,%eax
cmove  %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0xc(%rsp),%ebx
mov    %eax,%ebx
jl     1180 <main+0x50>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [20 x i8] c"Caso #%d: De novo!\0A\00"
@.str.3 = [20 x i8] c"Caso #%d: Bazinga!\0A\00"
@.str.4 = [26 x i8] c"Caso #%d: Raj trapaceou!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [32 x i8]
%6 = alloca [32 x i8]
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
br label %8
8: ; preds = %35, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %38
12: ; preds = %8
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %14)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%18 = call i32 @jogar(i8* %16, i8* %17)
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %12
%22 = load i32, i32* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %34
24: ; preds = %12
%25 = load i32, i32* %4
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %28)
br label %33
30: ; preds = %24
%31 = load i32, i32* %3
%32 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %30, %27
br label %34
34: ; preds = %33, %21
br label %35
35: ; preds = %34
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %8
38: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [20 x i8] c"Caso #%d: De novo!\0A\00"
@.str.3 = [20 x i8] c"Caso #%d: Bazinga!\0A\00"
@.str.4 = [26 x i8] c"Caso #%d: Raj trapaceou!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 1
br i1 %9, label %22, label %10
10: ; preds = %0, %10
%11 = phi i32 [ %19, %10 ], [ 1, %0 ]
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %6)
%13 = call i32 @jogar(i8* %5, i8* %6)
%14 = icmp eq i32 %13, 1
%15 = select i1 %14, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0)
%16 = icmp eq i32 %13, 0
%17 = select i1 %16, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %15
%18 = call i32 @printf(i8* %17, i32 %11)
%19 = add nuw nsw i32 %11, 1
%20 = load i32, i32* %1
%21 = icmp slt i32 %11, %20
br i1 %21, label %10, label %22
22: ; preds = %10, %0
ret i32 0
}