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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ test(char *, char *);
int main(int argc, char *argv[]) {
  char s6[] = "hello", *s7 = "hello";
  printf("sizeof(s6 = %ld) strlen(s6)= %ld  sizeof(s7)=%ld strlen(s7) = %ld\n",
         sizeof(s6), strlen(s6), sizeof(s7), strlen(s7));
  test(s6, s7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    0xea6(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x16(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x24(%rbp),%edx
mov    %eax,%r8d
lea    0xe86(%rip),%rdi
mov    $0x6,%esi
mov    $0x8,%ecx
call   1040 <printf@plt>
lea    -0x16(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <test@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movw   $0x6f,0xc(%rsp)
movl   $0x6c6c6568,0x8(%rsp)
6c
lea    0xeb2(%rip),%r14
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0xe9a(%rip),%rdi
mov    $0x6,%esi
mov    %ebp,%edx
mov    $0x8,%ecx
mov    %eax,%r8d
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.s6 = [6 x i8] c"hello\00"
@.str = [6 x i8] c"hello\00"
@.str.1 = [67 x i8] c"sizeof(s6 = %ld) strlen(s6)= %ld sizeof(s7)=%ld strlen(s7) = %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [6 x i8]
%6 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [6 x i8]* %5 to i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %9, i32 8, i32 %11)
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%14 = load i8*, i8** %6
%15 = call i32 @test(i8* %13, i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [67 x i8] c"sizeof(s6 = %ld) strlen(s6)= %ld sizeof(s7)=%ld strlen(s7) = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %5, i32 8, i32 %6)
%8 = call i32 @test(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}