#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 */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ print_letter(char);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i = 0;
  char *msg = argv[1];
  for (i = 0; i < sizeof(msg) / sizeof(char); i++) {
    printf("%c\t", msg[i]);
    print_letter(msg[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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x8,%rax
jae    11a5 <main+0x85>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <print_letter@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rbx
movsbl (%rbx),%esi
lea    0xebe(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl (%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x1(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x1(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x2(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x2(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x3(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x3(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x4(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x5(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x6(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x6(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x7(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rbx),%edi
call   1050 <print_letter@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c\09\00"
@.str.1 = [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 i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %7
store i32 0, i32* %6
br label %11
11: ; preds = %30, %2
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = icmp ult i64 %13, 8
br i1 %14, label %15, label %33
15: ; preds = %11
%16 = load i8*, i8** %7
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i8*, i8** %7
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
%27 = load i8, i8* %26
%28 = call i32 @print_letter(i8 signext %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %15
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %11
33: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\09\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8, i8* %4
%9 = tail call i32 @print_letter(i8 signext %8)
%10 = tail call i32 @putchar(i32 10)
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i8, i8* %11
%16 = tail call i32 @print_letter(i8 signext %15)
%17 = tail call i32 @putchar(i32 10)
%18 = getelementptr inbounds i8, i8* %4, i64 2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i8, i8* %18
%23 = tail call i32 @print_letter(i8 signext %22)
%24 = tail call i32 @putchar(i32 10)
%25 = getelementptr inbounds i8, i8* %4, i64 3
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = load i8, i8* %25
%30 = tail call i32 @print_letter(i8 signext %29)
%31 = tail call i32 @putchar(i32 10)
%32 = getelementptr inbounds i8, i8* %4, i64 4
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = load i8, i8* %32
%37 = tail call i32 @print_letter(i8 signext %36)
%38 = tail call i32 @putchar(i32 10)
%39 = getelementptr inbounds i8, i8* %4, i64 5
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = load i8, i8* %39
%44 = tail call i32 @print_letter(i8 signext %43)
%45 = tail call i32 @putchar(i32 10)
%46 = getelementptr inbounds i8, i8* %4, i64 6
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %48)
%50 = load i8, i8* %46
%51 = tail call i32 @print_letter(i8 signext %50)
%52 = tail call i32 @putchar(i32 10)
%53 = getelementptr inbounds i8, i8* %4, i64 7
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %55)
%57 = load i8, i8* %53
%58 = tail call i32 @print_letter(i8 signext %57)
%59 = tail call i32 @putchar(i32 10)
ret i32 0
}