#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*/ printf(char *, unsigned int, unsigned int);
void print_info(int *info, unsigned int lastr, unsigned iteration) {
  unsigned j;
  printf("--------statistics for %u reads (iteration %u)--------\n", lastr,
         iteration);
  for (j = 0; j <= 20; j++)
    printf("# of %u re-tries = %u\n", j, info[j]);
  printf("--------end statistics for %u reads (iteration %u)--------\n", lastr,
         iteration);
}


x86 assembly (clang, -O0):
<print_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
ja     116c <print_info+0x5c>
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113b <print_info+0x2b>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%rbx
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%edx
lea    0xf03(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rbx),%edx
mov    %rbp,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0xc(%rbx),%edx
mov    %rbp,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    0x10(%rbx),%edx
mov    %rbp,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x14(%rbx),%edx
mov    %rbp,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x18(%rbx),%edx
mov    %rbp,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %rbp,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    0x20(%rbx),%edx
mov    %rbp,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    0x24(%rbx),%edx
mov    %rbp,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    0x28(%rbx),%edx
mov    %rbp,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    0x2c(%rbx),%edx
mov    %rbp,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
mov    0x30(%rbx),%edx
mov    %rbp,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
mov    0x34(%rbx),%edx
mov    %rbp,%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
mov    0x38(%rbx),%edx
mov    %rbp,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    0x3c(%rbx),%edx
mov    %rbp,%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
mov    0x40(%rbx),%edx
mov    %rbp,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
mov    0x44(%rbx),%edx
mov    %rbp,%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
mov    0x48(%rbx),%edx
mov    %rbp,%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
mov    0x4c(%rbx),%edx
mov    %rbp,%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
mov    0x50(%rbx),%edx
mov    %rbp,%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xdc9(%rip),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"--------statistics for %u reads (iteration %u)--------\0A\00"
@.str.1 = [23 x i8] c"# of %u re-tries = %u\0A\00"
@.str.2 = [60 x i8] c"--------end statistics for %u reads (iteration %u)--------\0A\00"
define void @print_info(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
store i32 0, i32* %7
br label %11
11: ; preds = %22, %3
%12 = load i32, i32* %7
%13 = icmp ule i32 %12, 20
br i1 %13, label %14, label %25
14: ; preds = %11
%15 = load i32, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %7
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %20)
br label %22
22: ; preds = %14
%23 = load i32, i32* %7
%24 = add i32 %23, 1
store i32 %24, i32* %7
br label %11
25: ; preds = %11
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %26, i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"--------statistics for %u reads (iteration %u)--------\0A\00"
@.str.1 = [23 x i8] c"# of %u re-tries = %u\0A\00"
@.str.2 = [60 x i8] c"--------end statistics for %u reads (iteration %u)--------\0A\00"
define void @print_info(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%5 = load i32, i32* %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %11)
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %14)
%16 = getelementptr inbounds i32, i32* %0, i64 4
%17 = load i32, i32* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %17)
%19 = getelementptr inbounds i32, i32* %0, i64 5
%20 = load i32, i32* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %20)
%22 = getelementptr inbounds i32, i32* %0, i64 6
%23 = load i32, i32* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %23)
%25 = getelementptr inbounds i32, i32* %0, i64 7
%26 = load i32, i32* %25
%27 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 %26)
%28 = getelementptr inbounds i32, i32* %0, i64 8
%29 = load i32, i32* %28
%30 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %29)
%31 = getelementptr inbounds i32, i32* %0, i64 9
%32 = load i32, i32* %31
%33 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 %32)
%34 = getelementptr inbounds i32, i32* %0, i64 10
%35 = load i32, i32* %34
%36 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %35)
%37 = getelementptr inbounds i32, i32* %0, i64 11
%38 = load i32, i32* %37
%39 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %38)
%40 = getelementptr inbounds i32, i32* %0, i64 12
%41 = load i32, i32* %40
%42 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 %41)
%43 = getelementptr inbounds i32, i32* %0, i64 13
%44 = load i32, i32* %43
%45 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 13, i32 %44)
%46 = getelementptr inbounds i32, i32* %0, i64 14
%47 = load i32, i32* %46
%48 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %47)
%49 = getelementptr inbounds i32, i32* %0, i64 15
%50 = load i32, i32* %49
%51 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 15, i32 %50)
%52 = getelementptr inbounds i32, i32* %0, i64 16
%53 = load i32, i32* %52
%54 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 16, i32 %53)
%55 = getelementptr inbounds i32, i32* %0, i64 17
%56 = load i32, i32* %55
%57 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 17, i32 %56)
%58 = getelementptr inbounds i32, i32* %0, i64 18
%59 = load i32, i32* %58
%60 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 %59)
%61 = getelementptr inbounds i32, i32* %0, i64 19
%62 = load i32, i32* %61
%63 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 19, i32 %62)
%64 = getelementptr inbounds i32, i32* %0, i64 20
%65 = load i32, i32* %64
%66 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %65)
%67 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %2)
ret void
}