#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 */
char *fmt_f32(float);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void print_inputs(float a, float b, float c) {
  char *a_fmt, *b_fmt, *c_fmt;
  a_fmt = fmt_f32(a);
  b_fmt = fmt_f32(b);
  c_fmt = fmt_f32(c);
  printf("op : %s * %s + %s\n", a_fmt, b_fmt, c_fmt);
  free(a_fmt);
  free(b_fmt);
  free(c_fmt);
}


x86 assembly (clang, -O0):
<print_inputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <fmt_f32@plt>
mov    %rax,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <fmt_f32@plt>
mov    %rax,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
call   1050 <fmt_f32@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_inputs>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
call   1050 <fmt_f32@plt>
mov    %rax,%r14
movss  0x8(%rsp),%xmm0
call   1050 <fmt_f32@plt>
mov    %rax,%r15
movss  0xc(%rsp),%xmm0
call   1050 <fmt_f32@plt>
mov    %rax,%rbx
lea    0xe90(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"op : %s * %s + %s\0A\00"
define void @print_inputs(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%10 = load float, float* %4
%11 = call i8* @fmt_f32(float %10)
store i8* %11, i8** %7
%12 = load float, float* %5
%13 = call i8* @fmt_f32(float %12)
store i8* %13, i8** %8
%14 = load float, float* %6
%15 = call i8* @fmt_f32(float %14)
store i8* %15, i8** %9
%16 = load i8*, i8** %7
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17, i8* %18)
%20 = load i8*, i8** %7
%21 = call i32 @free(i8* %20)
%22 = load i8*, i8** %8
%23 = call i32 @free(i8* %22)
%24 = load i8*, i8** %9
%25 = call i32 @free(i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"op : %s * %s + %s\0A\00"
define void @print_inputs(float %0, float %1, float %2) {
%4 = tail call i8* @fmt_f32(float %0)
%5 = tail call i8* @fmt_f32(float %1)
%6 = tail call i8* @fmt_f32(float %2)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = tail call i32 @free(i8* %4)
%9 = tail call i32 @free(i8* %5)
%10 = tail call i32 @free(i8* %6)
ret void
}