#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 *, char);
int /*<<< orphan*/ putchar(char);
int main(int argc, char *argv[]) {
  int e, ee;
  for (e = 0; e < argc; ++e) {
    printf("argc = [%d]\n\t", e);
    for (ee = 0; argv[e][ee] != '\0'; ++ee) {
      printf("[%c]", argv[e][ee]);
    }
    putchar('\n');
  }
  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)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c5 <main+0xa5>
mov    -0x14(%rbp),%eax
lea    0xead(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11ad <main+0x8d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
lea    0xe78(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1162 <main+0x42>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    119e <main+0x7e>
mov    %rsi,%r13
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xec2(%rip),%r14
lea    0xec9(%rip),%r15
jmp    1163 <main+0x43>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r12,%rbx
je     119e <main+0x7e>
movsbl %bl,%esi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
mov    (%rax),%al
test   %al,%al
je     1150 <main+0x30>
mov    $0x1,%ebp
xchg   %ax,%ax
movsbl %al,%esi
mov    %r15,%rdi
call   1040 <printf@plt>
mov    0x0(%r13,%rbx,8),%rax
movzbl (%rax,%rbp,1),%eax
add    $0x1,%rbp
test   %al,%al
jne    1180 <main+0x60>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"argc = [%d]\0A\09\00"
@.str.1 = [5 x i8] c"[%c]\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
store i32 0, i32* %6
br label %8
8: ; preds = %44, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %47
12: ; preds = %8
%13 = load i32, i32* %6
%14 = trunc i32 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %14)
store i32 0, i32* %7
br label %16
16: ; preds = %39, %12
%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 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %42
28: ; preds = %16
%29 = load i8**, i8*** %5
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %37)
br label %39
39: ; preds = %28
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %16
42: ; preds = %16
%43 = call i32 @putchar(i8 signext 10)
br label %44
44: ; preds = %42
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %8
47: ; preds = %8
ret i32 0
}

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