#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 strlen(char *);
int main(int argc, char *argv[]) {
  int i = 0;
  int j = 0;
  int iLen = 0;
  if (argc < 2)
    return 0;
  for (j = 1; j < argc; j++) {
    iLen = strlen(argv[j]);
    for (i = 0; i < iLen; i++) {
      printf(" %c ", argv[j][i]);
    }
    printf("\n");
    for (i = 0; i < iLen; i++) {
      printf("%02x ", argv[j][i]);
    }
    printf("\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)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1161 <main+0x41>
movl   $0x0,-0x4(%rbp)
jmp    123f <main+0x11f>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1238 <main+0x118>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11cb <main+0xab>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118f <main+0x6f>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    121c <main+0xfc>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e0 <main+0xc0>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1168 <main+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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
cmp    $0x2,%edi
jl     1200 <main+0xd0>
mov    %rsi,%r15
mov    %edi,%eax
mov    %rax,(%rsp)
mov    $0x1,%ebp
lea    0xea7(%rip),%r14
jmp    1182 <main+0x52>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    (%rsp),%rbp
je     1200 <main+0xd0>
mov    (%r15,%rbp,8),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1160 <main+0x30>
mov    %eax,%ebx
mov    %eax,%r12d
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbp,8),%rax
movsbl (%rax,%r13,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r13
cmp    %r13,%r12
jne    11a0 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
lea    0xe36(%rip),%r13
jle    116a <main+0x3a>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15,%rbp,8),%rax
movsbl (%rax,%rbx,1),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    11e0 <main+0xb0>
jmp    116a <main+0x3a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %c \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [6 x i8] c"%02x \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %70
12: ; preds = %2
store i32 1, i32* %7
br label %13
13: ; preds = %66, %12
%14 = load i32, i32* %7
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %69
17: ; preds = %13
%18 = load i8**, i8*** %5
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 @strlen(i8* %22)
store i32 %23, i32* %8
store i32 0, i32* %6
br label %24
24: ; preds = %40, %17
%25 = load i32, i32* %6
%26 = load i32, i32* %8
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %43
28: ; preds = %24
%29 = load i8**, i8*** %5
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %28
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 1
store i32 %42, i32* %6
br label %24
43: ; preds = %24
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %45
45: ; preds = %61, %43
%46 = load i32, i32* %6
%47 = load i32, i32* %8
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %64
49: ; preds = %45
%50 = load i8**, i8*** %5
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %54, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %49
%62 = load i32, i32* %6
%63 = add nsw i32 %62, 1
store i32 %63, i32* %6
br label %45
64: ; preds = %45
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %66
66: ; preds = %64
%67 = load i32, i32* %7
%68 = add nsw i32 %67, 1
store i32 %68, i32* %7
br label %13
69: ; preds = %13
store i32 0, i32* %3
br label %70
70: ; preds = %69, %11
%71 = load i32, i32* %3
ret i32 %71
}

LLVM IR (-O2):
@.str = [5 x i8] c" %c \00"
@.str.2 = [6 x i8] c"%02x \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %42
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %38
%7 = phi i64 [ 1, %4 ], [ %40, %38 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @strlen(i8* %9)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %6
%13 = tail call i32 @putchar(i32 10)
br label %38
14: ; preds = %6
%15 = zext i32 %10 to i64
br label %16
16: ; preds = %14, %16
%17 = phi i64 [ 0, %14 ], [ %23, %16 ]
%18 = load i8*, i8** %8
%19 = getelementptr inbounds i8, i8* %18, i64 %17
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = add nuw nsw i64 %17, 1
%24 = icmp eq i64 %23, %15
br i1 %24, label %25, label %16
25: ; preds = %16
%26 = tail call i32 @putchar(i32 10)
br i1 %11, label %27, label %38
27: ; preds = %25
%28 = zext i32 %10 to i64
br label %29
29: ; preds = %27, %29
%30 = phi i64 [ 0, %27 ], [ %36, %29 ]
%31 = load i8*, i8** %8
%32 = getelementptr inbounds i8, i8* %31, i64 %30
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %34)
%36 = add nuw nsw i64 %30, 1
%37 = icmp eq i64 %36, %28
br i1 %37, label %38, label %29
38: ; preds = %29, %12, %25
%39 = tail call i32 @putchar(i32 10)
%40 = add nuw nsw i64 %7, 1
%41 = icmp eq i64 %40, %5
br i1 %41, label %42, label %6
42: ; preds = %38, %2
ret i32 0
}