#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 *, float, ...);
float foo_float(float i, float j) {
  printf("foo_float: i: %g, address: %p\n", i, &i);
  printf("foo_float: j: %g, address: %p\n", j, &j);
  float ret = i * j;
  printf("foo_float: ret: %g\n", ret);
  return ret;
}


x86 assembly (clang, -O0):
<foo_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed2(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_float>:
sub    $0x18,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
lea    0xed3(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x10(%rsp),%rsi
movss  0xc(%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"foo_float: i: %g, address: %p\0A\00"
@.str.1 = [31 x i8] c"foo_float: j: %g, address: %p\0A\00"
@.str.2 = [20 x i8] c"foo_float: ret: %g\0A\00"
define float @foo_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %6, float* %3)
%8 = load float, float* %4
%9 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), float %8, float* %4)
%10 = load float, float* %3
%11 = load float, float* %4
%12 = fmul float %10, %11
store float %12, float* %5
%13 = load float, float* %5
%14 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float %13)
%15 = load float, float* %5
ret float %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"foo_float: i: %g, address: %p\0A\00"
@.str.1 = [31 x i8] c"foo_float: j: %g, address: %p\0A\00"
@.str.2 = [20 x i8] c"foo_float: ret: %g\0A\00"
define float @foo_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %0, float* %3)
%6 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), float %1, float* %4)
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float %9)
ret float %9
}