#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 *, ...);
void func(void) {
  int li, *lptr1 = &li;
  char lc, *lptr2 = &lc;
  float lf, *lptr3 = &lf;
  double ld, *lptr4 = &ld;
  printf("func(): &li:%p\n", &lptr1);
  printf("func(): &lc:%p\n", &lptr2);
  printf("func(): &lf:%p\n", &lptr3);
  printf("func(): &ld:%p\n", &lptr4);
  printf("\n");
  return;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    0xec1(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
sub    $0x38,%rsp
lea    0x2c(%rsp),%rax
mov    %rax,0x20(%rsp)
lea    0x7(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x28(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0x30(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0xead(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeaa(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"func(): &li:%p\0A\00"
@.str.1 = [16 x i8] c"func(): &lc:%p\0A\00"
@.str.2 = [16 x i8] c"func(): &lf:%p\0A\00"
@.str.3 = [16 x i8] c"func(): &ld:%p\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @func() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8*
%5 = alloca float
%6 = alloca float*
%7 = alloca double
%8 = alloca double*
store i32* %1, i32** %2
store i8* %3, i8** %4
store float* %5, float** %6
store double* %7, double** %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32** %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), float** %6)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double** %8)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"func(): &li:%p\0A\00"
@.str.1 = [16 x i8] c"func(): &lc:%p\0A\00"
@.str.2 = [16 x i8] c"func(): &lf:%p\0A\00"
@.str.3 = [16 x i8] c"func(): &ld:%p\0A\00"
define void @func() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8*
%5 = alloca float
%6 = alloca float*
%7 = alloca double
%8 = alloca double*
%9 = bitcast i32* %1 to i8*
%10 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%11 = bitcast i8** %4 to i8*
store i8* %3, i8** %4
%12 = bitcast float* %5 to i8*
%13 = bitcast float** %6 to i8*
store float* %5, float** %6
%14 = bitcast double* %7 to i8*
%15 = bitcast double** %8 to i8*
store double* %7, double** %8
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32** %2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), float** %6)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double** %8)
%20 = call i32 @putchar(i32 10)
ret void
}