#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 main(int argc, char **argv) {
  char values[10];
  size_t i;
  values[0] = 'h';
  values[1] = 'e';
  values[2] = 'l';
  values[3] = 'l';
  values[4] = 'o';
  values[5] = '\0';
  printf("The individual characters: [");
  for (i = 0; values[i] != '\0'; i++) {
    printf("'%c', ", values[i]);
  }
  printf("]\n");
  printf("The string: (%s)\n", values);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x68,-0x1a(%rbp)
movb   $0x65,-0x19(%rbp)
movb   $0x6c,-0x18(%rbp)
movb   $0x6c,-0x17(%rbp)
movb   $0x6f,-0x16(%rbp)
movb   $0x0,-0x15(%rbp)
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl -0x1a(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     118e <main+0x7e>
mov    -0x28(%rbp),%rax
movsbl -0x1a(%rbp,%rax,1),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1154 <main+0x44>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1a(%rbp),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x6c6c6568,0xe(%rsp)
6c
lea    0xf(%rsp),%rbx
movw   $0x6f,0x12(%rsp)
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x68,%al
lea    0xecb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1160 <main+0x40>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"The individual characters: [\00"
@.str.1 = [7 x i8] c"'%c', \00"
@.str.2 = [3 x i8] c"]\0A\00"
@.str.3 = [18 x i8] c"The string: (%s)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
store i8 104, i8* %8
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 1
store i8 101, i8* %9
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 2
store i8 108, i8* %10
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 3
store i8 108, i8* %11
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 4
store i8 111, i8* %12
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 5
store i8 0, i8* %13
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %7
br label %15
15: ; preds = %27, %2
%16 = load i64, i64* %7
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %15
%22 = load i64, i64* %7
%23 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %21
%28 = load i64, i64* %7
%29 = add i64 %28, 1
store i64 %29, i64* %7
br label %15
30: ; preds = %15
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"The individual characters: [\00"
@.str.1 = [7 x i8] c"'%c', \00"
@.str.3 = [18 x i8] c"The string: (%s)\0A\00"
@str = [2 x i8] c"]\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
store i8 104, i8* %4
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 1
store i8 101, i8* %5
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 2
store i8 108, i8* %6
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 3
store i8 108, i8* %7
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 4
store i8 111, i8* %8
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 5
store i8 0, i8* %9
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %2, %11
%12 = phi i8 [ %18, %11 ], [ 104, %2 ]
%13 = phi i64 [ %16, %11 ], [ 0, %2 ]
%14 = sext i8 %12 to i32
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = add i64 %13, 1
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %11
20: ; preds = %11
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %4)
ret i32 0
}