#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 EXIT_FAILURE;
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ freopen(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(long *, int, int, int /*<<< orphan*/);
int *malloc(unsigned int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, long);
unsigned int random();
int /*<<< orphan*/ srandom(unsigned int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strncmp(char const *, char *, int);
unsigned int strtol(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  unsigned int i = 0, j = 0, d = 0, n = 0;
  unsigned int seed = 0x16372789;
  long int r = 0;
  int is_binary = 0;
  int *distinct;
  if (argc < 2) {
    fprintf(stderr, "Usage: %s [-b] <distinct elements> <number of ints>\n",
            argv[0]);
    fprintf(stderr, "with -b option output will be binary\n");
    return EXIT_FAILURE;
  }
  if (argc > 3) {
    if (!strncmp(argv[1], "-b", 3)) {
      is_binary = 1;
      argv++;
      argc--;
    }
  }
  errno = 0;
  d = strtol(argv[1], NULL, 0);
  if (errno) {
    perror("strtol");
    return EXIT_FAILURE;
  }
  errno = 0;
  n = strtol(argv[2], NULL, 0);
  if (errno) {
    perror("strtol");
    return EXIT_FAILURE;
  }
  if (is_binary)
    freopen(NULL, "wb", stdout);
  distinct = malloc(d * sizeof(int));
  if (!distinct) {
    perror("malloc");
    return EXIT_FAILURE;
  }
  srandom(seed);
  i = 0;
  j = d;
  while (j--) {
    distinct[i++] = random();
  }
  while (n--) {
    r = distinct[random() % d];
    if (is_binary)
      fwrite(&r, sizeof(int), 1, stdout);
    else
      printf("%d\n", r);
  }
  free(distinct);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x16372789,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1248 <main+0x98>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xde7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
lea    0xe05(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    146c <main+0x2bc>
cmpl   $0x3,-0x8(%rbp)
jle    1295 <main+0xe5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdfa(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    1290 <main+0xe0>
movl   $0x1,-0x34(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1295 <main+0xe5>
mov    0x2d3c(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2d18(%rip),%rax
cmpq   $0x0,(%rax)
je     12e7 <main+0x137>
lea    0xd8d(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2cf3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    146c <main+0x2bc>
mov    0x2cea(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
mov    %eax,-0x20(%rbp)
mov    0x2cc6(%rip),%rax
cmpq   $0x0,(%rax)
je     1339 <main+0x189>
lea    0xd3b(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2ca1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    146c <main+0x2bc>
cmpl   $0x0,-0x34(%rbp)
je     135c <main+0x1ac>
mov    0x2c7e(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%edi
lea    0xd0e(%rip),%rsi
call   1070 <freopen@plt>
mov    -0x1c(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1396 <main+0x1e6>
lea    0xce8(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2c44(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    146c <main+0x2bc>
mov    -0x24(%rbp),%edi
call   1040 <srandom@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     13e1 <main+0x231>
mov    $0x0,%al
call   10a0 <random@plt>
mov    %eax,%edx
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
mov    %ecx,%ecx
mov    %edx,(%rax,%rcx,4)
jmp    13ab <main+0x1fb>
jmp    13e6 <main+0x236>
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x0,%eax
je     145c <main+0x2ac>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   10a0 <random@plt>
xor    %edx,%edx
divl   -0x1c(%rbp)
mov    -0x48(%rbp),%rax
mov    %edx,%ecx
movslq (%rax,%rcx,4),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1447 <main+0x297>
mov    0x2b9b(%rip),%rax
mov    (%rax),%ecx
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    1457 <main+0x2a7>
mov    -0x30(%rbp),%rsi
lea    0xc1d(%rip),%rdi
call   1060 <printf@plt>
jmp    13e6 <main+0x236>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
movq   $0x0,(%rsp)
cmp    $0x1,%edi
jg     1205 <main+0x55>
mov    0x2e0e(%rip),%rbp
mov    0x0(%rbp),%edi
mov    (%rbx),%rdx
lea    0xe21(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe45(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%eax
jmp    134e <main+0x19e>
mov    $0x1,%r13b
cmp    $0x4,%edi
jb     1230 <main+0x80>
lea    0x8(%rbx),%rbp
mov    0x8(%rbx),%rdi
lea    0xe3f(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
setne  %r13b
cmove  %rbp,%rbx
mov    0x2da1(%rip),%r15
movq   $0x0,(%r15)
mov    0x8(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
cmpq   $0x0,(%r15)
jne    135d <main+0x1ad>
mov    %eax,%r14d
movq   $0x0,(%r15)
mov    0x10(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
cmpq   $0x0,(%r15)
jne    135d <main+0x1ad>
mov    %eax,%ebp
test   %r13b,%r13b
jne    1294 <main+0xe4>
mov    0x2d44(%rip),%rax
mov    (%rax),%edx
lea    0xdd8(%rip),%rsi
xor    %edi,%edi
call   1070 <freopen@plt>
lea    0x0(,%r14,4),%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     1366 <main+0x1b6>
mov    %rax,%r15
mov    $0x16372789,%edi
call   1040 <srandom@plt>
test   %r14d,%r14d
je     12e4 <main+0x134>
mov    %r14d,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <random@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    12d0 <main+0x120>
test   %ebp,%ebp
je     1344 <main+0x194>
mov    0x2cd9(%rip),%rbx
mov    %rsp,%r12
jmp    1310 <main+0x160>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xd68(%rip),%rdi
call   1060 <printf@plt>
test   %ebp,%ebp
je     1344 <main+0x194>
add    $0xffffffff,%ebp
xor    %eax,%eax
call   10a0 <random@plt>
xor    %edx,%edx
div    %r14d
movslq (%r15,%rdx,4),%rsi
mov    %rsi,(%rsp)
test   %r13b,%r13b
jne    1300 <main+0x150>
mov    (%rbx),%ecx
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
test   %ebp,%ebp
jne    1310 <main+0x160>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcfa(%rip),%rdi
jmp    136d <main+0x1bd>
lea    0xcfb(%rip),%rdi
call   10c0 <perror@plt>
jmp    11f7 <main+0x47>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"Usage: %s [-b] <distinct elements> <number of ints>\0A\00"
@.str.1 = [38 x i8] c"with -b option output will be binary\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [3 x i8] c"-b\00"
@errno = global i64 0
@.str.3 = [7 x i8] c"strtol\00"
@.str.4 = [3 x i8] c"wb\00"
@stdout = global i32 0
@.str.5 = [7 x i8] c"malloc\00"
@.str.6 = [4 x i8] c"%d\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 i64
%12 = alloca i32
%13 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 372713353, i32* %10
store i64 0, i64* %11
store i32 0, i32* %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %25
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* @EXIT_FAILURE
store i32 %24, i32* %3
br label %118
25: ; preds = %2
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 3
br i1 %27, label %28, label %40
28: ; preds = %25
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @strncmp(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%33 = icmp ne i32 %32, 0
br i1 %33, label %39, label %34
34: ; preds = %28
store i32 1, i32* %12
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i32 1
store i8** %36, i8*** %5
%37 = load i32, i32* %4
%38 = add nsw i32 %37, -1
store i32 %38, i32* %4
br label %39
39: ; preds = %34, %28
br label %40
40: ; preds = %39, %25
store i64 0, i64* @errno
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i32 @strtol(i8* %43, i32* null, i32 0)
store i32 %44, i32* %8
%45 = load i64, i64* @errno
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %40
%48 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%49 = load i32, i32* @EXIT_FAILURE
store i32 %49, i32* %3
br label %118
50: ; preds = %40
store i64 0, i64* @errno
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 2
%53 = load i8*, i8** %52
%54 = call i32 @strtol(i8* %53, i32* null, i32 0)
store i32 %54, i32* %9
%55 = load i64, i64* @errno
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %50
%58 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%59 = load i32, i32* @EXIT_FAILURE
store i32 %59, i32* %3
br label %118
60: ; preds = %50
%61 = load i32, i32* %12
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = load i32, i32* @stdout
%65 = call i32 @freopen(i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %60
%67 = load i32, i32* %8
%68 = zext i32 %67 to i64
%69 = mul i64 %68, 4
%70 = trunc i64 %69 to i32
%71 = call i32* @malloc(i32 %70)
store i32* %71, i32** %13
%72 = load i32*, i32** %13
%73 = icmp ne i32* %72, null
br i1 %73, label %77, label %74
74: ; preds = %66
%75 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%76 = load i32, i32* @EXIT_FAILURE
store i32 %76, i32* %3
br label %118
77: ; preds = %66
%78 = load i32, i32* %10
%79 = call i32 @srandom(i32 %78)
store i32 0, i32* %6
%80 = load i32, i32* %8
store i32 %80, i32* %7
br label %81
81: ; preds = %85, %77
%82 = load i32, i32* %7
%83 = add i32 %82, -1
store i32 %83, i32* %7
%84 = icmp ne i32 %82, 0
br i1 %84, label %85, label %92
85: ; preds = %81
%86 = call i32 (...) @random()
%87 = load i32*, i32** %13
%88 = load i32, i32* %6
%89 = add i32 %88, 1
store i32 %89, i32* %6
%90 = zext i32 %88 to i64
%91 = getelementptr inbounds i32, i32* %87, i64 %90
store i32 %86, i32* %91
br label %81
92: ; preds = %81
br label %93
93: ; preds = %114, %92
%94 = load i32, i32* %9
%95 = add i32 %94, -1
store i32 %95, i32* %9
%96 = icmp ne i32 %94, 0
br i1 %96, label %97, label %115
97: ; preds = %93
%98 = load i32*, i32** %13
%99 = call i32 (...) @random()
%100 = load i32, i32* %8
%101 = urem i32 %99, %100
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds i32, i32* %98, i64 %102
%104 = load i32, i32* %103
%105 = sext i32 %104 to i64
store i64 %105, i64* %11
%106 = load i32, i32* %12
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %111
108: ; preds = %97
%109 = load i32, i32* @stdout
%110 = call i32 @fwrite(i64* %11, i32 4, i32 1, i32 %109)
br label %114
111: ; preds = %97
%112 = load i64, i64* %11
%113 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 %112)
br label %114
114: ; preds = %111, %108
br label %93
115: ; preds = %93
%116 = load i32*, i32** %13
%117 = call i32 @free(i32* %116)
store i32 0, i32* %3
br label %118
118: ; preds = %115, %74, %57, %47, %16
%119 = load i32, i32* %3
ret i32 %119
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"Usage: %s [-b] <distinct elements> <number of ints>\0A\00"
@.str.1 = [38 x i8] c"with -b option output will be binary\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [3 x i8] c"-b\00"
@errno = global i64 0
@.str.3 = [7 x i8] c"strtol\00"
@.str.4 = [3 x i8] c"wb\00"
@stdout = global i32 0
@.str.5 = [7 x i8] c"malloc\00"
@.str.6 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
br label %84
13: ; preds = %2
%14 = icmp ugt i32 %0, 3
br i1 %14, label %15, label %22
15: ; preds = %13
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = tail call i32 @strncmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%19 = icmp eq i32 %18, 0
%20 = select i1 %19, i8** %16, i8** %1
%21 = xor i1 %19, true
br label %22
22: ; preds = %15, %13
%23 = phi i8** [ %1, %13 ], [ %20, %15 ]
%24 = phi i1 [ true, %13 ], [ %21, %15 ]
store i64 0, i64* @errno
%25 = getelementptr inbounds i8*, i8** %23, i64 1
%26 = load i8*, i8** %25
%27 = tail call i32 @strtol(i8* nocapture %26, i32* null, i32 0)
%28 = load i64, i64* @errno
%29 = icmp eq i64 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %22
%31 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%32 = load i32, i32* @EXIT_FAILURE
br label %84
33: ; preds = %22
store i64 0, i64* @errno
%34 = getelementptr inbounds i8*, i8** %23, i64 2
%35 = load i8*, i8** %34
%36 = tail call i32 @strtol(i8* nocapture %35, i32* null, i32 0)
%37 = load i64, i64* @errno
%38 = icmp eq i64 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %33
%40 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%41 = load i32, i32* @EXIT_FAILURE
br label %84
42: ; preds = %33
br i1 %24, label %46, label %43
43: ; preds = %42
%44 = load i32, i32* @stdout
%45 = tail call i32 @freopen(i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %42
%47 = shl i32 %27, 2
%48 = tail call i32* @malloc(i32 %47)
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %53
50: ; preds = %46
%51 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%52 = load i32, i32* @EXIT_FAILURE
br label %84
53: ; preds = %46
%54 = tail call i32 @srandom(i32 372713353)
%55 = icmp eq i32 %27, 0
br i1 %55, label %56, label %58
56: ; preds = %58, %53
%57 = icmp eq i32 %36, 0
br i1 %57, label %82, label %66
58: ; preds = %53, %58
%59 = phi i64 [ %63, %58 ], [ 0, %53 ]
%60 = phi i32 [ %61, %58 ], [ %27, %53 ]
%61 = add i32 %60, -1
%62 = tail call i32 (...) @random()
%63 = add nuw nsw i64 %59, 1
%64 = getelementptr inbounds i32, i32* %48, i64 %59
store i32 %62, i32* %64
%65 = icmp eq i32 %61, 0
br i1 %65, label %56, label %58
66: ; preds = %56, %80
%67 = phi i32 [ %68, %80 ], [ %36, %56 ]
%68 = add i32 %67, -1
%69 = call i32 (...) @random()
%70 = urem i32 %69, %27
%71 = zext i32 %70 to i64
%72 = getelementptr inbounds i32, i32* %48, i64 %71
%73 = load i32, i32* %72
%74 = sext i32 %73 to i64
store i64 %74, i64* %3
br i1 %24, label %78, label %75
75: ; preds = %66
%76 = load i32, i32* @stdout
%77 = call i32 @fwrite(i64* %3, i32 4, i32 1, i32 %76)
br label %80
78: ; preds = %66
%79 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 %74)
br label %80
80: ; preds = %78, %75
%81 = icmp eq i32 %68, 0
br i1 %81, label %82, label %66
82: ; preds = %80, %56
%83 = call i32 @free(i32* %48)
br label %84
84: ; preds = %82, %50, %39, %30, %6
%85 = phi i32 [ %12, %6 ], [ %32, %30 ], [ %41, %39 ], [ 0, %82 ], [ %52, %50 ]
ret i32 %85
}