#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 atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int random();
int /*<<< orphan*/ stderr;
main(int argc, char *argv[]) {
  int queries;
  int sequences;
  int q, s;
  int i;
  int x, y, z;
  int *seq;
  if (argc != 3) {
    fprintf(stderr, "usage: %s q s\n", argv[0]);
    fprintf(stderr, "\tq - number of queries in a sequence\n");
    fprintf(stderr, "\ts - number of sequences to generate\n");
    fprintf(stderr, "\te.g. for version 2.14.x\n\t\t %s 22 41\n", argv[0]);
    exit(1);
  }
  queries = atoi(argv[1]);
  sequences = atoi(argv[2]);
  seq = malloc(sizeof(int) * queries);
  printf("#define MAX_PERMUTE %d\n", sequences);
  printf("long permutation[%d][%d]={\n", sequences, queries);
  for (s = 0; s < sequences; s++) {
    for (q = 0; q < queries; q++)
      seq[q] = q + 1;
    for (i = 0; i < 10000; i++) {
      x = i % queries;
      do
        y = random() % queries;
      while (x == y);
      z = seq[x];
      seq[x] = seq[y];
      seq[y] = z;
    }
    printf("\t{");
    for (i = 0; i < queries - 1; i++)
      printf("%2d,", seq[i]);
    printf("%2d}%c\n", seq[queries - 1], s == sequences - 1 ? ' ' : ',');
  }
  printf("}\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11f4 <main+0x94>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe69(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
lea    0xe61(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
lea    0xe70(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    139a <main+0x23a>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1291 <main+0x131>
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1266 <main+0x106>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2710,-0x24(%rbp)
jge    1309 <main+0x1a9>
mov    -0x24(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %edx,-0x28(%rbp)
mov    $0x0,%al
call   1050 <random@plt>
cltd
idivl  -0x14(%rbp)
mov    %edx,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     12af <main+0x14f>
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1298 <main+0x138>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1356 <main+0x1f6>
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    131e <main+0x1be>
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%edi
sub    $0x1,%edi
mov    $0x2c,%edx
mov    $0x20,%eax
cmp    %edi,%ecx
cmove  %eax,%edx
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1253 <main+0xf3>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbp
cmp    $0x3,%edi
jne    146b <main+0x2fb>
mov    0x8(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebx
mov    0x10(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
lea    0x0(,%rbx,4),%edi
call   1070 <malloc@plt>
mov    %rax,%r15
lea    0xf2b(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf33(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,0x8(%rsp)
test   %ebp,%ebp
jle    144e <main+0x2de>
lea    -0x1(%rbx),%r14d
movslq %r14d,%rax
mov    %rax,0x30(%rsp)
mov    0x8(%rsp),%rax
add    $0xffffffff,%eax
mov    %eax,(%rsp)
mov    %ebx,%r13d
mov    %r13d,%eax
and    $0xfffffff8,%eax
mov    %rax,0x28(%rsp)
add    $0xfffffffffffffff8,%rax
mov    %rax,0x20(%rsp)
mov    %rax,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x18(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x10(%rsp)
pcmpeqd %xmm5,%xmm5
movdqa 0xdeb(%rip),%xmm9
movdqa 0xdf2(%rip),%xmm8
movdqa 0xdfa(%rip),%xmm7
movdqa 0xe02(%rip),%xmm6
xor    %ebp,%ebp
jmp    12be <main+0x14e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x30(%rsp),%rax
mov    (%r15,%rax,4),%esi
mov    0x4(%rsp),%ebp
cmp    (%rsp),%ebp
mov    $0x2c,%edx
mov    $0x20,%eax
cmove  %eax,%edx
lea    0xe99(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
pcmpeqd %xmm5,%xmm5
movdqa 0xd81(%rip),%xmm9
movdqa 0xd88(%rip),%xmm8
movdqa 0xd90(%rip),%xmm7
movdqa 0xd98(%rip),%xmm6
je     144e <main+0x2de>
test   %ebx,%ebx
jle    13a0 <main+0x230>
cmp    $0x8,%ebx
jae    12e0 <main+0x170>
xor    %eax,%eax
jmp    1390 <main+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpq   $0x0,0x20(%rsp)
je     142c <main+0x2bc>
mov    0x10(%rsp),%rcx
xor    %eax,%eax
movaps 0xd16(%rip),%xmm0
movaps 0xcff(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movaps %xmm0,%xmm2
shufps $0x88,%xmm1,%xmm2
movaps %xmm2,%xmm3
psubd  %xmm5,%xmm3
movaps %xmm2,%xmm4
paddd  %xmm9,%xmm4
movdqu %xmm3,(%r15,%rax,4)
movdqu %xmm4,0x10(%r15,%rax,4)
movaps %xmm2,%xmm3
paddd  %xmm8,%xmm3
paddd  %xmm7,%xmm2
movdqu %xmm3,0x20(%r15,%rax,4)
movdqu %xmm2,0x30(%r15,%rax,4)
add    $0x10,%rax
paddq  %xmm6,%xmm0
paddq  %xmm6,%xmm1
add    $0xfffffffffffffffe,%rcx
jne    1310 <main+0x1a0>
testb  $0x1,0x18(%rsp)
je     1383 <main+0x213>
shufps $0x88,%xmm1,%xmm0
movaps %xmm0,%xmm1
psubd  %xmm5,%xmm1
paddd  %xmm9,%xmm0
movdqu %xmm1,(%r15,%rax,4)
movdqu %xmm0,0x10(%r15,%rax,4)
mov    0x28(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
je     13a0 <main+0x230>
lea    0x1(%rax),%rcx
mov    %ecx,(%r15,%rax,4)
mov    %rcx,%rax
cmp    %rcx,%r13
jne    1390 <main+0x220>
mov    %ebp,0x4(%rsp)
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    %r12d,%eax
cltd
idiv   %ebx
mov    %edx,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <random@plt>
cltd
idiv   %ebx
cmp    %edx,%ebp
je     13c0 <main+0x250>
mov    %ebp,%eax
mov    (%r15,%rax,4),%ecx
movslq %edx,%rdx
mov    (%r15,%rdx,4),%esi
mov    %esi,(%r15,%rax,4)
mov    %ecx,(%r15,%rdx,4)
add    $0x1,%r12d
cmp    $0x2710,%r12d
jne    13b0 <main+0x240>
lea    0xd1e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%ebx
lea    0xd10(%rip),%r12
jl     1260 <main+0xf0>
xor    %ebp,%ebp
mov    (%r15,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1410 <main+0x2a0>
jmp    1260 <main+0xf0>
xor    %eax,%eax
movdqa 0xbda(%rip),%xmm0
movdqa 0xbc2(%rip),%xmm1
testb  $0x1,0x18(%rsp)
jne    1366 <main+0x1f6>
jmp    1383 <main+0x213>
lea    0xcd0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b6e(%rip),%rbx
mov    (%rbx),%edi
mov    0x0(%rbp),%rdx
lea    0xbe1(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xbe0(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xbf6(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
mov    0x0(%rbp),%rdx
lea    0xc08(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"usage: %s q s\0A\00"
@.str.1 = [38 x i8] c"\09q - number of queries in a sequence\0A\00"
@.str.2 = [38 x i8] c"\09s - number of sequences to generate\0A\00"
@.str.3 = [38 x i8] c"\09e.g. for version 2.14.x\0A\09\09 %s 22 41\0A\00"
@.str.4 = [24 x i8] c"#define MAX_PERMUTE %d\0A\00"
@.str.5 = [28 x i8] c"long permutation[%d][%d]={\0A\00"
@.str.6 = [3 x i8] c"\09{\00"
@.str.7 = [5 x i8] c"%2d,\00"
@.str.8 = [8 x i8] c"%2d}%c\0A\00"
@.str.9 = [3 x i8] c"}\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %33
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %2
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %6
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @atoi(i8* %40)
store i32 %41, i32* %7
%42 = load i32, i32* %6
%43 = sext i32 %42 to i64
%44 = mul i64 4, %43
%45 = trunc i64 %44 to i32
%46 = call i32* @malloc(i32 %45)
store i32* %46, i32** %14
%47 = load i32, i32* %7
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %7
%50 = load i32, i32* %6
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %49, i32 %50)
store i32 0, i32* %9
br label %52
52: ; preds = %141, %33
%53 = load i32, i32* %9
%54 = load i32, i32* %7
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %144
56: ; preds = %52
store i32 0, i32* %8
br label %57
57: ; preds = %68, %56
%58 = load i32, i32* %8
%59 = load i32, i32* %6
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %71
61: ; preds = %57
%62 = load i32, i32* %8
%63 = add nsw i32 %62, 1
%64 = load i32*, i32** %14
%65 = load i32, i32* %8
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %64, i64 %66
store i32 %63, i32* %67
br label %68
68: ; preds = %61
%69 = load i32, i32* %8
%70 = add nsw i32 %69, 1
store i32 %70, i32* %8
br label %57
71: ; preds = %57
store i32 0, i32* %10
br label %72
72: ; preds = %107, %71
%73 = load i32, i32* %10
%74 = icmp slt i32 %73, 10000
br i1 %74, label %75, label %110
75: ; preds = %72
%76 = load i32, i32* %10
%77 = load i32, i32* %6
%78 = srem i32 %76, %77
store i32 %78, i32* %11
br label %79
79: ; preds = %83, %75
%80 = call i32 (...) @random()
%81 = load i32, i32* %6
%82 = srem i32 %80, %81
store i32 %82, i32* %12
br label %83
83: ; preds = %79
%84 = load i32, i32* %11
%85 = load i32, i32* %12
%86 = icmp eq i32 %84, %85
br i1 %86, label %79, label %87
87: ; preds = %83
%88 = load i32*, i32** %14
%89 = load i32, i32* %11
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i32, i32* %88, i64 %90
%92 = load i32, i32* %91
store i32 %92, i32* %13
%93 = load i32*, i32** %14
%94 = load i32, i32* %12
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %93, i64 %95
%97 = load i32, i32* %96
%98 = load i32*, i32** %14
%99 = load i32, i32* %11
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %98, i64 %100
store i32 %97, i32* %101
%102 = load i32, i32* %13
%103 = load i32*, i32** %14
%104 = load i32, i32* %12
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i32, i32* %103, i64 %105
store i32 %102, i32* %106
br label %107
107: ; preds = %87
%108 = load i32, i32* %10
%109 = add nsw i32 %108, 1
store i32 %109, i32* %10
br label %72
110: ; preds = %72
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %10
br label %112
112: ; preds = %124, %110
%113 = load i32, i32* %10
%114 = load i32, i32* %6
%115 = sub nsw i32 %114, 1
%116 = icmp slt i32 %113, %115
br i1 %116, label %117, label %127
117: ; preds = %112
%118 = load i32*, i32** %14
%119 = load i32, i32* %10
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %118, i64 %120
%122 = load i32, i32* %121
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %122)
br label %124
124: ; preds = %117
%125 = load i32, i32* %10
%126 = add nsw i32 %125, 1
store i32 %126, i32* %10
br label %112
127: ; preds = %112
%128 = load i32*, i32** %14
%129 = load i32, i32* %6
%130 = sub nsw i32 %129, 1
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i32, i32* %128, i64 %131
%133 = load i32, i32* %132
%134 = load i32, i32* %9
%135 = load i32, i32* %7
%136 = sub nsw i32 %135, 1
%137 = icmp eq i32 %134, %136
%138 = zext i1 %137 to i64
%139 = select i1 %137, i32 32, i32 44
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %133, i32 %139)
br label %141
141: ; preds = %127
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
store i32 %143, i32* %9
br label %52
144: ; preds = %52
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%146 = load i32, i32* %3
ret i32 %146
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"usage: %s q s\0A\00"
@.str.1 = [38 x i8] c"\09q - number of queries in a sequence\0A\00"
@.str.2 = [38 x i8] c"\09s - number of sequences to generate\0A\00"
@.str.3 = [38 x i8] c"\09e.g. for version 2.14.x\0A\09\09 %s 22 41\0A\00"
@.str.4 = [24 x i8] c"#define MAX_PERMUTE %d\0A\00"
@.str.5 = [28 x i8] c"long permutation[%d][%d]={\0A\00"
@.str.6 = [3 x i8] c"\09{\00"
@.str.7 = [5 x i8] c"%2d,\00"
@.str.8 = [8 x i8] c"%2d}%c\0A\00"
@str = [2 x i8] c"}\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %1
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
%23 = shl i32 %19, 2
%24 = tail call i32* @malloc(i32 %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %22)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %22, i32 %19)
%27 = icmp sgt i32 %22, 0
br i1 %27, label %28, label %132
28: ; preds = %16
%29 = icmp sgt i32 %19, 0
%30 = add i32 %19, -1
%31 = icmp sgt i32 %19, 1
%32 = sext i32 %30 to i64
%33 = getelementptr inbounds i32, i32* %24, i64 %32
%34 = add nsw i32 %22, -1
%35 = zext i32 %19 to i64
%36 = zext i32 %30 to i64
%37 = and i64 %35, 4294967288
%38 = add nsw i64 %37, -8
%39 = lshr exact i64 %38, 3
%40 = add nuw nsw i64 %39, 1
%41 = icmp ult i32 %19, 8
%42 = and i64 %35, 4294967288
%43 = and i64 %40, 1
%44 = icmp eq i64 %38, 0
%45 = and i64 %40, 4611686018427387902
%46 = icmp eq i64 %43, 0
%47 = icmp eq i64 %42, %35
br label %48
48: ; preds = %28, %125
%49 = phi i32 [ 0, %28 ], [ %130, %125 ]
br i1 %29, label %50, label %99
50: ; preds = %48
br i1 %41, label %91, label %51
51: ; preds = %50
br i1 %44, label %78, label %52
52: ; preds = %51, %52
%53 = phi i64 [ %74, %52 ], [ 0, %51 ]
%54 = phi <4 x i64> [ %75, %52 ], [ <i64 0, i64 1, i64 2, i64 3>, %51 ]
%55 = phi i64 [ %76, %52 ], [ 0, %51 ]
%56 = getelementptr inbounds i32, i32* %24, i64 %53
%57 = trunc <4 x i64> %54 to <4 x i32>
%58 = add <4 x i32> %57, <i32 1, i32 1, i32 1, i32 1>
%59 = trunc <4 x i64> %54 to <4 x i32>
%60 = add <4 x i32> %59, <i32 5, i32 5, i32 5, i32 5>
%61 = bitcast i32* %56 to <4 x i32>*
store <4 x i32> %58, <4 x i32>* %61
%62 = getelementptr inbounds i32, i32* %56, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> %60, <4 x i32>* %63
%64 = or i64 %53, 8
%65 = add <4 x i64> %54, <i64 8, i64 8, i64 8, i64 8>
%66 = getelementptr inbounds i32, i32* %24, i64 %64
%67 = trunc <4 x i64> %65 to <4 x i32>
%68 = add <4 x i32> %67, <i32 1, i32 1, i32 1, i32 1>
%69 = trunc <4 x i64> %65 to <4 x i32>
%70 = add <4 x i32> %69, <i32 5, i32 5, i32 5, i32 5>
%71 = bitcast i32* %66 to <4 x i32>*
store <4 x i32> %68, <4 x i32>* %71
%72 = getelementptr inbounds i32, i32* %66, i64 4
%73 = bitcast i32* %72 to <4 x i32>*
store <4 x i32> %70, <4 x i32>* %73
%74 = add nuw i64 %53, 16
%75 = add <4 x i64> %54, <i64 16, i64 16, i64 16, i64 16>
%76 = add i64 %55, 2
%77 = icmp eq i64 %76, %45
br i1 %77, label %78, label %52
78: ; preds = %52, %51
%79 = phi i64 [ 0, %51 ], [ %74, %52 ]
%80 = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %51 ], [ %75, %52 ]
br i1 %46, label %90, label %81
81: ; preds = %78
%82 = getelementptr inbounds i32, i32* %24, i64 %79
%83 = trunc <4 x i64> %80 to <4 x i32>
%84 = add <4 x i32> %83, <i32 1, i32 1, i32 1, i32 1>
%85 = trunc <4 x i64> %80 to <4 x i32>
%86 = add <4 x i32> %85, <i32 5, i32 5, i32 5, i32 5>
%87 = bitcast i32* %82 to <4 x i32>*
store <4 x i32> %84, <4 x i32>* %87
%88 = getelementptr inbounds i32, i32* %82, i64 4
%89 = bitcast i32* %88 to <4 x i32>*
store <4 x i32> %86, <4 x i32>* %89
br label %90
90: ; preds = %78, %81
br i1 %47, label %99, label %91
91: ; preds = %50, %90
%92 = phi i64 [ 0, %50 ], [ %42, %90 ]
br label %93
93: ; preds = %91, %93
%94 = phi i64 [ %95, %93 ], [ %92, %91 ]
%95 = add nuw nsw i64 %94, 1
%96 = getelementptr inbounds i32, i32* %24, i64 %94
%97 = trunc i64 %95 to i32
store i32 %97, i32* %96
%98 = icmp eq i64 %95, %35
br i1 %98, label %99, label %93
99: ; preds = %93, %90, %48
br label %100
100: ; preds = %99, %107
%101 = phi i32 [ %114, %107 ], [ 0, %99 ]
%102 = srem i32 %101, %19
br label %103
103: ; preds = %103, %100
%104 = tail call i32 (...) @random()
%105 = srem i32 %104, %19
%106 = icmp eq i32 %102, %105
br i1 %106, label %103, label %107
107: ; preds = %103
%108 = zext i32 %102 to i64
%109 = getelementptr inbounds i32, i32* %24, i64 %108
%110 = load i32, i32* %109
%111 = sext i32 %105 to i64
%112 = getelementptr inbounds i32, i32* %24, i64 %111
%113 = load i32, i32* %112
store i32 %113, i32* %109
store i32 %110, i32* %112
%114 = add nuw nsw i32 %101, 1
%115 = icmp eq i32 %114, 10000
br i1 %115, label %116, label %100
116: ; preds = %107
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br i1 %31, label %118, label %125
118: ; preds = %116, %118
%119 = phi i64 [ %123, %118 ], [ 0, %116 ]
%120 = getelementptr inbounds i32, i32* %24, i64 %119
%121 = load i32, i32* %120
%122 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %121)
%123 = add nuw nsw i64 %119, 1
%124 = icmp eq i64 %123, %36
br i1 %124, label %125, label %118
125: ; preds = %118, %116
%126 = load i32, i32* %33
%127 = icmp eq i32 %49, %34
%128 = select i1 %127, i32 32, i32 44
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %126, i32 %128)
%130 = add nuw nsw i32 %49, 1
%131 = icmp eq i32 %130, %22
br i1 %131, label %132, label %48
132: ; preds = %125, %16
%133 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}