#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*/ FE_ALL_EXCEPT;
float __builtin_fmaf(float, float, float);
int /*<<< orphan*/ feclearexcept(int /*<<< orphan*/);
int /*<<< orphan*/ print_inputs(float, float, float);
int /*<<< orphan*/ print_result(float, int, int);
void do_madds(float a, float b, float c, int j, int k) {
  float r;
  print_inputs(a, b, c);
  feclearexcept(FE_ALL_EXCEPT);
  r = __builtin_fmaf(a, b, c);
  print_result(r, j, k);
}


x86 assembly (clang, -O0):
<do_madds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <print_inputs@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1060 <feclearexcept@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1050 <fmaf@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <print_result@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_madds>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <print_inputs@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1060 <feclearexcept@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
call   1050 <fmaf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x18,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print_result@plt>

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define void @do_madds(float %0, float %1, float %2, i32 %3, i32 %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load float, float* %6
%13 = load float, float* %7
%14 = load float, float* %8
%15 = call i32 @print_inputs(float %12, float %13, float %14)
%16 = load i32, i32* @FE_ALL_EXCEPT
%17 = call i32 @feclearexcept(i32 %16)
%18 = load float, float* %6
%19 = load float, float* %7
%20 = load float, float* %8
%21 = call float @llvm.fma.f32(float %18, float %19, float %20)
store float %21, float* %11
%22 = load float, float* %11
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = call i32 @print_result(float %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define void @do_madds(float %0, float %1, float %2, i32 %3, i32 %4) {
%6 = tail call i32 @print_inputs(float %0, float %1, float %2)
%7 = load i32, i32* @FE_ALL_EXCEPT
%8 = tail call i32 @feclearexcept(i32 %7)
%9 = tail call float @llvm.fma.f32(float %0, float %1, float %2)
%10 = tail call i32 @print_result(float %9, i32 %3, i32 %4)
ret void
}