#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int, int);
int strlen(char *);
int main(int argc, char **argv) {
  char str1[] = {'T', 'h', 'i', 's', ' ', 'n', 'v', 't'};
  char str2[] = {'T', 'h', 'i', 's', ' ', 's', 't', 'r', '0'};
  char str3[] = {'2', 'n', 'd', ' ', 's', 't', '\0', 'M'};
  char str4[] = {'C', ' ', 'P', ' ', '@', '-', '\0', '1', '8', 'k'};
  char str5[6];
  int len3;
  int len4;
  int len5;
  str5[0] = 'H';
  str5[1] = 'e';
  str5[2] = 'l';
  str5[3] = 'l';
  str5[4] = 'o';
  str5[5] = '\0';
  len3 = strlen(str3);
  len4 = strlen(str4);
  len5 = strlen(str5);
  printf("len3 = %d,len4 = %d,len5 = %d\n", len3, len4, len5);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x21(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x19(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x29(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x33(%rbp)
mov    0xeaf(%rip),%ax
mov    %ax,-0x2b(%rbp)
movb   $0x48,-0x39(%rbp)
movb   $0x65,-0x38(%rbp)
movb   $0x6c,-0x37(%rbp)
movb   $0x6c,-0x36(%rbp)
movb   $0x6f,-0x35(%rbp)
movb   $0x0,-0x34(%rbp)
lea    -0x29(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x40(%rbp)
lea    -0x33(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x44(%rbp)
lea    -0x39(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x48(%rbp)
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x48(%rbp),%ecx
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movabs $0x4d00747320646e32,%rax
mov    %rax,0x20(%rsp)
movabs $0x31002d4020502043,%rax
mov    %rax,0x10(%rsp)
movw   $0x6b38,0x18(%rsp)
movl   $0x6c6c6548,0xa(%rsp)
6c
movw   $0x6f,0xe(%rsp)
lea    0x20(%rsp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
lea    0x10(%rsp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
lea    0xa(%rsp),%rdi
call   1030 <strlen@plt>
lea    0xe87(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.str1 = [8 x i8] c"This nvt"
@__const.main.str2 = [9 x i8] c"This str0"
@__const.main.str3 = [8 x i8] c"2nd st\00M"
@__const.main.str4 = [10 x i8] c"C P @-\0018k"
@.str = [31 x i8] c"len3 = %d,len4 = %d,len5 = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i8]
%7 = alloca [9 x i8]
%8 = alloca [8 x i8]
%9 = alloca [10 x i8]
%10 = alloca [6 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = bitcast [8 x i8]* %6 to i8*
%15 = bitcast [9 x i8]* %7 to i8*
%16 = bitcast [8 x i8]* %8 to i8*
%17 = bitcast [10 x i8]* %9 to i8*
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
store i8 72, i8* %18
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 1
store i8 101, i8* %19
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 2
store i8 108, i8* %20
%21 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 3
store i8 108, i8* %21
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 4
store i8 111, i8* %22
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 5
store i8 0, i8* %23
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
store i32 %25, i32* %11
%26 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%27 = call i32 @strlen(i8* %26)
store i32 %27, i32* %12
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%29 = call i32 @strlen(i8* %28)
store i32 %29, i32* %13
%30 = load i32, i32* %11
%31 = load i32, i32* %12
%32 = load i32, i32* %13
%33 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
%34 = load i32, i32* @EXIT_SUCCESS
ret i32 %34
}

LLVM IR (-O2):
@__const.main.str4 = [10 x i8] c"C P @-\0018k"
@.str = [31 x i8] c"len3 = %d,len4 = %d,len5 = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca [10 x i8]
%5 = alloca [6 x i8]
%6 = bitcast i64* %3 to i8*
store i64 5548562778733964850, i64* %3
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
store i8 72, i8* %8
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 1
store i8 101, i8* %9
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 2
store i8 108, i8* %10
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 3
store i8 108, i8* %11
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 4
store i8 111, i8* %12
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 5
store i8 0, i8* %13
%14 = call i32 @strlen(i8* %6)
%15 = call i32 @strlen(i8* %7)
%16 = call i32 @strlen(i8* %8)
%17 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}