#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 *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i <= 10; i++) {
    printf("argv[%d] = %s\n", i, argv[i]);
  }
  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)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     1160 <main+0x50>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rsi),%rdx
lea    0xedf(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x10(%rbx),%rdx
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0x18(%rbx),%rdx
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    0x20(%rbx),%rdx
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x28(%rbx),%rdx
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x30(%rbx),%rdx
mov    %r14,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    0x38(%rbx),%rdx
mov    %r14,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    0x40(%rbx),%rdx
mov    %r14,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    0x48(%rbx),%rdx
mov    %r14,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    0x50(%rbx),%rdx
mov    %r14,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"argv[%d] = %s\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
store i32 0, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = icmp sle i32 %8, 10
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %6
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i8* %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 4
%15 = load i8*, i8** %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4, i8* %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 5
%18 = load i8*, i8** %17
%19 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i8* %18)
%20 = getelementptr inbounds i8*, i8** %1, i64 6
%21 = load i8*, i8** %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 6, i8* %21)
%23 = getelementptr inbounds i8*, i8** %1, i64 7
%24 = load i8*, i8** %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 7, i8* %24)
%26 = getelementptr inbounds i8*, i8** %1, i64 8
%27 = load i8*, i8** %26
%28 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 8, i8* %27)
%29 = getelementptr inbounds i8*, i8** %1, i64 9
%30 = load i8*, i8** %29
%31 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 9, i8* %30)
%32 = getelementptr inbounds i8*, i8** %1, i64 10
%33 = load i8*, i8** %32
%34 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i8* %33)
ret i32 0
}