int main(int argc, char **argv) {
  int i;
  printf("argc: %d, &argc: 0x%08x, argv: 0x%08x, &argv: 0x%08x\n", argc, &argc,
         argv, &argv);
  for (i = 0; i < argc; i++) {
    printf("len(argv[%d]) = %2d, &(argv[%d]) = %08x, argv[%d] = %s\n", i,
           strlen(argv[i]), i, (unsigned int)(argv[i]), i, (char *)argv[i]);
  }
  char s[80];
  printf("Press Enter: ");
  ureadline((char *)s, 80, 0);
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
lea    0xe99(%rip),%rdi
lea    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%r8
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e8 <main+0xa8>
mov    -0x14(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    -0x74(%rbp),%esi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    %eax,%r8d
mov    -0x14(%rbp),%r9d
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
lea    0xe67(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117d <main+0x3d>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x50,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1050 <ureadline@plt>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%rcx
mov    %edi,%esi
mov    %edi,0x14(%rsp)
mov    %rcx,0x18(%rsp)
lea    0xe92(%rip),%rdi
lea    0x14(%rsp),%rdx
lea    0x18(%rsp),%r8
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x14(%rsp)
jle    11ca <main+0x7a>
lea    0xea9(%rip),%r14
xor    %ebx,%ebx
nop
mov    0x18(%rsp),%rax
mov    (%rax,%rbx,8),%r15
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %r15,(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %rax,%rdx
mov    %ebx,%ecx
mov    %r15d,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x14(%rsp),%rax
cmp    %rax,%rbx
jl     1190 <main+0x40>
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x20(%rsp),%rdi
mov    $0x50,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1060 <ureadline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"argc: %d, &argc: 0x%08x, argv: 0x%08x, &argv: 0x%08x\0A\00"
@.str.1 = [56 x i8] c"len(argv[%d]) = %2d, &(argv[%d]) = %08x, argv[%d] = %s\0A\00"
@.str.2 = [14 x i8] c"Press Enter: \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [80 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %8, i32* %4, i8** %9, i8*** %5)
store i32 0, i32* %6
br label %11
11: ; preds = %37, %2
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %40
15: ; preds = %11
%16 = load i32, i32* %6
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = call i64 @strlen(i8* %21)
%23 = load i32, i32* %6
%24 = load i8**, i8*** %5
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = ptrtoint i8* %28 to i32
%30 = load i32, i32* %6
%31 = load i8**, i8*** %5
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %16, i64 %22, i32 %23, i32 %29, i32 %30, i8* %35)
br label %37
37: ; preds = %15
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %11
40: ; preds = %11
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%42 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%43 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ureadline to i32 (i8*, i32, i32, ...)*)(i8* %42, i32 80, i32 0)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"argc: %d, &argc: 0x%08x, argv: 0x%08x, &argv: 0x%08x\0A\00"
@.str.1 = [56 x i8] c"len(argv[%d]) = %2d, &(argv[%d]) = %08x, argv[%d] = %s\0A\00"
@.str.2 = [14 x i8] c"Press Enter: \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [80 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0, i32* %3, i8** %1, i8*** %4)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %2, %9
%10 = phi i64 [ %19, %9 ], [ 0, %2 ]
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 %10
%13 = load i8*, i8** %12
%14 = call i64 @strlen(i8* dereferenceable(1) %13)
%15 = ptrtoint i8* %13 to i64
%16 = trunc i64 %15 to i32
%17 = trunc i64 %10 to i32
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %17, i64 %14, i32 %17, i32 %16, i32 %17, i8* %13)
%19 = add nuw nsw i64 %10, 1
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = icmp slt i64 %19, %21
br i1 %22, label %9, label %23
23: ; preds = %9, %2
%24 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ureadline to i32 (i8*, i32, i32, ...)*)(i8* %24, i32 80, i32 0)
%27 = call i32 @putchar(i32 10)
unreachable
}