#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 log(double);
double cvd_male_raw(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) {
  double a;
  double bmi_1;
  double Iethrisk[10] = {0,
                         0,
                         0.4035656542786645300000000,
                         0.7159343574607238700000000,
                         0.7588068966921870400000000,
                         0.2778257996405138500000000,
                         -0.3383277413537653700000000,
                         -0.3626891973109574500000000,
                         -0.2406220118164148500000000,
                         -0.1055741084408314400000000};
  double Ismoke[5] = {0, 0.1655389770495527800000000,
                      0.3227167436634277900000000, 0.4393091679622852500000000,
                      0.5830168090609184600000000};
  double dbmi = bmi;
  dbmi = dbmi / 10;
  bmi_1 = log(dbmi);
  bmi_1 = bmi_1 - 0.967572152614594;
  rati = rati - 4.439734935760498;
  sbp = sbp - 133.265686035156250;
  town = town - -0.164980158209801;
  a = 0;
  a += Iethrisk[ethrisk];
  a += Ismoke[smoke_cat];
  a += bmi_1 * 0.4325953310683352500000000;
  a += rati * 0.1616093175199347100000000;
  a += sbp * 0.0051706475575211365000000;
  a += town * 0.0118372789415412600000000;
  a += b_AF * 0.4871573476846625100000000;
  a += b_ra * 0.3165460738113234400000000;
  a += b_renal * 0.4665323499934942400000000;
  a += b_treatedhyp * 0.3146452536778831000000000;
  a += b_type2 * 0.4700445024972483300000000;
  a += fh_cvd * 0.6101222792348441900000000;
  return a;
}


x86 assembly (clang, -O0):
<cvd_male_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xf29(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0xe7f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
call   1050 <log@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xe4c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xe2e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe10(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdf2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movslq -0x24(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movslq 0x18(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd99(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd72(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd4b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd24(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xcfd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xcd6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xcaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xc88(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xc61(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl 0x10(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xc3a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvd_male_raw>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %r9d,%ebp
mov    %r8d,0x4(%rsp)
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%r13d
mov    %edi,%ebx
movslq 0x88(%rsp),%r14
xorps  %xmm1,%xmm1
movaps %xmm1,0x20(%rsp)
movaps 0xea6(%rip),%xmm1
movups %xmm1,0x28(%rsp)
movapd 0xea9(%rip),%xmm1
movupd %xmm1,0x38(%rsp)
divsd  0xeab(%rip),%xmm0
call   1030 <log@plt>
addsd  0xea6(%rip),%xmm0
movsd  0x8(%rsp),%xmm4
addsd  0xea0(%rip),%xmm4
movsd  0x10(%rsp),%xmm2
addsd  0xe9a(%rip),%xmm2
movsd  0x18(%rsp),%xmm3
addsd  0xe94(%rip),%xmm3
movslq %ebp,%rax
lea    0xeea(%rip),%rcx
xorpd  %xmm1,%xmm1
addsd  (%rcx,%rax,8),%xmm1
addsd  0x20(%rsp,%r14,8),%xmm1
mulsd  0xe7a(%rip),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm4,%xmm1
mulsd  0xe72(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0xe6e(%rip),%xmm2
movapd %xmm3,%xmm1
mulsd  0xe6a(%rip),%xmm1
addsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
mulsd  0xe5b(%rip),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %r13d,%xmm2
addsd  %xmm1,%xmm0
mulsd  0xe4f(%rip),%xmm2
addsd  %xmm2,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
mulsd  0xe43(%rip),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %r15d,%xmm2
mulsd  0xe3b(%rip),%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x4(%rsp),%xmm1
mulsd  0xe2a(%rip),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sdl 0x80(%rsp),%xmm2
addsd  %xmm1,%xmm0
mulsd  0xe1a(%rip),%xmm2
addsd  %xmm2,%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.cvd_male_raw.Iethrisk = [10 x double] [double 0.000000e+00, double 0.000000e+00, double 0x3FD9D40509BA9AF0, double 0x3FE6E8EF2B6C0CF7, double 0x3FE8482566A8B5D0, double 0x3FD1C7E5DCDC3A41, double 0xBFD5A729661C69FD, double 0xBFD7364CC0440911, double 0xBFCECCB3BBB98048, double 0xBFBB06E79F0EC74D]
define double @cvd_male_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) {
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca [10 x double]
%28 = alloca [5 x double]
%29 = alloca double
store i32 %0, i32* %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store double %5, double* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store double %8, double* %21
store double %9, double* %22
store i32 %10, i32* %23
store double %11, double* %24
%30 = bitcast [10 x double]* %27 to i8*
%31 = bitcast [5 x double]* %28 to i8*
%32 = bitcast i8* %31 to [5 x double]*
%33 = getelementptr inbounds [5 x double], [5 x double]* %32, i32 0, i32 1
store double 0x3FC5306196521058, double* %33
%34 = getelementptr inbounds [5 x double], [5 x double]* %32, i32 0, i32 2
store double 0x3FD4A76420F9FC85, double* %34
%35 = getelementptr inbounds [5 x double], [5 x double]* %32, i32 0, i32 3
store double 0x3FDC1DA4334EC87A, double* %35
%36 = getelementptr inbounds [5 x double], [5 x double]* %32, i32 0, i32 4
store double 0x3FE2A812DDFDEAE0, double* %36
%37 = load double, double* %18
store double %37, double* %29
%38 = load double, double* %29
%39 = fdiv double %38, 1.000000e+01
store double %39, double* %29
%40 = load double, double* %29
%41 = call double @log(double %40)
store double %41, double* %26
%42 = load double, double* %26
%43 = fsub double %42, 0x3FEEF659E0000004
store double %43, double* %26
%44 = load double, double* %21
%45 = fsub double %44, 0x4011C249E0000000
store double %45, double* %21
%46 = load double, double* %22
%47 = fsub double %46, 0x4060A88080000000
store double %47, double* %22
%48 = load double, double* %24
%49 = fsub double %48, 0xBFC51E11E000000A
store double %49, double* %24
store double 0.000000e+00, double* %25
%50 = load i32, i32* %19
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x double], [10 x double]* %27, i64 0, i64 %51
%53 = load double, double* %52
%54 = load double, double* %25
%55 = fadd double %54, %53
store double %55, double* %25
%56 = load i32, i32* %23
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [5 x double], [5 x double]* %28, i64 0, i64 %57
%59 = load double, double* %58
%60 = load double, double* %25
%61 = fadd double %60, %59
store double %61, double* %25
%62 = load double, double* %26
%63 = load double, double* %25
%64 = call double @llvm.fmuladd.f64(double %62, double 0x3FDBAFA453D5CF8C, double %63)
store double %64, double* %25
%65 = load double, double* %21
%66 = load double, double* %25
%67 = call double @llvm.fmuladd.f64(double %65, double 0x3FC4AF9D36BD0E51, double %66)
store double %67, double* %25
%68 = load double, double* %22
%69 = load double, double* %25
%70 = call double @llvm.fmuladd.f64(double %68, double 0x3F752DD1228A045B, double %69)
store double %70, double* %25
%71 = load double, double* %24
%72 = load double, double* %25
%73 = call double @llvm.fmuladd.f64(double %71, double 0x3F883E24AF6B9EEB, double %72)
store double %73, double* %25
%74 = load i32, i32* %13
%75 = sitofp i32 %74 to double
%76 = load double, double* %25
%77 = call double @llvm.fmuladd.f64(double %75, double 0x3FDF2D960313F355, double %76)
store double %77, double* %25
%78 = load i32, i32* %14
%79 = sitofp i32 %78 to double
%80 = load double, double* %25
%81 = call double @llvm.fmuladd.f64(double %79, double 0x3FD4424A76AC98F7, double %80)
store double %81, double* %25
%82 = load i32, i32* %15
%83 = sitofp i32 %82 to double
%84 = load double, double* %25
%85 = call double @llvm.fmuladd.f64(double %83, double 0x3FDDDBAA806FE09A, double %84)
store double %85, double* %25
%86 = load i32, i32* %16
%87 = sitofp i32 %86 to double
%88 = load double, double* %25
%89 = call double @llvm.fmuladd.f64(double %87, double 0x3FD42325D898D726, double %88)
store double %89, double* %25
%90 = load i32, i32* %17
%91 = sitofp i32 %90 to double
%92 = load double, double* %25
%93 = call double @llvm.fmuladd.f64(double %91, double 0x3FDE15358978FA37, double %92)
store double %93, double* %25
%94 = load i32, i32* %20
%95 = sitofp i32 %94 to double
%96 = load double, double* %25
%97 = call double @llvm.fmuladd.f64(double %95, double 0x3FE3861F287BFD04, double %96)
store double %97, double* %25
%98 = load double, double* %25
ret double %98
}

LLVM IR (-O2):
@__const.cvd_male_raw.Iethrisk = [10 x double] [double 0.000000e+00, double 0.000000e+00, double 0x3FD9D40509BA9AF0, double 0x3FE6E8EF2B6C0CF7, double 0x3FE8482566A8B5D0, double 0x3FD1C7E5DCDC3A41, double 0xBFD5A729661C69FD, double 0xBFD7364CC0440911, double 0xBFCECCB3BBB98048, double 0xBFBB06E79F0EC74D]
define double @cvd_male_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) {
%13 = alloca [5 x double]
%14 = bitcast [5 x double]* %13 to i8*
%15 = getelementptr inbounds [5 x double], [5 x double]* %13, i64 0, i64 1
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 0x3FC5306196521058, double 0x3FD4A76420F9FC85>, <2 x double>* %16
%17 = getelementptr inbounds [5 x double], [5 x double]* %13, i64 0, i64 3
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 0x3FDC1DA4334EC87A, double 0x3FE2A812DDFDEAE0>, <2 x double>* %18
%19 = fdiv double %5, 1.000000e+01
%20 = tail call double @log(double %19)
%21 = fadd double %20, 0xBFEEF659E0000004
%22 = fadd double %8, 0xC011C249E0000000
%23 = fadd double %9, 0xC060A88080000000
%24 = fadd double %11, 0x3FC51E11E000000A
%25 = sext i32 %6 to i64
%26 = getelementptr inbounds [10 x double], [10 x double]* @__const.cvd_male_raw.Iethrisk, i64 0, i64 %25
%27 = load double, double* %26
%28 = fadd double %27, 0.000000e+00
%29 = sext i32 %10 to i64
%30 = getelementptr inbounds [5 x double], [5 x double]* %13, i64 0, i64 %29
%31 = load double, double* %30
%32 = fadd double %28, %31
%33 = tail call double @llvm.fmuladd.f64(double %21, double 0x3FDBAFA453D5CF8C, double %32)
%34 = tail call double @llvm.fmuladd.f64(double %22, double 0x3FC4AF9D36BD0E51, double %33)
%35 = tail call double @llvm.fmuladd.f64(double %23, double 0x3F752DD1228A045B, double %34)
%36 = tail call double @llvm.fmuladd.f64(double %24, double 0x3F883E24AF6B9EEB, double %35)
%37 = sitofp i32 %0 to double
%38 = tail call double @llvm.fmuladd.f64(double %37, double 0x3FDF2D960313F355, double %36)
%39 = sitofp i32 %1 to double
%40 = tail call double @llvm.fmuladd.f64(double %39, double 0x3FD4424A76AC98F7, double %38)
%41 = sitofp i32 %2 to double
%42 = tail call double @llvm.fmuladd.f64(double %41, double 0x3FDDDBAA806FE09A, double %40)
%43 = sitofp i32 %3 to double
%44 = tail call double @llvm.fmuladd.f64(double %43, double 0x3FD42325D898D726, double %42)
%45 = sitofp i32 %4 to double
%46 = tail call double @llvm.fmuladd.f64(double %45, double 0x3FDE15358978FA37, double %44)
%47 = sitofp i32 %7 to double
%48 = tail call double @llvm.fmuladd.f64(double %47, double 0x3FE3861F287BFD04, double %46)
ret double %48
}