#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*/ printf(char *, int, ...);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  int i, count;
  if (argc < 3)
    usage(argv[0]);
  count = atoi(argv[2]);
  printf("Repeating %d times..\n", count);
  for (i = 0; i < count; i++)
    printf("%3d - %s\n", i, argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    115c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11b7 <main+0x87>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <main+0x54>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
cmp    $0x2,%edi
jg     1147 <main+0x17>
mov    (%r15),%rdi
call   1040 <usage@plt>
mov    0x10(%r15),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
lea    0xea7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
jle    1187 <main+0x57>
lea    0xea9(%rip),%r14
xor    %ebx,%ebx
nop
mov    0x8(%r15),%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Repeating %d times..\0A\00"
@.str.1 = [10 x i8] c"%3d - %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @usage(i8* %13)
br label %15
15: ; preds = %10, %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = call i32 @atoi(i8* %18)
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %20)
store i32 0, i32* %6
br label %22
22: ; preds = %32, %15
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %35
26: ; preds = %22
%27 = load i32, i32* %6
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %27, i8* %30)
br label %32
32: ; preds = %26
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %22
35: ; preds = %22
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [22 x i8] c"Repeating %d times..\0A\00"
@.str.1 = [10 x i8] c"%3d - %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp sgt i32 %10, 0
br i1 %12, label %13, label %21
13: ; preds = %7
%14 = getelementptr inbounds i8*, i8** %1, i64 1
br label %15
15: ; preds = %13, %15
%16 = phi i32 [ 0, %13 ], [ %19, %15 ]
%17 = load i8*, i8** %14
%18 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %16, i8* %17)
%19 = add nuw nsw i32 %16, 1
%20 = icmp eq i32 %19, %10
br i1 %20, label %21, label %15
21: ; preds = %15, %7
ret i32 0
}