#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 */
struct timeval {
  int tv_usec;
  int tv_sec;
};
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ getint(int *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ shiftarray(int *);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ treasure(int *, int *, int *, int *, int *, int *, int *,
                            int *, int *, int *, int *, int *, int, int, int);
void hebrac(int *hpmax, int *hpnow, int *aces, int *inv, int *slave,
            int *future, int *map, int *loot, int *vision, int *end, int *pos,
            int *antimag, int rec, int stat, int combat) {
  struct timespec a;
  a.tv_sec = 0;
  a.tv_nsec = 1000;
  nanosleep(&a, NULL);
  struct timeval t1;
  gettimeofday(&t1, NULL);
  srand(t1.tv_usec * t1.tv_sec);
  int r, i = 0;
  do {
    printf("Hebrac itself is in front of you!\n'Do you want to play? It's a "
           "coin flip: you can get some nice treasure or you can get "
           "hurt...'\n[0]: Don't play\n[1]: Heads\n[2]: Tails\n");
    getint(&r);
    if ((r != 0) && (r != 1) && (r != 2)) {
      if (i == 0) {
        printf("'I don't have all the day...'\n");
        i = 1;
      } else if (i > 0) {
        printf("'Don't be rude the next time!'\nHebrac disappears!\n");
        *(loot + *pos) = -1;
        *(vision + *pos) = 2;
        return;
      }
    }
  } while ((r != 0) && (r != 1) && (r != 2));
  printf("'As you wish...'\n");
  if (r == 0) {
    printf("Hebrac disappears!\n");
    *(loot + *pos) = -1;
    *(vision + *pos) = 2;
    return;
  }
  i = rand() % 2;
  if (*future >= 0) {
    printf("Do you think that your divination skills can surpass my power?\n");
    shiftarray(future);
  }
  if (i == 0) {
    if (r == 1) {
      printf("Tails! You lose 5 HP!\nHebrac disappears!\n");
    } else {
      printf("Heads! You lose 5 HP!\nHebrac disappears!\n");
    }
    *(loot + *pos) = -1;
    *(vision + *pos) = 2;
    *hpnow = *hpnow - 5;
    return;
  } else {
    if (r == 1) {
      printf("Heads! You can take the treasure!\nHebrac disappears!\n");
    } else {
      printf("Tails! You can take the treasure!\nHebrac disappears!\n");
    }
    treasure(hpmax, hpnow, aces, inv, slave, future, map, loot, vision, end,
             pos, antimag, rec, stat, combat);
  }
}


x86 assembly (clang, -O0):
<hebrac>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movl   $0x3e8,-0x68(%rbp)
lea    -0x68(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <nanosleep@plt>
lea    -0x70(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
mov    -0x70(%rbp),%edi
imul   -0x6c(%rbp),%edi
call   1080 <srand@plt>
movl   $0x0,-0x78(%rbp)
lea    0xdf0(%rip),%rdi
call   1040 <printf@plt>
lea    -0x74(%rbp),%rdi
call   1070 <getint@plt>
cmpl   $0x0,-0x74(%rbp)
je     12a7 <hebrac+0x127>
cmpl   $0x1,-0x74(%rbp)
je     12a7 <hebrac+0x127>
cmpl   $0x2,-0x74(%rbp)
je     12a7 <hebrac+0x127>
cmpl   $0x0,-0x78(%rbp)
jne    125e <hebrac+0xde>
lea    0xe5b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x78(%rbp)
jmp    12a2 <hebrac+0x122>
cmpl   $0x0,-0x78(%rbp)
jle    129d <hebrac+0x11d>
lea    0xe58(%rip),%rdi
call   1040 <printf@plt>
mov    0x18(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0x2,(%rax,%rcx,4)
jmp    146d <hebrac+0x2ed>
jmp    12a2 <hebrac+0x122>
jmp    12a7 <hebrac+0x127>
jmp    12ac <hebrac+0x12c>
xor    %eax,%eax
cmpl   $0x0,-0x74(%rbp)
mov    %al,-0x79(%rbp)
je     12d4 <hebrac+0x154>
xor    %eax,%eax
cmpl   $0x1,-0x74(%rbp)
mov    %al,-0x79(%rbp)
je     12d4 <hebrac+0x154>
cmpl   $0x2,-0x74(%rbp)
setne  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    1209 <hebrac+0x89>
lea    0xe14(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x74(%rbp)
jne    132a <hebrac+0x1aa>
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
mov    0x18(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0x2,(%rax,%rcx,4)
jmp    146d <hebrac+0x2ed>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x78(%rbp)
mov    -0x58(%rbp),%rax
cmpl   $0x0,(%rax)
jl     135e <hebrac+0x1de>
lea    0xdbc(%rip),%rdi
call   1040 <printf@plt>
mov    -0x58(%rbp),%rdi
call   1090 <shiftarray@plt>
cmpl   $0x0,-0x78(%rbp)
jne    13c7 <hebrac+0x247>
cmpl   $0x1,-0x74(%rbp)
jne    1383 <hebrac+0x203>
lea    0xdd3(%rip),%rdi
call   1040 <printf@plt>
jmp    138f <hebrac+0x20f>
lea    0xdec(%rip),%rdi
call   1040 <printf@plt>
mov    0x18(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
mov    0x30(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
sub    $0x5,%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
jmp    146d <hebrac+0x2ed>
cmpl   $0x1,-0x74(%rbp)
jne    13e2 <hebrac+0x262>
lea    0xdc8(%rip),%rdi
call   1040 <printf@plt>
jmp    13ee <hebrac+0x26e>
lea    0xded(%rip),%rdi
call   1040 <printf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    0x18(%rbp),%r13
mov    0x20(%rbp),%r12
mov    0x28(%rbp),%r15
mov    0x30(%rbp),%r14
mov    0x38(%rbp),%rbx
mov    0x40(%rbp),%r11d
mov    0x48(%rbp),%r10d
mov    0x50(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x80(%rbp),%eax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11d,0x30(%rsp)
mov    %r10d,0x38(%rsp)
mov    %eax,0x40(%rsp)
call   1030 <treasure@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<hebrac>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%rbx
mov    %r8,0x10(%rsp)
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%r14
mov    %rdi,%rbp
mov    0x70(%rsp),%r15
movq   $0x0,0x20(%rsp)
movl   $0x3e8,0x18(%rsp)
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <nanosleep@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    0xc(%rsp),%edi
imul   0x8(%rsp),%edi
call   1080 <srand@plt>
lea    0xe1b(%rip),%rdi
call   1040 <puts@plt>
lea    0x4(%rsp),%rdi
call   1070 <getint@plt>
cmpl   $0x3,0x4(%rsp)
jb     1237 <hebrac+0xb7>
lea    0xfe3(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x2,0x4(%rsp)
jbe    1237 <hebrac+0xb7>
lea    0xdeb(%rip),%rdi
call   1040 <puts@plt>
lea    0x4(%rsp),%rdi
call   1070 <getint@plt>
cmpl   $0x2,0x4(%rsp)
jbe    1237 <hebrac+0xb7>
lea    0xf81(%rip),%rdi
jmp    12c7 <hebrac+0x147>
lea    0xe69(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
je     12c0 <hebrac+0x140>
xor    %eax,%eax
call   10a0 <rand@plt>
mov    %eax,%r15d
cmpl   $0x0,(%rbx)
js     126d <hebrac+0xed>
lea    0xf14(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1090 <shiftarray@plt>
mov    0x4(%rsp),%eax
test   $0x1,%r15b
jne    12f0 <hebrac+0x170>
cmp    $0x1,%eax
lea    0xeca(%rip),%rax
lea    0xe9a(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    0x80(%rsp),%rdx
movslq (%rdx),%rax
mov    0x68(%rsp),%rcx
movl   $0xffffffff,(%rcx,%rax,4)
movslq (%rdx),%rax
mov    0x70(%rsp),%rcx
movl   $0x2,(%rcx,%rax,4)
addl   $0xfffffffb,(%r14)
jmp    136f <hebrac+0x1ef>
lea    0xe71(%rip),%rdi
call   1040 <puts@plt>
mov    0x80(%rsp),%rdx
movslq (%rdx),%rax
mov    0x68(%rsp),%rcx
movl   $0xffffffff,(%rcx,%rax,4)
movslq (%rdx),%rax
movl   $0x2,(%r15,%rax,4)
jmp    136f <hebrac+0x1ef>
mov    0xa0(%rsp),%r15d
cmp    $0x1,%eax
lea    0xdeb(%rip),%rax
lea    0xdaf(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
sub    $0x8,%rsp
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    0x18(%rsp),%r8
mov    %rbx,%r9
push   %r15
mov    0xa8(%rsp),%eax
push   %rax
mov    0xa8(%rsp),%eax
push   %rax
push   0xa8(%rsp)
push   0xa8(%rsp)
push   0xa8(%rsp)
push   0xa8(%rsp)
push   0xa8(%rsp)
push   0xa8(%rsp)
call   1030 <treasure@plt>
add    $0x50,%rsp
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
%struct.timeval = type { i32, i32 }
@.str = [168 x i8] c"Hebrac itself is in front of you!\0A'Do you want to play? It's a coin flip: you can get some nice treasure or you can get hurt...'\0A[0]: Don't play\0A[1]: Heads\0A[2]: Tails\0A\00"
@.str.1 = [31 x i8] c"'I don't have all the day...'\0A\00"
@.str.2 = [51 x i8] c"'Don't be rude the next time!'\0AHebrac disappears!\0A\00"
@.str.3 = [18 x i8] c"'As you wish...'\0A\00"
@.str.4 = [20 x i8] c"Hebrac disappears!\0A\00"
@.str.5 = [64 x i8] c"Do you think that your divination skills can surpass my power?\0A\00"
@.str.6 = [42 x i8] c"Tails! You lose 5 HP!\0AHebrac disappears!\0A\00"
@.str.7 = [42 x i8] c"Heads! You lose 5 HP!\0AHebrac disappears!\0A\00"
@.str.8 = [54 x i8] c"Heads! You can take the treasure!\0AHebrac disappears!\0A\00"
@.str.9 = [54 x i8] c"Tails! You can take the treasure!\0AHebrac disappears!\0A\00"
define void @hebrac(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32 %12, i32 %13, i32 %14) {
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca i32*
%24 = alloca i32*
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i32*
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca %struct.timespec
%32 = alloca %struct.timeval
%33 = alloca i32
%34 = alloca i32
store i32* %0, i32** %16
store i32* %1, i32** %17
store i32* %2, i32** %18
store i32* %3, i32** %19
store i32* %4, i32** %20
store i32* %5, i32** %21
store i32* %6, i32** %22
store i32* %7, i32** %23
store i32* %8, i32** %24
store i32* %9, i32** %25
store i32* %10, i32** %26
store i32* %11, i32** %27
store i32 %12, i32* %28
store i32 %13, i32* %29
store i32 %14, i32* %30
%35 = getelementptr inbounds %struct.timespec, %struct.timespec* %31, i32 0, i32 1
store i64 0, i64* %35
%36 = getelementptr inbounds %struct.timespec, %struct.timespec* %31, i32 0, i32 0
store i32 1000, i32* %36
%37 = call i32 @nanosleep(%struct.timespec* %31, i32* null)
%38 = call i32 @gettimeofday(%struct.timeval* %32, i32* null)
%39 = getelementptr inbounds %struct.timeval, %struct.timeval* %32, i32 0, i32 0
%40 = load i32, i32* %39
%41 = getelementptr inbounds %struct.timeval, %struct.timeval* %32, i32 0, i32 1
%42 = load i32, i32* %41
%43 = mul nsw i32 %40, %42
%44 = call i32 @srand(i32 %43)
store i32 0, i32* %34
br label %45
45: ; preds = %88, %15
%46 = call i32 @printf(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0))
%47 = call i32 @getint(i32* %33)
%48 = load i32, i32* %33
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %78
50: ; preds = %45
%51 = load i32, i32* %33
%52 = icmp ne i32 %51, 1
br i1 %52, label %53, label %78
53: ; preds = %50
%54 = load i32, i32* %33
%55 = icmp ne i32 %54, 2
br i1 %55, label %56, label %78
56: ; preds = %53
%57 = load i32, i32* %34
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %34
br label %77
61: ; preds = %56
%62 = load i32, i32* %34
%63 = icmp sgt i32 %62, 0
br i1 %63, label %64, label %76
64: ; preds = %61
%65 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%66 = load i32*, i32** %23
%67 = load i32*, i32** %26
%68 = load i32, i32* %67
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i32, i32* %66, i64 %69
store i32 -1, i32* %70
%71 = load i32*, i32** %24
%72 = load i32*, i32** %26
%73 = load i32, i32* %72
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %71, i64 %74
store i32 2, i32* %75
br label %165
76: ; preds = %61
br label %77
77: ; preds = %76, %59
br label %78
78: ; preds = %77, %53, %50, %45
br label %79
79: ; preds = %78
%80 = load i32, i32* %33
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %79
%83 = load i32, i32* %33
%84 = icmp ne i32 %83, 1
br i1 %84, label %85, label %88
85: ; preds = %82
%86 = load i32, i32* %33
%87 = icmp ne i32 %86, 2
br label %88
88: ; preds = %85, %82, %79
%89 = phi i1 [ false, %82 ], [ false, %79 ], [ %87, %85 ]
br i1 %89, label %45, label %90
90: ; preds = %88
%91 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%92 = load i32, i32* %33
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %106
94: ; preds = %90
%95 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%96 = load i32*, i32** %23
%97 = load i32*, i32** %26
%98 = load i32, i32* %97
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %96, i64 %99
store i32 -1, i32* %100
%101 = load i32*, i32** %24
%102 = load i32*, i32** %26
%103 = load i32, i32* %102
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %101, i64 %104
store i32 2, i32* %105
br label %165
106: ; preds = %90
%107 = call i32 (...) @rand()
%108 = srem i32 %107, 2
store i32 %108, i32* %34
%109 = load i32*, i32** %21
%110 = load i32, i32* %109
%111 = icmp sge i32 %110, 0
br i1 %111, label %112, label %116
112: ; preds = %106
%113 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%114 = load i32*, i32** %21
%115 = call i32 @shiftarray(i32* %114)
br label %116
116: ; preds = %112, %106
%117 = load i32, i32* %34
%118 = icmp eq i32 %117, 0
br i1 %118, label %119, label %141
119: ; preds = %116
%120 = load i32, i32* %33
%121 = icmp eq i32 %120, 1
br i1 %121, label %122, label %124
122: ; preds = %119
%123 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
br label %126
124: ; preds = %119
%125 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
br label %126
126: ; preds = %124, %122
%127 = load i32*, i32** %23
%128 = load i32*, i32** %26
%129 = load i32, i32* %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i32, i32* %127, i64 %130
store i32 -1, i32* %131
%132 = load i32*, i32** %24
%133 = load i32*, i32** %26
%134 = load i32, i32* %133
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %132, i64 %135
store i32 2, i32* %136
%137 = load i32*, i32** %17
%138 = load i32, i32* %137
%139 = sub nsw i32 %138, 5
%140 = load i32*, i32** %17
store i32 %139, i32* %140
br label %165
141: ; preds = %116
%142 = load i32, i32* %33
%143 = icmp eq i32 %142, 1
br i1 %143, label %144, label %146
144: ; preds = %141
%145 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
br label %148
146: ; preds = %141
%147 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0))
br label %148
148: ; preds = %146, %144
%149 = load i32*, i32** %16
%150 = load i32*, i32** %17
%151 = load i32*, i32** %18
%152 = load i32*, i32** %19
%153 = load i32*, i32** %20
%154 = load i32*, i32** %21
%155 = load i32*, i32** %22
%156 = load i32*, i32** %23
%157 = load i32*, i32** %24
%158 = load i32*, i32** %25
%159 = load i32*, i32** %26
%160 = load i32*, i32** %27
%161 = load i32, i32* %28
%162 = load i32, i32* %29
%163 = load i32, i32* %30
%164 = call i32 @treasure(i32* %149, i32* %150, i32* %151, i32* %152, i32* %153, i32* %154, i32* %155, i32* %156, i32* %157, i32* %158, i32* %159, i32* %160, i32 %161, i32 %162, i32 %163)
br label %165
165: ; preds = %64, %94, %126, %148
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
%struct.timeval = type { i32, i32 }
@str = [167 x i8] c"Hebrac itself is in front of you!\0A'Do you want to play? It's a coin flip: you can get some nice treasure or you can get hurt...'\0A[0]: Don't play\0A[1]: Heads\0A[2]: Tails\00"
@str.10 = [17 x i8] c"'As you wish...'\00"
@str.11 = [53 x i8] c"Tails! You can take the treasure!\0AHebrac disappears!\00"
@str.12 = [53 x i8] c"Heads! You can take the treasure!\0AHebrac disappears!\00"
@str.13 = [41 x i8] c"Heads! You lose 5 HP!\0AHebrac disappears!\00"
@str.14 = [41 x i8] c"Tails! You lose 5 HP!\0AHebrac disappears!\00"
@str.15 = [63 x i8] c"Do you think that your divination skills can surpass my power?\00"
@str.16 = [19 x i8] c"Hebrac disappears!\00"
@str.17 = [50 x i8] c"'Don't be rude the next time!'\0AHebrac disappears!\00"
@str.18 = [30 x i8] c"'I don't have all the day...'\00"
define void @hebrac(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32 %12, i32 %13, i32 %14) {
%16 = alloca %struct.timespec
%17 = alloca %struct.timeval
%18 = alloca i32
%19 = bitcast %struct.timespec* %16 to i8*
%20 = getelementptr inbounds %struct.timespec, %struct.timespec* %16, i64 0, i32 1
store i64 0, i64* %20
%21 = getelementptr inbounds %struct.timespec, %struct.timespec* %16, i64 0, i32 0
store i32 1000, i32* %21
%22 = call i32 @nanosleep(%struct.timespec* %16, i32* null)
%23 = bitcast %struct.timeval* %17 to i8*
%24 = call i32 @gettimeofday(%struct.timeval* %17, i32* null)
%25 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i64 0, i32 0
%26 = load i32, i32* %25
%27 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i64 0, i32 1
%28 = load i32, i32* %27
%29 = mul nsw i32 %28, %26
%30 = call i32 @srand(i32 %29)
%31 = bitcast i32* %18 to i8*
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([167 x i8], [167 x i8]* @str, i64 0, i64 0))
%33 = call i32 @getint(i32* %18)
%34 = load i32, i32* %18
%35 = icmp ugt i32 %34, 2
br i1 %35, label %36, label %53
36: ; preds = %15
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.18, i64 0, i64 0))
%38 = load i32, i32* %18
%39 = icmp ugt i32 %38, 2
br i1 %39, label %48, label %53
40: ; preds = %48
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.17, i64 0, i64 0))
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %7, i64 %43
store i32 -1, i32* %44
%45 = load i32, i32* %10
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %8, i64 %46
store i32 2, i32* %47
br label %92
48: ; preds = %36
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([167 x i8], [167 x i8]* @str, i64 0, i64 0))
%50 = call i32 @getint(i32* %18)
%51 = load i32, i32* %18
%52 = icmp ugt i32 %51, 2
br i1 %52, label %40, label %53
53: ; preds = %48, %15, %36
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.10, i64 0, i64 0))
%55 = load i32, i32* %18
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %65
57: ; preds = %53
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.16, i64 0, i64 0))
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i32, i32* %7, i64 %60
store i32 -1, i32* %61
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %8, i64 %63
store i32 2, i32* %64
br label %92
65: ; preds = %53
%66 = call i32 (...) @rand()
%67 = load i32, i32* %5
%68 = icmp sgt i32 %67, -1
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.15, i64 0, i64 0))
%71 = call i32 @shiftarray(i32* %5)
br label %72
72: ; preds = %69, %65
%73 = and i32 %66, 1
%74 = icmp eq i32 %73, 0
%75 = load i32, i32* %18
%76 = icmp eq i32 %75, 1
br i1 %74, label %77, label %88
77: ; preds = %72
%78 = select i1 %76, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @str.14, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @str.13, i64 0, i64 0)
%79 = call i32 @puts(i8* dereferenceable(1) %78)
%80 = load i32, i32* %10
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i32, i32* %7, i64 %81
store i32 -1, i32* %82
%83 = load i32, i32* %10
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32, i32* %8, i64 %84
store i32 2, i32* %85
%86 = load i32, i32* %1
%87 = add nsw i32 %86, -5
store i32 %87, i32* %1
br label %92
88: ; preds = %72
%89 = select i1 %76, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @str.11, i64 0, i64 0)
%90 = call i32 @puts(i8* dereferenceable(1) %89)
%91 = call i32 @treasure(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32 %12, i32 %13, i32 %14)
br label %92
92: ; preds = %88, %77, %57, %40
ret void
}