#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*/ func1();
int /*<<< orphan*/ func2();
int /*<<< orphan*/ printf(char *, char, char *);
int main() {
  char p1 = 0;
  char p2 = 0;
  char p3 = 0;
  char p4 = 0;
  printf("main  p1: val->%c   address->%p\n", p1, &p1);
  printf("main  p2: val->%c   address->%p\n", p2, &p2);
  printf("main  p3: val->%c   address->%p\n", p3, &p3);
  printf("main  p4: val->%c   address->%p\n", p4, &p4);
  func1();
  func2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movb   $0x0,-0x6(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x0,-0x8(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x5(%rbp),%rdx
movsbl -0x5(%rbp),%esi
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x6(%rbp),%rdx
movsbl -0x6(%rbp),%esi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x7(%rbp),%rdx
movsbl -0x7(%rbp),%esi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rdx
movsbl -0x8(%rbp),%esi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <func1@plt>
mov    $0x0,%al
call   1050 <func2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x7(%rsp)
movb   $0x0,0x6(%rsp)
movb   $0x0,0x5(%rsp)
movb   $0x0,0x4(%rsp)
lea    0xeb4(%rip),%rdi
lea    0x7(%rsp),%rdx
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
lea    0x6(%rsp),%rdx
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0x5(%rsp),%rdx
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rdx
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <func1@plt>
xor    %eax,%eax
call   1050 <func2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"main p1: val->%c address->%p\0A\00"
@.str.1 = [33 x i8] c"main p2: val->%c address->%p\0A\00"
@.str.2 = [33 x i8] c"main p3: val->%c address->%p\0A\00"
@.str.3 = [33 x i8] c"main p4: val->%c address->%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
store i8 0, i8* %3
store i8 0, i8* %4
store i8 0, i8* %5
%6 = load i8, i8* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8* %2)
%8 = load i8, i8* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8 signext %8, i8* %3)
%10 = load i8, i8* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8 signext %10, i8* %4)
%12 = load i8, i8* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8 signext %12, i8* %5)
%14 = call i32 (...) @func1()
%15 = call i32 (...) @func2()
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"main p1: val->%c address->%p\0A\00"
@.str.1 = [33 x i8] c"main p2: val->%c address->%p\0A\00"
@.str.2 = [33 x i8] c"main p3: val->%c address->%p\0A\00"
@.str.3 = [33 x i8] c"main p4: val->%c address->%p\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 0, i8* %1
store i8 0, i8* %2
store i8 0, i8* %3
store i8 0, i8* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8 signext 0, i8* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8 signext 0, i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8 signext 0, i8* %3)
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8 signext 0, i8* %4)
%9 = call i32 (...) @func1()
%10 = call i32 (...) @func2()
ret i32 0
}