#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*/ help(char **);
int /*<<< orphan*/ printf(char *, char *, int);
int strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  if (argc < 2) {
    help(argv);
  }
  int i;
  for (i = 0; i < strtol(argv[2], NULL, 10); i++) {
    printf("%s %d\n", argv[1], i + 1);
  }
  return 0;
}


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   $0x2,-0x8(%rbp)
jge    1159 <main+0x29>
mov    -0x10(%rbp),%rdi
call   1050 <help@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    11b1 <main+0x81>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
cmp    $0x1,%edi
jg     1145 <main+0x15>
mov    %r14,%rdi
call   1050 <help@plt>
mov    0x10(%r14),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
test   %eax,%eax
jle    1195 <main+0x65>
lea    0xe9e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%r14),%rsi
add    $0x1,%ebx
mov    %r15,%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    0x10(%r14),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
cmp    %eax,%ebx
jl     1170 <main+0x40>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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