// File: /workspace/github_c_makefile_star2_O3/dapogon[P]cellcoal/src/cellcoal.c
// Function: RandomGamma
double	RandomGamma (double shape, long int *seed)
{
    double gammaNumber = 0;
	
    if (shape <= 0)
        fprintf (stderr, "!!! ERROR: problems with gamma variable generation, shape < 0");
    else if (shape < 1)
        gammaNumber = RandomGamma1 (shape, seed);
    else if (shape > 1)
        gammaNumber = RandomGamma2 (shape, seed);
    else
        gammaNumber = -log (RandomUniform(seed));
	
    return (gammaNumber);
	
	
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movapd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
jae 0x16f1f
movq %rdi, %rbx
movsd 0xc731(%rip), %xmm3     # 0x23100
ucomisd %xmm2, %xmm3
jbe 0x16c6c
movsd 0x1f7a7(%rip), %xmm0    # 0x36188
ucomisd %xmm2, %xmm0
jne 0x169ed
jnp 0x16a94
subsd %xmm2, %xmm3
movapd %xmm3, 0x10(%rsp)
movsd %xmm3, 0x20d69(%rip)    # 0x37768
movapd 0xc639(%rip), %xmm0     # 0x23040
xorpd %xmm3, %xmm0
movsd %xmm2, (%rsp)
callq 0x22d0
mulsd (%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd %xmm1, 0x20d3a(%rip)    # 0x37770
movsd 0xc732(%rip), %xmm0     # 0x23170
divsd 0x20d22(%rip), %xmm0    # 0x37768
movsd (%rsp), %xmm1
callq 0x20c0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20d1a(%rip)    # 0x37778
movsd 0x20d02(%rip), %xmm0    # 0x37768
movsd %xmm0, 0x10(%rsp)
callq 0x2160
movsd (%rsp), %xmm2
movsd 0xc682(%rip), %xmm3     # 0x23100
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20cf4(%rip)    # 0x37780
movsd %xmm2, 0x1f6f4(%rip)    # 0x36188
movapd %xmm3, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, 0x28(%rsp)
movabsq $0x41a705af1fe3fb79, %r14 # imm = 0x41A705AF1FE3FB79
movq (%rbx), %rcx
movq %rcx, %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $0x1f31d, %rdx, %rax    # imm = 0x1F31D
subq %rax, %rcx
imulq $0x41a7, %rcx, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rcx,%rax), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rcx,%rax), %rax
cmovgq %rdx, %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0xc61f(%rip), %xmm0     # 0x23120
movsd 0x20c67(%rip), %xmm2    # 0x37770
ucomisd %xmm2, %xmm0
jbe 0x16b71
movsd 0x20c51(%rip), %xmm1    # 0x37768
movaps %xmm1, (%rsp)
movapd %xmm3, %xmm1
subsd %xmm0, %xmm1
movapd %xmm3, %xmm0
subsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2160
movapd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x20c1f(%rip), %xmm0    # 0x37768
movsd %xmm0, 0x10(%rsp)
movapd %xmm1, (%rsp)
movapd %xmm1, %xmm0
callq 0x2160
movapd %xmm0, %xmm2
mulsd 0x10(%rsp), %xmm2
subsd 0x20c11(%rip), %xmm2    # 0x37780
jmp 0x16ba9
ucomisd 0x20bff(%rip), %xmm0    # 0x37778
jbe 0x16d37
movsd 0x20be1(%rip), %xmm1    # 0x37768
movsd %xmm1, (%rsp)
divsd %xmm2, %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x20c0
movapd %xmm0, %xmm2
mulsd (%rsp), %xmm2
movapd %xmm2, (%rsp)
movq (%rbx), %rcx
movq %rcx, %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $0x1f31d, %rdx, %rax    # imm = 0x1F31D
subq %rax, %rcx
imulq $0x41a7, %rcx, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rcx,%rax), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rcx,%rax), %rax
cmovgq %rdx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rax, (%rbx)
divsd 0xc522(%rip), %xmm0     # 0x23120
ucomisd 0xc532(%rip), %xmm0     # 0x23138
jbe 0x16f29
movsd 0xc4ec(%rip), %xmm3     # 0x23100
movapd %xmm3, %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jb 0x16f29
movapd %xmm2, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jae 0x16aac
movsd %xmm2, 0x10(%rsp)
callq 0x2160
movsd 0xc4b1(%rip), %xmm3     # 0x23100
xorpd 0xc3e9(%rip), %xmm0     # 0x23040
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x16aac
jmp 0x16f29
ucomisd 0xc48c(%rip), %xmm2     # 0x23100
jbe 0x16cc9
movsd 0x20b1a(%rip), %xmm0    # 0x37798
ucomisd %xmm2, %xmm0
jne 0x16c8a
jnp 0x16d64
movsd 0xc4ae(%rip), %xmm1     # 0x23140
addsd %xmm2, %xmm1
movsd 0xc4aa(%rip), %xmm0     # 0x23148
mulsd %xmm2, %xmm0
addsd 0xc4a6(%rip), %xmm0     # 0x23150
movsd %xmm1, 0x20ad6(%rip)    # 0x37788
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x16d45
sqrtsd %xmm0, %xmm0
jmp 0x16d54
movq (%rbx), %rcx
movabsq $0x41a705af1fe3fb79, %rdx # imm = 0x41A705AF1FE3FB79
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $0x1f31d, %rdx, %rax    # imm = 0x1F31D
subq %rax, %rcx
imulq $0x41a7, %rcx, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rcx,%rax), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rcx,%rax), %rax
cmovgq %rdx, %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0xc3f8(%rip), %xmm0     # 0x23120
callq 0x2160
xorpd 0xc30b(%rip), %xmm0     # 0x23040
jmp 0x16d3b
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
jmp 0x16f29
movsd %xmm2, (%rsp)
callq 0x22c0
movsd (%rsp), %xmm2
movsd %xmm0, 0x20a34(%rip)    # 0x37790
movsd %xmm2, 0x20a34(%rip)    # 0x37798
movabsq $0x41a705af1fe3fb79, %r14 # imm = 0x41A705AF1FE3FB79
xorpd %xmm1, %xmm1
movq (%rbx), %rcx
movq %rcx, %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $0x1f31d, %rdx, %rax    # imm = 0x1F31D
subq %rax, %rcx
imulq $0x41a7, %rcx, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rcx,%rax), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rcx,%rax), %rax
cmovgq %rdx, %rax
movq %rax, (%rbx)
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
divsd 0xc359(%rip), %xmm3     # 0x23120
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
movapd %xmm3, %xmm2
subsd %xmm0, %xmm2
addsd 0xc379(%rip), %xmm3     # 0x23158
mulsd 0x209a9(%rip), %xmm3    # 0x37790
ucomisd %xmm1, %xmm2
jb 0x16df6
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x16e19
movapd %xmm2, %xmm0
movsd %xmm3, 0x10(%rsp)
movsd %xmm2, (%rsp)
callq 0x22c0
movsd (%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
xorpd %xmm1, %xmm1
divsd %xmm0, %xmm3
movsd 0x20963(%rip), %xmm0    # 0x37788
addsd %xmm3, %xmm0
movapd %xmm0, (%rsp)
ucomisd %xmm0, %xmm1
jae 0x16d72
movq (%rbx), %rcx
movq %rcx, %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $0x1f31d, %rdx, %rax    # imm = 0x1F31D
subq %rax, %rcx
imulq $0x41a7, %rcx, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rcx,%rax), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rcx,%rax), %rax
cmovgq %rdx, %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movq %rax, (%rbx)
divsd 0xc293(%rip), %xmm1     # 0x23120
movapd %xmm1, %xmm0
mulsd 0xc2c7(%rip), %xmm0     # 0x23160
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
movapd (%rsp), %xmm4
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm3, %xmm2
mulsd 0xc2a6(%rip), %xmm2     # 0x23168
mulsd %xmm3, %xmm2
addsd %xmm4, %xmm2
ucomisd %xmm1, %xmm2
ja 0x16f29
movsd %xmm3, 0x10(%rsp)
callq 0x2160
movsd %xmm0, 0x28(%rsp)
movsd 0x2089f(%rip), %xmm1    # 0x37788
movsd %xmm1, 0x30(%rsp)
movapd (%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x2160
xorpd %xmm1, %xmm1
mulsd 0x30(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x16d72
jmp 0x16f29
movapd %xmm0, (%rsp)
callq 0x5434
movaps (%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
retq