// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x30, %rsp
movapd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
jae 0x13782
movq %rdi, %rbx
movsd 0xbcd1(%rip), %xmm1     # 0x1f0b0
ucomisd %xmm2, %xmm1
jbe 0x135d8
movsd 0x1cd97(%rip), %xmm0    # 0x30188
ucomisd %xmm2, %xmm0
jne 0x133fd
jnp 0x134a4
subsd %xmm2, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd %xmm1, 0x1e359(%rip)    # 0x31768
movapd 0xbc39(%rip), %xmm0     # 0x1f050
xorpd %xmm1, %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, 0x1e32a(%rip)    # 0x31770
movsd 0xbcd2(%rip), %xmm0     # 0x1f120
divsd 0x1e312(%rip), %xmm0    # 0x31768
movsd (%rsp), %xmm1
callq 0x20c0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x1e30a(%rip)    # 0x31778
movsd 0x1e2f2(%rip), %xmm0    # 0x31768
movsd %xmm0, 0x10(%rsp)
callq 0x2160
movsd (%rsp), %xmm2
movsd 0xbc22(%rip), %xmm1     # 0x1f0b0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x1e2e4(%rip)    # 0x31780
movsd %xmm2, 0x1cce4(%rip)    # 0x30188
divsd %xmm2, %xmm1
movsd %xmm1, 0x20(%rsp)
movq %rbx, %rdi
callq 0x10279
movsd 0x1e2b2(%rip), %xmm2    # 0x31770
ucomisd %xmm2, %xmm0
jbe 0x1352a
movsd 0x1e29c(%rip), %xmm1    # 0x31768
movaps %xmm1, (%rsp)
movsd 0xbbd8(%rip), %xmm3     # 0x1f0b0
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 0x1e262(%rip), %xmm0    # 0x31768
movsd %xmm0, 0x10(%rsp)
movapd %xmm1, (%rsp)
movapd %xmm1, %xmm0
callq 0x2160
mulsd 0x10(%rsp), %xmm0
subsd 0x1e258(%rip), %xmm0    # 0x31780
jmp 0x1355e
ucomisd 0x1e246(%rip), %xmm0    # 0x31778
jbe 0x13641
movsd 0x1e228(%rip), %xmm1    # 0x31768
movsd %xmm1, (%rsp)
divsd %xmm2, %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x20c0
mulsd (%rsp), %xmm0
movapd %xmm0, (%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x10279
ucomisd 0xbb6c(%rip), %xmm0     # 0x1f0e0
jbe 0x137a3
movsd 0xbb2e(%rip), %xmm2     # 0x1f0b0
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm3
ucomisd %xmm1, %xmm3
jb 0x137a3
movapd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
jae 0x134ae
movsd %xmm3, 0x10(%rsp)
callq 0x2160
xorpd 0xba8d(%rip), %xmm0     # 0x1f050
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x134ae
jmp 0x137a3
ucomisd 0xbad0(%rip), %xmm2     # 0x1f0b0
jbe 0x1362a
movsd 0x1e1ae(%rip), %xmm0    # 0x31798
ucomisd %xmm2, %xmm0
jne 0x135f2
jnp 0x1366e
movsd 0xbaf6(%rip), %xmm1     # 0x1f0f0
addsd %xmm2, %xmm1
movsd 0xbaf2(%rip), %xmm0     # 0x1f0f8
mulsd %xmm2, %xmm0
addsd 0xbaee(%rip), %xmm0     # 0x1f100
movsd %xmm1, 0x1e16e(%rip)    # 0x31788
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1364f
sqrtsd %xmm0, %xmm0
jmp 0x1365e
movq %rbx, %rdi
callq 0x10279
callq 0x2160
xorpd 0xba11(%rip), %xmm0     # 0x1f050
jmp 0x13645
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
jmp 0x137a3
movsd %xmm2, (%rsp)
callq 0x22c0
movsd (%rsp), %xmm2
movsd %xmm0, 0x1e12a(%rip)    # 0x31790
movsd %xmm2, 0x1e12a(%rip)    # 0x31798
movq %rbx, %rdi
callq 0x10279
movapd %xmm0, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm0
addsd 0xba7a(%rip), %xmm2     # 0x1f108
mulsd 0x1e0fa(%rip), %xmm2    # 0x31790
ucomisd 0xba42(%rip), %xmm0     # 0x1f0e0
xorpd %xmm1, %xmm1
movsd %xmm0, 0x20(%rsp)
jb 0x136b0
sqrtsd %xmm0, %xmm0
jmp 0x136c5
movsd %xmm2, 0x10(%rsp)
callq 0x22c0
movsd 0x10(%rsp), %xmm2
xorpd %xmm1, %xmm1
divsd %xmm0, %xmm2
movsd 0x1e0b7(%rip), %xmm0    # 0x31788
addsd %xmm2, %xmm0
movapd %xmm0, (%rsp)
ucomisd %xmm0, %xmm1
jae 0x1366e
movq %rbx, %rdi
movsd %xmm2, 0x10(%rsp)
callq 0x10279
movsd 0x10(%rsp), %xmm3
movapd %xmm0, %xmm1
mulsd 0xba10(%rip), %xmm0     # 0x1f110
mulsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movapd (%rsp), %xmm4
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm3, %xmm2
mulsd 0xb9e9(%rip), %xmm2     # 0x1f118
mulsd %xmm3, %xmm2
addsd %xmm4, %xmm2
ucomisd %xmm1, %xmm2
ja 0x137a3
callq 0x2160
movsd %xmm0, 0x20(%rsp)
movsd 0x1e038(%rip), %xmm1    # 0x31788
movsd %xmm1, 0x28(%rsp)
movapd (%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x2160
mulsd 0x28(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x1366e
jmp 0x137a3
movapd %xmm0, (%rsp)
movq 0x1c86a(%rip), %rax     # 0x2fff8
movq (%rax), %rcx
leaq 0xd980(%rip), %rdi      # 0x21118
pushq $0x3d
popq %rsi
pushq $0x1
popq %rdx
callq 0x22b0
movaps (%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
retq