#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 EOF;
int /*<<< orphan*/ printf(char *, ...);
int rand();
int scanf(char *, int *);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main(void) {
  const char *handFaces[] = {"✊", "✌", "✋", "😠", "👑"};
  const int handValues[] = {0, 1, 2, 3, 6};
  int myHand, enemyHand, myValue, enemyValue, result, round = 1, win = 0,
                                                      lose = 0;
  srand((unsigned)time(NULL));
  printf("5番勝負\n\n");
  for (int round = 1; round <= 5; ++round) {
    printf("%d回目の手を選択 (現在%d勝%d敗)\n", round, win, lose);
    while (1) {
    RETAKE:
      printf("0:✊　　1:✌　　2:✋　　3:😠　　4:👑\n");
      printf(">>> ");
      int scanned = scanf("%d%*[^\n]", &myHand);
      if (scanned == EOF)
        return 1;
      if (scanned == 1 && myHand >= 0 && myHand <= 5)
        break;
    }
    enemyHand = rand() % 5;
    myValue = handValues[myHand];
    enemyValue = handValues[enemyHand];
    if (myHand > 2 || enemyHand > 2) {
      myValue /= 3;
      enemyValue /= 3;
    }
    result = (myValue - enemyValue + 3) % 3;
    printf("あなた: %s　　", handFaces[myHand]);
    printf("相手: %s　　", handFaces[enemyHand]);
    switch (result) {
    case 2:
      printf("結果: ✨\n\n");
      ++win;
      break;
    case 1:
      printf("結果: ☠\n\n");
      ++lose;
      break;
    default:
      printf("結果: ❓\n\n");
      printf("あいこです\n");
      goto RETAKE;
    }
  }
  printf("最終結果: %d勝%d敗\n", win, lose);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xe77(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe70(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe69(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe62(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe5c(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xf50(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xf4d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xf4b(%rip),%eax
mov    %eax,-0x40(%rbp)
movl   $0x1,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x74(%rbp)
cmpl   $0x5,-0x74(%rbp)
jg     13f4 <main+0x294>
mov    -0x74(%rbp),%esi
mov    -0x6c(%rbp),%edx
mov    -0x70(%rbp),%ecx
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1238 <main+0xd8>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
lea    -0x54(%rbp),%rsi
call   1070 <scanf@plt>
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    0x2d77(%rip),%rcx
cmp    (%rcx),%eax
jne    1285 <main+0x125>
movl   $0x1,-0x4(%rbp)
jmp    140f <main+0x2af>
cmpl   $0x1,-0x78(%rbp)
jne    12a8 <main+0x148>
cmpl   $0x0,-0x54(%rbp)
jl     12a8 <main+0x148>
cmpl   $0x5,-0x54(%rbp)
jg     12a8 <main+0x148>
jmp    12ad <main+0x14d>
jmp    1233 <main+0xd3>
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x58(%rbp)
movslq -0x54(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
mov    %eax,-0x5c(%rbp)
movslq -0x58(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x2,-0x54(%rbp)
jg     12e9 <main+0x189>
cmpl   $0x2,-0x58(%rbp)
jle    1305 <main+0x1a5>
mov    -0x5c(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x5c(%rbp)
mov    -0x60(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x60(%rbp),%ecx
sub    %ecx,%eax
add    $0x3,%eax
movslq %eax,%rcx
imul   $0x55555556,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdx
add    %ecx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,-0x64(%rbp)
movslq -0x54(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
lea    0xd51(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x7d(%rbp)
call   1030 <printf@plt>
mov    -0x7d(%rbp),%al
movslq -0x58(%rbp),%rcx
mov    -0x30(%rbp,%rcx,8),%rsi
lea    0xd48(%rip),%rdi
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
mov    %eax,-0x7c(%rbp)
sub    $0x1,%eax
je     13a4 <main+0x244>
jmp    1377 <main+0x217>
mov    -0x7c(%rbp),%eax
sub    $0x2,%eax
jne    13c0 <main+0x260>
jmp    1388 <main+0x228>
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    13e1 <main+0x281>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    13e1 <main+0x281>
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1238 <main+0xd8>
jmp    13e6 <main+0x286>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1212 <main+0xb2>
mov    -0x6c(%rbp),%esi
mov    -0x70(%rbp),%edx
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xe8b(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xe83(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xe7b(%rip),%rax
mov    %rax,0x30(%rsp)
lea    0xe73(%rip),%rax
mov    %rax,0x38(%rsp)
lea    0xf20(%rip),%rax
mov    %rax,0x40(%rsp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%esi
movb   $0x1,0xb(%rsp)
lea    0xe3c(%rip),%rdi
lea    0xeba(%rip),%rbx
lea    0xe5a(%rip),%rbp
lea    0xe58(%rip),%r14
lea    0x14(%rsp),%r15
mov    0x2df2(%rip),%r12
xor    %ecx,%ecx
xor    %edx,%edx
mov    %rsi,0x18(%rsp)
mov    %edx,0xc(%rsp)
mov    %ecx,0x10(%rsp)
xor    %eax,%eax
call   1040 <printf@plt>
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <scanf@plt>
cmp    (%r12),%eax
je     1392 <main+0x232>
cmp    $0x1,%eax
jne    1210 <main+0xb0>
mov    0x14(%rsp),%eax
test   %eax,%eax
js     1210 <main+0xb0>
cmp    $0x5,%eax
jg     1210 <main+0xb0>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
movslq 0x14(%rsp),%rax
lea    0xe98(%rip),%rdx
mov    (%rdx,%rax,4),%ecx
movslq %esi,%r13
mov    (%rdx,%r13,4),%edx
cmp    $0x2,%rax
jg     128d <main+0x12d>
cmp    $0x3,%esi
jl     12bb <main+0x15b>
movslq %ecx,%rcx
imul   $0x55555556,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rcx
add    %esi,%ecx
movslq %edx,%rdx
imul   $0x55555556,%rdx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rdx
add    %esi,%edx
sub    %edx,%ecx
add    $0x3,%ecx
movslq %ecx,%rbx
imul   $0x55555556,%rbx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%ebx
mov    0x20(%rsp,%rax,8),%rsi
lea    0xd63(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp,%r13,8),%rsi
lea    0xd64(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebx
je     1330 <main+0x1d0>
cmp    $0x2,%ebx
je     1350 <main+0x1f0>
lea    0xdd1(%rip),%rdi
call   1030 <puts@plt>
lea    0xdd2(%rip),%rdi
call   1030 <puts@plt>
lea    0xd6b(%rip),%rbx
jmp    1210 <main+0xb0>
lea    0xd93(%rip),%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%ecx
add    $0x1,%ecx
mov    0xc(%rsp),%edx
jmp    1367 <main+0x207>
nopl   0x0(%rax)
lea    0xd80(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%edx
add    $0x1,%edx
mov    0x10(%rsp),%ecx
lea    0xca3(%rip),%rdi
lea    0xd21(%rip),%rbx
mov    0x18(%rsp),%rax
cmp    $0x5,%eax
lea    0x1(%rax),%eax
setb   0xb(%rsp)
mov    %eax,%esi
cmp    $0x6,%eax
jne    11fa <main+0x9a>
jmp    13a6 <main+0x246>
mov    $0x1,%ebx
testb  $0x1,0xb(%rsp)
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%edx
jne    13ba <main+0x25a>
lea    0xcc3(%rip),%rdi
xor    %ebx,%ebx
mov    %edx,%esi
mov    %ecx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\E2\9C\8A\00"
@.str.1 = [4 x i8] c"\E2\9C\8C\00"
@.str.2 = [4 x i8] c"\E2\9C\8B\00"
@.str.3 = [5 x i8] c"\F0\9F\98\A0\00"
@.str.4 = [5 x i8] c"\F0\9F\91\91\00"
@__const.main.handValues = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 6]
@.str.5 = [13 x i8] c"5\E7\95\AA\E5\8B\9D\E8\B2\A0\0A\0A\00"
@.str.6 = [44 x i8] c"%d\E5\9B\9E\E7\9B\AE\E3\81\AE\E6\89\8B\E3\82\92\E9\81\B8\E6\8A\9E (\E7\8F\BE\E5\9C\A8%d\E5\8B\9D%d\E6\95\97)\0A\00"
@.str.7 = [53 x i8] c"0:\E2\9C\8A\E3\80\80\E3\80\801:\E2\9C\8C\E3\80\80\E3\80\802:\E2\9C\8B\E3\80\80\E3\80\803:\F0\9F\98\A0\E3\80\80\E3\80\804:\F0\9F\91\91\0A\00"
@.str.8 = [5 x i8] c">>> \00"
@.str.9 = [9 x i8] c"%d%*[^\0A]\00"
@EOF = global i32 0
@.str.10 = [20 x i8] c"\E3\81\82\E3\81\AA\E3\81\9F: %s\E3\80\80\E3\80\80\00"
@.str.11 = [17 x i8] c"\E7\9B\B8\E6\89\8B: %s\E3\80\80\E3\80\80\00"
@.str.12 = [14 x i8] c"\E7\B5\90\E6\9E\9C: \E2\9C\A8\0A\0A\00"
@.str.13 = [14 x i8] c"\E7\B5\90\E6\9E\9C: \E2\98\A0\0A\0A\00"
@.str.14 = [14 x i8] c"\E7\B5\90\E6\9E\9C: \E2\9D\93\0A\0A\00"
@.str.15 = [17 x i8] c"\E3\81\82\E3\81\84\E3\81\93\E3\81\A7\E3\81\99\0A\00"
@.str.16 = [26 x i8] c"\E6\9C\80\E7\B5\82\E7\B5\90\E6\9E\9C: %d\E5\8B\9D%d\E6\95\97\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca [5 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
%14 = bitcast [5 x i8*]* %2 to i8*
%15 = bitcast i8* %14 to [5 x i8*]*
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %15, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds [5 x i8*], [5 x i8*]* %15, i32 0, i32 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %15, i32 0, i32 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds [5 x i8*], [5 x i8*]* %15, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8** %19
%20 = getelementptr inbounds [5 x i8*], [5 x i8*]* %15, i32 0, i32 4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8** %20
%21 = bitcast [5 x i32]* %3 to i8*
store i32 1, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%22 = call i64 @time(i32* null)
%23 = trunc i64 %22 to i32
%24 = call i32 @srand(i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %12
br label %26
26: ; preds = %104, %0
%27 = load i32, i32* %12
%28 = icmp sle i32 %27, 5
br i1 %28, label %29, label %107
29: ; preds = %26
%30 = load i32, i32* %12
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
br label %34
34: ; preds = %29, %53
br label %35
35: ; preds = %100, %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32* %4)
store i32 %38, i32* %13
%39 = load i32, i32* %13
%40 = load i32, i32* @EOF
%41 = icmp eq i32 %39, %40
br i1 %41, label %42, label %43
42: ; preds = %35
store i32 1, i32* %1
br label %111
43: ; preds = %35
%44 = load i32, i32* %13
%45 = icmp eq i32 %44, 1
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = load i32, i32* %4
%48 = icmp sge i32 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %46
%50 = load i32, i32* %4
%51 = icmp sle i32 %50, 5
br i1 %51, label %52, label %53
52: ; preds = %49
br label %54
53: ; preds = %49, %46, %43
br label %34
54: ; preds = %52
%55 = call i32 (...) @rand()
%56 = srem i32 %55, 5
store i32 %56, i32* %5
%57 = load i32, i32* %4
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %58
%60 = load i32, i32* %59
store i32 %60, i32* %6
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %62
%64 = load i32, i32* %63
store i32 %64, i32* %7
%65 = load i32, i32* %4
%66 = icmp sgt i32 %65, 2
br i1 %66, label %70, label %67
67: ; preds = %54
%68 = load i32, i32* %5
%69 = icmp sgt i32 %68, 2
br i1 %69, label %70, label %75
70: ; preds = %67, %54
%71 = load i32, i32* %6
%72 = sdiv i32 %71, 3
store i32 %72, i32* %6
%73 = load i32, i32* %7
%74 = sdiv i32 %73, 3
store i32 %74, i32* %7
br label %75
75: ; preds = %70, %67
%76 = load i32, i32* %6
%77 = load i32, i32* %7
%78 = sub nsw i32 %76, %77
%79 = add nsw i32 %78, 3
%80 = srem i32 %79, 3
store i32 %80, i32* %8
%81 = load i32, i32* %4
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %82
%84 = load i8*, i8** %83
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i8* %84)
%86 = load i32, i32* %5
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %87
%89 = load i8*, i8** %88
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i8* %89)
%91 = load i32, i32* %8
switch i32 %91, label %100 [
i32 2, label %92
i32 1, label %96
]
92: ; preds = %75
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%94 = load i32, i32* %10
%95 = add nsw i32 %94, 1
store i32 %95, i32* %10
br label %103
96: ; preds = %75
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
%98 = load i32, i32* %11
%99 = add nsw i32 %98, 1
store i32 %99, i32* %11
br label %103
100: ; preds = %75
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
br label %35
103: ; preds = %96, %92
br label %104
104: ; preds = %103
%105 = load i32, i32* %12
%106 = add nsw i32 %105, 1
store i32 %106, i32* %12
br label %26
107: ; preds = %26
%108 = load i32, i32* %10
%109 = load i32, i32* %11
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %108, i32 %109)
store i32 0, i32* %1
br label %111
111: ; preds = %107, %42
%112 = load i32, i32* %1
ret i32 %112
}

LLVM IR (-O2):
@.str = [4 x i8] c"\E2\9C\8A\00"
@.str.1 = [4 x i8] c"\E2\9C\8C\00"
@.str.2 = [4 x i8] c"\E2\9C\8B\00"
@.str.3 = [5 x i8] c"\F0\9F\98\A0\00"
@.str.4 = [5 x i8] c"\F0\9F\91\91\00"
@__const.main.handValues = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 6]
@.str.6 = [44 x i8] c"%d\E5\9B\9E\E7\9B\AE\E3\81\AE\E6\89\8B\E3\82\92\E9\81\B8\E6\8A\9E (\E7\8F\BE\E5\9C\A8%d\E5\8B\9D%d\E6\95\97)\0A\00"
@.str.8 = [5 x i8] c">>> \00"
@.str.9 = [9 x i8] c"%d%*[^\0A]\00"
@EOF = global i32 0
@.str.10 = [20 x i8] c"\E3\81\82\E3\81\AA\E3\81\9F: %s\E3\80\80\E3\80\80\00"
@.str.11 = [17 x i8] c"\E7\9B\B8\E6\89\8B: %s\E3\80\80\E3\80\80\00"
@.str.16 = [26 x i8] c"\E6\9C\80\E7\B5\82\E7\B5\90\E6\9E\9C: %d\E5\8B\9D%d\E6\95\97\0A\00"
@str = [12 x i8] c"5\E7\95\AA\E5\8B\9D\E8\B2\A0\0A\00"
@str.17 = [52 x i8] c"0:\E2\9C\8A\E3\80\80\E3\80\801:\E2\9C\8C\E3\80\80\E3\80\802:\E2\9C\8B\E3\80\80\E3\80\803:\F0\9F\98\A0\E3\80\80\E3\80\804:\F0\9F\91\91\00"
@str.18 = [13 x i8] c"\E7\B5\90\E6\9E\9C: \E2\98\A0\0A\00"
@str.19 = [13 x i8] c"\E7\B5\90\E6\9E\9C: \E2\9C\A8\0A\00"
@str.20 = [13 x i8] c"\E7\B5\90\E6\9E\9C: \E2\9D\93\0A\00"
@str.21 = [16 x i8] c"\E3\81\82\E3\81\84\E3\81\93\E3\81\A7\E3\81\99\00"
define i32 @main() {
%1 = alloca [5 x i8*]
%2 = alloca i32
%3 = bitcast [5 x i8*]* %1 to i8*
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = bitcast i32* %2 to i8*
%10 = tail call i64 @time(i32* null)
%11 = trunc i64 %10 to i32
%12 = tail call i32 @srand(i32 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %0, %83
%15 = phi i1 [ true, %0 ], [ %87, %83 ]
%16 = phi i32 [ 1, %0 ], [ %86, %83 ]
%17 = phi i32 [ 0, %0 ], [ %85, %83 ]
%18 = phi i32 [ 0, %0 ], [ %84, %83 ]
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), i32 %16, i32 %18, i32 %17)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.17, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32* %2)
%23 = load i32, i32* @EOF
%24 = icmp eq i32 %22, %23
br i1 %24, label %89, label %31
25: ; preds = %31
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.17, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32* %2)
%29 = load i32, i32* @EOF
%30 = icmp eq i32 %28, %29
br i1 %30, label %89, label %81
31: ; preds = %14, %81
%32 = phi i32 [ %82, %81 ], [ %22, %14 ]
%33 = icmp eq i32 %32, 1
%34 = load i32, i32* %2
%35 = icmp sgt i32 %34, -1
%36 = select i1 %33, i1 %35, i1 false
%37 = icmp slt i32 %34, 6
%38 = select i1 %36, i1 %37, i1 false
br i1 %38, label %39, label %25
39: ; preds = %31
%40 = call i32 (...) @rand()
%41 = srem i32 %40, 5
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [5 x i32], [5 x i32]* @__const.main.handValues, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = sext i32 %41 to i64
%47 = getelementptr inbounds [5 x i32], [5 x i32]* @__const.main.handValues, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = icmp sgt i32 %42, 2
%50 = icmp sgt i32 %41, 2
%51 = select i1 %49, i1 true, i1 %50
br i1 %51, label %52, label %55
52: ; preds = %39
%53 = sdiv i32 %45, 3
%54 = sdiv i32 %48, 3
br label %55
55: ; preds = %39, %52
%56 = phi i32 [ %54, %52 ], [ %48, %39 ]
%57 = phi i32 [ %53, %52 ], [ %45, %39 ]
%58 = sub i32 3, %56
%59 = add i32 %58, %57
%60 = srem i32 %59, 3
%61 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 %43
%62 = load i8*, i8** %61
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i8* %62)
%64 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 %46
%65 = load i8*, i8** %64
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i8* %65)
switch i32 %60, label %73 [
i32 2, label %67
i32 1, label %70
]
67: ; preds = %55
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.19, i64 0, i64 0))
%69 = add nsw i32 %18, 1
br label %83
70: ; preds = %55
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.18, i64 0, i64 0))
%72 = add nsw i32 %17, 1
br label %83
73: ; preds = %55
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.20, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.21, i64 0, i64 0))
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.17, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%78 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32* %2)
%79 = load i32, i32* @EOF
%80 = icmp eq i32 %78, %79
br i1 %80, label %89, label %81
81: ; preds = %73, %25
%82 = phi i32 [ %78, %73 ], [ %28, %25 ]
br label %31
83: ; preds = %67, %70
%84 = phi i32 [ %18, %70 ], [ %69, %67 ]
%85 = phi i32 [ %72, %70 ], [ %17, %67 ]
%86 = add nuw nsw i32 %16, 1
%87 = icmp ult i32 %16, 5
%88 = icmp eq i32 %86, 6
br i1 %88, label %90, label %14
89: ; preds = %14, %25, %73
br i1 %15, label %94, label %90
90: ; preds = %83, %89
%91 = phi i32 [ %18, %89 ], [ %84, %83 ]
%92 = phi i32 [ %17, %89 ], [ %85, %83 ]
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %91, i32 %92)
br label %94
94: ; preds = %89, %90
%95 = phi i32 [ 0, %90 ], [ 1, %89 ]
ret i32 %95
}