#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 */
typedef int /*<<< orphan*/ mpf_t;

/* Variables and functions */
int /*<<< orphan*/ b_sub_s(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/, unsigned int,
                           int, double);
int /*<<< orphan*/ mpf_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpf_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpf_set_d(int /*<<< orphan*/, double);
void b_sub_s_d(mpf_t re_b, mpf_t im_b, double fre_s, double fim_s,
               unsigned int prec, int nterms, double eps) {
  mpf_t re_s, im_s;
  mpf_init(re_s);
  mpf_init(im_s);
  mpf_set_d(re_s, fre_s);
  mpf_set_d(im_s, fim_s);
  b_sub_s(re_b, im_b, re_s, im_s, prec, nterms, eps);
  mpf_clear(re_s);
  mpf_clear(im_s);
}


x86 assembly (clang, -O0):
<b_sub_s_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
mov    -0x2c(%rbp),%edi
call   1030 <mpf_init@plt>
mov    -0x30(%rbp),%edi
call   1030 <mpf_init@plt>
mov    -0x2c(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1050 <mpf_set_d@plt>
mov    -0x30(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
call   1050 <mpf_set_d@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
movsd  -0x28(%rbp),%xmm0
call   1060 <b_sub_s@plt>
mov    -0x2c(%rbp),%edi
call   1040 <mpf_clear@plt>
mov    -0x30(%rbp),%edi
call   1040 <mpf_clear@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_sub_s_d>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
mov    %ecx,%r14d
mov    %edx,%r15d
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <mpf_init@plt>
call   1030 <mpf_init@plt>
movsd  (%rsp),%xmm0
call   1050 <mpf_set_d@plt>
movsd  0x8(%rsp),%xmm0
call   1050 <mpf_set_d@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%r8d
mov    %r14d,%r9d
movsd  0x10(%rsp),%xmm0
call   1060 <b_sub_s@plt>
call   1040 <mpf_clear@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mpf_clear@plt>

LLVM IR (-O0):
define void @b_sub_s_d(i32 %0, i32 %1, double %2, double %3, i32 %4, i32 %5, double %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store double %2, double* %10
store double %3, double* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store double %6, double* %14
%17 = load i32, i32* %15
%18 = call i32 @mpf_init(i32 %17)
%19 = load i32, i32* %16
%20 = call i32 @mpf_init(i32 %19)
%21 = load i32, i32* %15
%22 = load double, double* %10
%23 = call i32 @mpf_set_d(i32 %21, double %22)
%24 = load i32, i32* %16
%25 = load double, double* %11
%26 = call i32 @mpf_set_d(i32 %24, double %25)
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = load i32, i32* %15
%30 = load i32, i32* %16
%31 = load i32, i32* %12
%32 = load i32, i32* %13
%33 = load double, double* %14
%34 = call i32 @b_sub_s(i32 %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, double %33)
%35 = load i32, i32* %15
%36 = call i32 @mpf_clear(i32 %35)
%37 = load i32, i32* %16
%38 = call i32 @mpf_clear(i32 %37)
ret void
}

LLVM IR (-O2):
define void @b_sub_s_d(i32 %0, i32 %1, double %2, double %3, i32 %4, i32 %5, double %6) {
%8 = tail call i32 @mpf_init(i32 undef)
%9 = tail call i32 @mpf_init(i32 undef)
%10 = tail call i32 @mpf_set_d(i32 undef, double %2)
%11 = tail call i32 @mpf_set_d(i32 undef, double %3)
%12 = tail call i32 @b_sub_s(i32 %0, i32 %1, i32 undef, i32 undef, i32 %4, i32 %5, double %6)
%13 = tail call i32 @mpf_clear(i32 undef)
%14 = tail call i32 @mpf_clear(i32 undef)
ret void
}