// File: /workspace/github_c_makefile_star2_O1/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 0x16c73
movq %rdi, %rbx
movsd 0x1d8e5(%rip), %xmm3    # 0x34008
ucomisd %xmm2, %xmm3
jbe 0x169c0
movsd 0x2ba53(%rip), %xmm0    # 0x42188
ucomisd %xmm2, %xmm0
jne 0x16741
jnp 0x167e8
subsd %xmm2, %xmm3
movapd %xmm3, 0x10(%rsp)
movsd %xmm3, 0x2d015(%rip)    # 0x43768
movapd 0x1d965(%rip), %xmm0    # 0x340c0
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, 0x2cfe6(%rip)    # 0x43770
movsd 0x1d8e6(%rip), %xmm0    # 0x34078
divsd 0x2cfce(%rip), %xmm0    # 0x43768
movsd (%rsp), %xmm1
callq 0x20c0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x2cfc6(%rip)    # 0x43778
movsd 0x2cfae(%rip), %xmm0    # 0x43768
movsd %xmm0, 0x10(%rsp)
callq 0x2160
movsd (%rsp), %xmm2
movsd 0x1d836(%rip), %xmm3    # 0x34008
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x2cfa0(%rip)    # 0x43780
movsd %xmm2, 0x2b9a0(%rip)    # 0x42188
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 0x1d7d3(%rip), %xmm0    # 0x34028
movsd 0x2cf13(%rip), %xmm2    # 0x43770
ucomisd %xmm2, %xmm0
jbe 0x168c5
movsd 0x2cefd(%rip), %xmm1    # 0x43768
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 0x2cecb(%rip), %xmm0    # 0x43768
movsd %xmm0, 0x10(%rsp)
movapd %xmm1, (%rsp)
movapd %xmm1, %xmm0
callq 0x2160
movapd %xmm0, %xmm2
mulsd 0x10(%rsp), %xmm2
subsd 0x2cebd(%rip), %xmm2    # 0x43780
jmp 0x168fd
ucomisd 0x2ceab(%rip), %xmm0    # 0x43778
jbe 0x16a8b
movsd 0x2ce8d(%rip), %xmm1    # 0x43768
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 0x1d6d6(%rip), %xmm0    # 0x34028
ucomisd 0x1d6e6(%rip), %xmm0    # 0x34040
jbe 0x16c7d
movsd 0x1d6a0(%rip), %xmm3    # 0x34008
movapd %xmm3, %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jb 0x16c7d
movapd %xmm2, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jae 0x16800
movsd %xmm2, 0x10(%rsp)
callq 0x2160
movsd 0x1d665(%rip), %xmm3    # 0x34008
xorpd 0x1d715(%rip), %xmm0    # 0x340c0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x16800
jmp 0x16c7d
ucomisd 0x1d640(%rip), %xmm2    # 0x34008
jbe 0x16a1d
movsd 0x2cdc6(%rip), %xmm0    # 0x43798
ucomisd %xmm2, %xmm0
jne 0x169de
jnp 0x16ab8
movsd 0x1d662(%rip), %xmm1    # 0x34048
addsd %xmm2, %xmm1
movsd 0x1d65e(%rip), %xmm0    # 0x34050
mulsd %xmm2, %xmm0
addsd 0x1d65a(%rip), %xmm0    # 0x34058
movsd %xmm1, 0x2cd82(%rip)    # 0x43788
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x16a99
sqrtsd %xmm0, %xmm0
jmp 0x16aa8
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 0x1d5ac(%rip), %xmm0    # 0x34028
callq 0x2160
xorpd 0x1d637(%rip), %xmm0    # 0x340c0
jmp 0x16a8f
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
jmp 0x16c7d
movsd %xmm2, (%rsp)
callq 0x22c0
movsd (%rsp), %xmm2
movsd %xmm0, 0x2cce0(%rip)    # 0x43790
movsd %xmm2, 0x2cce0(%rip)    # 0x43798
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 0x1d50d(%rip), %xmm3    # 0x34028
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
movapd %xmm3, %xmm2
subsd %xmm0, %xmm2
addsd 0x1d52d(%rip), %xmm3    # 0x34060
mulsd 0x2cc55(%rip), %xmm3    # 0x43790
ucomisd %xmm1, %xmm2
jb 0x16b4a
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x16b6d
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 0x2cc0f(%rip), %xmm0    # 0x43788
addsd %xmm3, %xmm0
movapd %xmm0, (%rsp)
ucomisd %xmm0, %xmm1
jae 0x16ac6
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 0x1d447(%rip), %xmm1    # 0x34028
movapd %xmm1, %xmm0
mulsd 0x1d47b(%rip), %xmm0    # 0x34068
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 0x1d45a(%rip), %xmm2    # 0x34070
mulsd %xmm3, %xmm2
addsd %xmm4, %xmm2
ucomisd %xmm1, %xmm2
ja 0x16c7d
movsd %xmm3, 0x10(%rsp)
callq 0x2160
movsd %xmm0, 0x28(%rsp)
movsd 0x2cb4b(%rip), %xmm1    # 0x43788
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 0x16ac6
jmp 0x16c7d
movapd %xmm0, (%rsp)
callq 0x542b
movaps (%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
retq