#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 */
double cvd_female_raw(int, int, int, int, int, double, int, int, double, double,
                      int, double);
int cvd_female_validation(int, int, int, int, int, double, int, int, double,
                          double, int, double, char *, int);
double cvd_female(int b_AF, int b_ra, int b_renal, int b_treatedhyp,
                  int b_type2, double bmi, int ethrisk, int fh_cvd, double rati,
                  double sbp, int smoke_cat, double town, int *error,
                  char *errorBuf, int errorBufSize) {
  int ok;
  *error = 0;
  ok = cvd_female_validation(b_AF, b_ra, b_renal, b_treatedhyp, b_type2, bmi,
                             ethrisk, fh_cvd, rati, sbp, smoke_cat, town,
                             errorBuf, errorBufSize);
  if (!ok) {
    *error = 1;
    return 0.0;
  }
  return cvd_female_raw(b_AF, b_ra, b_renal, b_treatedhyp, b_type2, bmi,
                        ethrisk, fh_cvd, rati, sbp, smoke_cat, town);
}


x86 assembly (clang, -O0):
<cvd_female>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x78,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
movsd  %xmm3,-0x50(%rbp)
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm0
mov    -0x34(%rbp),%r9d
mov    0x10(%rbp),%ebx
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    0x18(%rbp),%r11d
movsd  -0x50(%rbp),%xmm3
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <cvd_female_validation@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jne    11dc <cvd_female+0xbc>
mov    0x20(%rbp),%rax
movl   $0x1,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    121d <cvd_female+0xfd>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm0
mov    -0x34(%rbp),%r9d
mov    0x10(%rbp),%r10d
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    0x18(%rbp),%eax
movsd  -0x50(%rbp),%xmm3
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <cvd_female_raw@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvd_female>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%r15d
mov    %edi,%ebp
mov    0x70(%rsp),%r14
mov    0x68(%rsp),%r11d
mov    0x60(%rsp),%r10d
mov    0x78(%rsp),%rbx
mov    0x80(%rsp),%eax
movl   $0x0,(%r14)
mov    %r8d,(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %r9d,0x4(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm3,0x20(%rsp)
push   %rax
push   %rbx
push   %r11
push   %r10
call   1030 <cvd_female_validation@plt>
add    $0x20,%rsp
test   %eax,%eax
je     11ce <cvd_female+0xae>
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    (%rsp),%r8d
movsd  0x8(%rsp),%xmm0
mov    0x4(%rsp),%r9d
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <cvd_female_raw@plt>
movl   $0x1,(%r14)
xorps  %xmm0,%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @cvd_female(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i32 %7, double %8, double %9, i32 %10, double %11, i32* %12, i8* %13, i32 %14) {
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca i32
%28 = alloca double
%29 = alloca i32*
%30 = alloca i8*
%31 = alloca i32
%32 = alloca i32
store i32 %0, i32* %17
store i32 %1, i32* %18
store i32 %2, i32* %19
store i32 %3, i32* %20
store i32 %4, i32* %21
store double %5, double* %22
store i32 %6, i32* %23
store i32 %7, i32* %24
store double %8, double* %25
store double %9, double* %26
store i32 %10, i32* %27
store double %11, double* %28
store i32* %12, i32** %29
store i8* %13, i8** %30
store i32 %14, i32* %31
%33 = load i32*, i32** %29
store i32 0, i32* %33
%34 = load i32, i32* %17
%35 = load i32, i32* %18
%36 = load i32, i32* %19
%37 = load i32, i32* %20
%38 = load i32, i32* %21
%39 = load double, double* %22
%40 = load i32, i32* %23
%41 = load i32, i32* %24
%42 = load double, double* %25
%43 = load double, double* %26
%44 = load i32, i32* %27
%45 = load double, double* %28
%46 = load i8*, i8** %30
%47 = load i32, i32* %31
%48 = call i32 @cvd_female_validation(i32 %34, i32 %35, i32 %36, i32 %37, i32 %38, double %39, i32 %40, i32 %41, double %42, double %43, i32 %44, double %45, i8* %46, i32 %47)
store i32 %48, i32* %32
%49 = load i32, i32* %32
%50 = icmp ne i32 %49, 0
br i1 %50, label %53, label %51
51: ; preds = %15
%52 = load i32*, i32** %29
store i32 1, i32* %52
store double 0.000000e+00, double* %16
br label %67
53: ; preds = %15
%54 = load i32, i32* %17
%55 = load i32, i32* %18
%56 = load i32, i32* %19
%57 = load i32, i32* %20
%58 = load i32, i32* %21
%59 = load double, double* %22
%60 = load i32, i32* %23
%61 = load i32, i32* %24
%62 = load double, double* %25
%63 = load double, double* %26
%64 = load i32, i32* %27
%65 = load double, double* %28
%66 = call double @cvd_female_raw(i32 %54, i32 %55, i32 %56, i32 %57, i32 %58, double %59, i32 %60, i32 %61, double %62, double %63, i32 %64, double %65)
store double %66, double* %16
br label %67
67: ; preds = %53, %51
%68 = load double, double* %16
ret double %68
}

LLVM IR (-O2):
define double @cvd_female(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i32 %7, double %8, double %9, i32 %10, double %11, i32* nocapture writeonly %12, i8* %13, i32 %14) {
store i32 0, i32* %12
%16 = tail call i32 @cvd_female_validation(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i32 %7, double %8, double %9, i32 %10, double %11, i8* %13, i32 %14)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 1, i32* %12
br label %21
19: ; preds = %15
%20 = tail call double @cvd_female_raw(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i32 %7, double %8, double %9, i32 %10, double %11)
br label %21
21: ; preds = %19, %18
%22 = phi double [ %20, %19 ], [ 0.000000e+00, %18 ]
ret double %22
}