#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 *strlen(char *);
int main() {
  char c = 'A';
  char s1[100] = "A";
  char s2[100] = {'A', '\0', 'B'};
  char s3[100] = {'A', 'b', 'e', 'l', 'h', 'a', '\0'};
  char s4[100] = "Abelha";
  printf("%c\n", c);
  printf("%s\n", s1);
  printf("%s\n", s2);
  printf("%s\n", s3);
  printf("%s\n", s4);
  printf("%zu\n", strlen(s1));
  printf("%zu\n", strlen(s2));
  printf("%zu\n", strlen(s3));
  printf("%zu\n", strlen(s4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x41,-0x70(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x41,-0xe0(%rbp)
movb   $0x42,-0xde(%rbp)
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x41,-0x150(%rbp)
movb   $0x62,-0x14f(%rbp)
movb   $0x65,-0x14e(%rbp)
movb   $0x6c,-0x14d(%rbp)
movb   $0x68,-0x14c(%rbp)
movb   $0x61,-0x14b(%rbp)
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x41,-0x1c0(%rbp)
movb   $0x62,-0x1bf(%rbp)
movb   $0x65,-0x1be(%rbp)
movb   $0x6c,-0x1bd(%rbp)
movb   $0x68,-0x1bc(%rbp)
movb   $0x61,-0x1bb(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rsi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1c0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xd46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1b8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movl   $0x0,0x1b0(%rsp)
movb   $0x41,0x150(%rsp)
41
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movl   $0x0,0x140(%rsp)
movb   $0x41,0xe0(%rsp)
41
movb   $0x42,0xe2(%rsp)
42
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movl   $0x0,0xd0(%rsp)
movl   $0x6c656241,0x70(%rsp)
6c
movw   $0x6168,0x74(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x60(%rsp)
movl   $0x6c656241,(%rsp)
movw   $0x6168,0x4(%rsp)
lea    0xdb0(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x150(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe0(%rsp),%r12
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0x70(%rsp),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xd61(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x1b8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [5 x i8] c"%zu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
store i32 0, i32* %1
store i8 65, i8* %2
%7 = bitcast [100 x i8]* %3 to i8*
%8 = bitcast i8* %7 to [100 x i8]*
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 0
store i8 65, i8* %9
%10 = bitcast [100 x i8]* %4 to i8*
%11 = bitcast i8* %10 to <{ i8, i8, i8, [97 x i8] }>*
%12 = getelementptr inbounds <{ i8, i8, i8, [97 x i8] }>, <{ i8, i8, i8, [97 x i8] }>* %11, i32 0, i32 0
store i8 65, i8* %12
%13 = getelementptr inbounds <{ i8, i8, i8, [97 x i8] }>, <{ i8, i8, i8, [97 x i8] }>* %11, i32 0, i32 2
store i8 66, i8* %13
%14 = bitcast [100 x i8]* %5 to i8*
%15 = bitcast i8* %14 to <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>*
%16 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 0
store i8 65, i8* %16
%17 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 1
store i8 98, i8* %17
%18 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 2
store i8 101, i8* %18
%19 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 3
store i8 108, i8* %19
%20 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 4
store i8 104, i8* %20
%21 = getelementptr inbounds <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [94 x i8] }>* %15, i32 0, i32 5
store i8 97, i8* %21
%22 = bitcast [100 x i8]* %6 to i8*
%23 = bitcast i8* %22 to [100 x i8]*
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 0
store i8 65, i8* %24
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 1
store i8 98, i8* %25
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 2
store i8 101, i8* %26
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 3
store i8 108, i8* %27
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 4
store i8 104, i8* %28
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i32 0, i32 5
store i8 97, i8* %29
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %35)
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %37)
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %39)
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%42 = call i8* @strlen(i8* %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %42)
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%45 = call i8* @strlen(i8* %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %45)
%47 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%48 = call i8* @strlen(i8* %47)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %48)
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%51 = call i8* @strlen(i8* %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %51)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
@.str.2 = [5 x i8] c"%zu\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
store i8 65, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8 65, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 2
store i8 66, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
store i8 65, i8* %8
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 1
store i8 98, i8* %9
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 2
store i8 101, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 3
store i8 108, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 4
store i8 104, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 5
store i8 97, i8* %13
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
store i8 65, i8* %14
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 1
store i8 98, i8* %15
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 2
store i8 101, i8* %16
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 3
store i8 108, i8* %17
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 4
store i8 104, i8* %18
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 5
store i8 97, i8* %19
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 65)
%21 = call i32 @puts(i8* %5)
%22 = call i32 @puts(i8* %6)
%23 = call i32 @puts(i8* %8)
%24 = call i32 @puts(i8* %14)
%25 = call i8* @strlen(i8* %5)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%27 = call i8* @strlen(i8* %6)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = call i8* @strlen(i8* %8)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = call i8* @strlen(i8* %14)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %31)
ret i32 0
}