#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 pow(int, int);
double a(int g, int k, int j, double mu, int N0) {
  return (k - 2 * j - (N0 * pow(2, g) - j) * mu) / (mu * (1 - mu));
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   %ecx,%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe6b(%rip),%xmm2
subsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebp
movsd  %xmm0,0x10(%rsp)
mov    %edx,%ebx
mov    %edi,%eax
sub    %ebx,%esi
sub    %ebx,%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <pow@plt>
imul   %ebp,%eax
sub    %ebx,%eax
cvtsi2sd %eax,%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
subsd  %xmm2,%xmm0
movsd  0xe9c(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @a(i32 %0, i32 %1, i32 %2, double %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double %3, double* %9
store i32 %4, i32* %10
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 %11, %13
%15 = sitofp i32 %14 to double
%16 = load i32, i32* %10
%17 = load i32, i32* %6
%18 = call i32 @pow(i32 2, i32 %17)
%19 = mul nsw i32 %16, %18
%20 = load i32, i32* %8
%21 = sub nsw i32 %19, %20
%22 = sitofp i32 %21 to double
%23 = load double, double* %9
%24 = fneg double %22
%25 = call double @llvm.fmuladd.f64(double %24, double %23, double %15)
%26 = load double, double* %9
%27 = load double, double* %9
%28 = fsub double 1.000000e+00, %27
%29 = fmul double %26, %28
%30 = fdiv double %25, %29
ret double %30
}

LLVM IR (-O2):
define double @a(i32 %0, i32 %1, i32 %2, double %3, i32 %4) {
%6 = mul i32 %2, -2
%7 = add i32 %6, %1
%8 = sitofp i32 %7 to double
%9 = tail call i32 @pow(i32 2, i32 %0)
%10 = mul nsw i32 %9, %4
%11 = sub nsw i32 %10, %2
%12 = sitofp i32 %11 to double
%13 = fneg double %12
%14 = tail call double @llvm.fmuladd.f64(double %13, double %3, double %8)
%15 = fsub double 1.000000e+00, %3
%16 = fmul double %15, %3
%17 = fdiv double %14, %16
ret double %17
}