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


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movb   $0x0,-0x3(%rbp)
movb   $0x0,-0x4(%rbp)
lea    0xed1(%rip),%rdi
lea    -0x1(%rbp),%rdx
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x2(%rbp),%rdx
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    -0x3(%rbp),%rdx
movsbl -0x3(%rbp),%esi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
lea    -0x4(%rbp),%rdx
movsbl -0x4(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %rax
movb   $0x0,0x7(%rsp)
movb   $0x0,0x6(%rsp)
movb   $0x0,0x5(%rsp)
movb   $0x0,0x4(%rsp)
lea    0xed4(%rip),%rdi
lea    0x7(%rsp),%rdx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x6(%rsp),%rdx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0x5(%rsp),%rdx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
lea    0x4(%rsp),%rdx
xor    %esi,%esi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"func2 p1: val->%c address->%p\0A\00"
@.str.1 = [33 x i8] c"func2 p2: val->%c address->%p\0A\00"
@.str.2 = [33 x i8] c"func2 p3: val->%c address->%p\0A\00"
@.str.3 = [33 x i8] c"func2 p4: val->%c address->%p\0A\00"
define void @func2() {
%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)
ret void
}