#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
main() {
  float num1;
  float num2;
  float *ptr1;
  float *ptr2;
  num1 = 0.5;
  num2 = 1.5;
  ptr1 = &num1;
  ptr2 = &num2;
  printf("%.2f and %p\n", num1, &num1);
  printf("%.2f and %p\n", num2, &num2);
  printf("%p and %p\n", &ptr1, &ptr2);
  printf("%p and %p\n", ptr1, ptr2);
  printf("%.2f and %.2f", *ptr1, *ptr2);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea6(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8b(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe4d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movl   $0x3f000000,0x24(%rsp)
3f
movl   $0x3fc00000,0xc(%rsp)
3f
lea    0x24(%rsp),%rsi
mov    %rsi,0x18(%rsp)
lea    0xc(%rsp),%r14
mov    %r14,0x10(%rsp)
lea    0xeb6(%rip),%rbx
movsd  0xea6(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rbx
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x18(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x18(%rsp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x10(%rsp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe55(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%.2f and %p\0A\00"
@.str.1 = [11 x i8] c"%p and %p\0A\00"
@.str.2 = [14 x i8] c"%.2f and %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float*
%4 = alloca float*
store float 5.000000e-01, float* %1
store float 1.500000e+00, float* %2
store float* %1, float** %3
store float* %2, float** %4
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %6, float* %1)
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %9, float* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float** %3, float** %4)
%12 = load float*, float** %3
%13 = load float*, float** %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float* %12, float* %13)
%15 = load float*, float** %3
%16 = load float, float* %15
%17 = fpext float %16 to double
%18 = load float*, float** %4
%19 = load float, float* %18
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %17, double %20)
%22 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%.2f and %p\0A\00"
@.str.1 = [11 x i8] c"%p and %p\0A\00"
@.str.2 = [14 x i8] c"%.2f and %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float*
%4 = alloca float*
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float** %3 to i8*
%8 = bitcast float** %4 to i8*
store float 5.000000e-01, float* %1
store float 1.500000e+00, float* %2
store float* %1, float** %3
store float* %2, float** %4
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 5.000000e-01, float* %1)
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %11, float* %2)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float** %3, float** %4)
%14 = load float*, float** %3
%15 = load float*, float** %4
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float* %14, float* %15)
%17 = load float*, float** %3
%18 = load float, float* %17
%19 = fpext float %18 to double
%20 = load float*, float** %4
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %19, double %22)
%24 = call i32 (...) @getchar()
ret i32 0
}