#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*/ allones(int *);
int bestmove(int *, int *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void humanmove(int *p, int nimber) {
  int c, nummoves, pile, number;
  int bests[10];
  nummoves = bestmove(bests, p, nimber);
  do {
    printf("\nTake from which pile? ");
    scanf("%d", &pile);
    if (!p[--pile])
      printf("\nThere is nothing to take from that pile.");
  } while (!p[pile]);
  do {
    printf("\nHow many? ");
    scanf("%d", &number);
    if (!number || number > p[pile])
      printf("Choose a number between 1 and %d.", p[pile]);
  } while (!number || number > p[pile]);
  p[pile] -= number;
  if (nimber) {
    nimber = 0;
    for (c = 0; c < 10; c++)
      nimber ^= p[c];
    if ((nimber) && (!allones(p))) {
      printf("\nThat wasn't the best move. Move(s) that would have left a "
             "nimber of zero would\nhave been:\n");
      for (c = 0; c < 10; c++)
        if (bests[c])
          printf("%d from pile %d\n", bests[c], c + 1);
      printf("\nPress ENTER...\n");
      getchar();
      getchar();
    }
  }
  printf("\nYou take %d from pile %d leaving...\n", number, pile + 1);
}


x86 assembly (clang, -O0):
<humanmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <bestmove@plt>
mov    %eax,-0x14(%rbp)
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    11b8 <humanmove+0x68>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bd <humanmove+0x6d>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1172 <humanmove+0x22>
jmp    11db <humanmove+0x8b>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe28(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     1217 <humanmove+0xc7>
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1230 <humanmove+0xe0>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1235 <humanmove+0xe5>
mov    $0x1,%al
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x51(%rbp)
je     1258 <humanmove+0x108>
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
setg   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    11db <humanmove+0x8b>
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    %esi,%edx
mov    %edx,(%rax,%rcx,4)
cmpl   $0x0,-0xc(%rbp)
je     1351 <humanmove+0x201>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    12b7 <humanmove+0x167>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    128e <humanmove+0x13e>
cmpl   $0x0,-0xc(%rbp)
je     134c <humanmove+0x1fc>
mov    -0x8(%rbp),%rdi
call   1070 <allones@plt>
cmp    $0x0,%eax
jne    134c <humanmove+0x1fc>
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1330 <humanmove+0x1e0>
movslq -0x10(%rbp),%rax
cmpl   $0x0,-0x50(%rbp,%rax,4)
je     131d <humanmove+0x1cd>
movslq -0x10(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
mov    -0x10(%rbp),%edx
add    $0x1,%edx
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1322 <humanmove+0x1d2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12e8 <humanmove+0x198>
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
jmp    1351 <humanmove+0x201>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<humanmove>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1060 <bestmove@plt>
lea    0xe75(%rip),%r15
lea    0xe86(%rip),%r12
lea    0x8(%rsp),%rbp
lea    0xe7d(%rip),%r13
xchg   %ax,%ax
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1070 <scanf@plt>
movslq 0x8(%rsp),%rax
lea    -0x1(%rax),%rcx
mov    %ecx,0x8(%rsp)
cmpl   $0x0,-0x4(%rbx,%rax,4)
jne    11de <humanmove+0x7e>
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x8(%rsp),%rax
cmpl   $0x0,(%rbx,%rax,4)
je     11a0 <humanmove+0x40>
lea    0xe60(%rip),%r15
lea    0xe2c(%rip),%r12
lea    0xc(%rsp),%rbp
lea    0xe59(%rip),%r13
jmp    121e <humanmove+0xbe>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     121e <humanmove+0xbe>
movslq 0x8(%rsp),%rcx
mov    (%rbx,%rcx,4),%edx
sub    %eax,%edx
jge    1249 <humanmove+0xe9>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
movslq 0x8(%rsp),%rcx
mov    (%rbx,%rcx,4),%esi
test   %eax,%eax
je     1200 <humanmove+0xa0>
cmp    %esi,%eax
jle    1212 <humanmove+0xb2>
jmp    1200 <humanmove+0xa0>
mov    %edx,(%rbx,%rcx,4)
test   %r14d,%r14d
je     13c8 <humanmove+0x268>
movdqu 0x4(%rbx),%xmm0
movdqu 0x14(%rbx),%xmm1
pxor   %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
pxor   %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
pxor   %xmm0,%xmm1
movd   %xmm1,%eax
xor    (%rbx),%eax
cmp    %eax,0x24(%rbx)
je     13c8 <humanmove+0x268>
mov    %rbx,%rdi
call   1080 <allones@plt>
test   %eax,%eax
jne    13c8 <humanmove+0x268>
lea    0xe0f(%rip),%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%esi
test   %esi,%esi
je     12bb <humanmove+0x15b>
lea    0xdc4(%rip),%rdi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
test   %esi,%esi
je     12d6 <humanmove+0x176>
lea    0xda9(%rip),%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
test   %esi,%esi
je     12f1 <humanmove+0x191>
lea    0xd8e(%rip),%rdi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
test   %esi,%esi
je     130c <humanmove+0x1ac>
lea    0xd73(%rip),%rdi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
test   %esi,%esi
je     1327 <humanmove+0x1c7>
lea    0xd58(%rip),%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
test   %esi,%esi
je     1342 <humanmove+0x1e2>
lea    0xd3d(%rip),%rdi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
test   %esi,%esi
je     135d <humanmove+0x1fd>
lea    0xd22(%rip),%rdi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rsp),%esi
test   %esi,%esi
je     1378 <humanmove+0x218>
lea    0xd07(%rip),%rdi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
test   %esi,%esi
je     1393 <humanmove+0x233>
lea    0xcec(%rip),%rdi
mov    $0x9,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rsp),%esi
test   %esi,%esi
je     13ae <humanmove+0x24e>
lea    0xcd1(%rip),%rdi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd50(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
add    $0x1,%edx
lea    0xcaa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\0ATake from which pile? \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [42 x i8] c"\0AThere is nothing to take from that pile.\00"
@.str.3 = [12 x i8] c"\0AHow many? \00"
@.str.4 = [34 x i8] c"Choose a number between 1 and %d.\00"
@.str.5 = [92 x i8] c"\0AThat wasn't the best move. Move(s) that would have left a nimber of zero would\0Ahave been:\0A\00"
@.str.6 = [17 x i8] c"%d from pile %d\0A\00"
@.str.7 = [17 x i8] c"\0APress ENTER...\0A\00"
@.str.8 = [38 x i8] c"\0AYou take %d from pile %d leaving...\0A\00"
define void @humanmove(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [10 x i32]
store i32* %0, i32** %3
store i32 %1, i32* %4
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 0
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = call i32 @bestmove(i32* %10, i32* %11, i32 %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %27, %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%17 = load i32*, i32** %3
%18 = load i32, i32* %7
%19 = add nsw i32 %18, -1
store i32 %19, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
%22 = load i32, i32* %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %14
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %14
br label %27
27: ; preds = %26
%28 = load i32*, i32** %3
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
%32 = load i32, i32* %31
%33 = icmp ne i32 %32, 0
%34 = xor i1 %33, true
br i1 %34, label %14, label %35
35: ; preds = %27
br label %36
36: ; preds = %68, %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%39 = load i32, i32* %8
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %49
41: ; preds = %36
%42 = load i32, i32* %8
%43 = load i32*, i32** %3
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %43, i64 %45
%47 = load i32, i32* %46
%48 = icmp sgt i32 %42, %47
br i1 %48, label %49, label %56
49: ; preds = %41, %36
%50 = load i32*, i32** %3
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %50, i64 %52
%54 = load i32, i32* %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %49, %41
br label %57
57: ; preds = %56
%58 = load i32, i32* %8
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %68
60: ; preds = %57
%61 = load i32, i32* %8
%62 = load i32*, i32** %3
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %62, i64 %64
%66 = load i32, i32* %65
%67 = icmp sgt i32 %61, %66
br label %68
68: ; preds = %60, %57
%69 = phi i1 [ true, %57 ], [ %67, %60 ]
br i1 %69, label %36, label %70
70: ; preds = %68
%71 = load i32, i32* %8
%72 = load i32*, i32** %3
%73 = load i32, i32* %7
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %72, i64 %74
%76 = load i32, i32* %75
%77 = sub nsw i32 %76, %71
store i32 %77, i32* %75
%78 = load i32, i32* %4
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %130
80: ; preds = %70
store i32 0, i32* %4
store i32 0, i32* %5
br label %81
81: ; preds = %92, %80
%82 = load i32, i32* %5
%83 = icmp slt i32 %82, 10
br i1 %83, label %84, label %95
84: ; preds = %81
%85 = load i32*, i32** %3
%86 = load i32, i32* %5
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i32, i32* %85, i64 %87
%89 = load i32, i32* %88
%90 = load i32, i32* %4
%91 = xor i32 %90, %89
store i32 %91, i32* %4
br label %92
92: ; preds = %84
%93 = load i32, i32* %5
%94 = add nsw i32 %93, 1
store i32 %94, i32* %5
br label %81
95: ; preds = %81
%96 = load i32, i32* %4
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %129
98: ; preds = %95
%99 = load i32*, i32** %3
%100 = call i32 @allones(i32* %99)
%101 = icmp ne i32 %100, 0
br i1 %101, label %129, label %102
102: ; preds = %98
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %5
br label %104
104: ; preds = %122, %102
%105 = load i32, i32* %5
%106 = icmp slt i32 %105, 10
br i1 %106, label %107, label %125
107: ; preds = %104
%108 = load i32, i32* %5
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = icmp ne i32 %111, 0
br i1 %112, label %113, label %121
113: ; preds = %107
%114 = load i32, i32* %5
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = load i32, i32* %5
%119 = add nsw i32 %118, 1
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %117, i32 %119)
br label %121
121: ; preds = %113, %107
br label %122
122: ; preds = %121
%123 = load i32, i32* %5
%124 = add nsw i32 %123, 1
store i32 %124, i32* %5
br label %104
125: ; preds = %104
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%127 = call i32 (...) @getchar()
%128 = call i32 (...) @getchar()
br label %129
129: ; preds = %125, %98, %95
br label %130
130: ; preds = %129, %70
%131 = load i32, i32* %8
%132 = load i32, i32* %7
%133 = add nsw i32 %132, 1
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i32 %131, i32 %133)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0ATake from which pile? \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [42 x i8] c"\0AThere is nothing to take from that pile.\00"
@.str.3 = [12 x i8] c"\0AHow many? \00"
@.str.4 = [34 x i8] c"Choose a number between 1 and %d.\00"
@.str.6 = [17 x i8] c"%d from pile %d\0A\00"
@.str.8 = [38 x i8] c"\0AYou take %d from pile %d leaving...\0A\00"
@str = [91 x i8] c"\0AThat wasn't the best move. Move(s) that would have left a nimber of zero would\0Ahave been:\00"
@str.9 = [16 x i8] c"\0APress ENTER...\00"
define void @humanmove(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x i32]
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast [10 x i32]* %5 to i8*
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%10 = call i32 @bestmove(i32* %9, i32* %0, i32 %1)
br label %11
11: ; preds = %20, %2
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, -1
store i32 %15, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %0, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %11
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %0, i64 %23
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 0
br i1 %26, label %11, label %27
27: ; preds = %11, %20
br label %28
28: ; preds = %50, %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 0
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %0, i64 %34
%36 = load i32, i32* %35
%37 = icmp sgt i32 %31, %36
%38 = select i1 %32, i1 true, i1 %37
br i1 %38, label %39, label %43
39: ; preds = %28
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %36)
%41 = load i32, i32* %4
%42 = icmp eq i32 %41, 0
br i1 %42, label %50, label %43
43: ; preds = %28, %39
%44 = phi i32 [ %41, %39 ], [ %31, %28 ]
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %0, i64 %46
%48 = load i32, i32* %47
%49 = icmp slt i32 %48, %44
br i1 %49, label %50, label %51
50: ; preds = %43, %39
br label %28
51: ; preds = %43
%52 = sext i32 %45 to i64
%53 = getelementptr inbounds i32, i32* %0, i64 %52
%54 = sub nsw i32 %48, %44
store i32 %54, i32* %53
%55 = icmp eq i32 %1, 0
br i1 %55, label %133, label %56
56: ; preds = %51
%57 = load i32, i32* %0
%58 = getelementptr inbounds i32, i32* %0, i64 1
%59 = bitcast i32* %58 to <8 x i32>*
%60 = load <8 x i32>, <8 x i32>* %59
%61 = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> %60)
%62 = xor i32 %61, %57
%63 = getelementptr inbounds i32, i32* %0, i64 9
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, %62
br i1 %65, label %133, label %66
66: ; preds = %56
%67 = call i32 @allones(i32* %0)
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %133
69: ; preds = %66
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str, i64 0, i64 0))
%71 = load i32, i32* %9
%72 = icmp eq i32 %71, 0
br i1 %72, label %75, label %73
73: ; preds = %69
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %71, i32 1)
br label %75
75: ; preds = %69, %73
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 1
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %75
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %77, i32 2)
br label %81
81: ; preds = %79, %75
%82 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 2
%83 = load i32, i32* %82
%84 = icmp eq i32 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %81
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %83, i32 3)
br label %87
87: ; preds = %85, %81
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 3
%89 = load i32, i32* %88
%90 = icmp eq i32 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %87
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %89, i32 4)
br label %93
93: ; preds = %91, %87
%94 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 4
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 0
br i1 %96, label %99, label %97
97: ; preds = %93
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %95, i32 5)
br label %99
99: ; preds = %97, %93
%100 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 5
%101 = load i32, i32* %100
%102 = icmp eq i32 %101, 0
br i1 %102, label %105, label %103
103: ; preds = %99
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %101, i32 6)
br label %105
105: ; preds = %103, %99
%106 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 6
%107 = load i32, i32* %106
%108 = icmp eq i32 %107, 0
br i1 %108, label %111, label %109
109: ; preds = %105
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %107, i32 7)
br label %111
111: ; preds = %109, %105
%112 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 7
%113 = load i32, i32* %112
%114 = icmp eq i32 %113, 0
br i1 %114, label %117, label %115
115: ; preds = %111
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %113, i32 8)
br label %117
117: ; preds = %115, %111
%118 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 8
%119 = load i32, i32* %118
%120 = icmp eq i32 %119, 0
br i1 %120, label %123, label %121
121: ; preds = %117
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %119, i32 9)
br label %123
123: ; preds = %121, %117
%124 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 9
%125 = load i32, i32* %124
%126 = icmp eq i32 %125, 0
br i1 %126, label %129, label %127
127: ; preds = %123
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %125, i32 10)
br label %129
129: ; preds = %127, %123
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.9, i64 0, i64 0))
%131 = call i32 (...) @getchar()
%132 = call i32 (...) @getchar()
br label %133
133: ; preds = %56, %66, %129, %51
%134 = load i32, i32* %4
%135 = load i32, i32* %3
%136 = add nsw i32 %135, 1
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i32 %134, i32 %136)
ret void
}