// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/errmod.c
// Function: errmod_init
errmod_t *errmod_init(double depcorr)
{
    errmod_t *em;
    em = (errmod_t*)calloc(1, sizeof(errmod_t));
    if (!em) return NULL;
    em->depcorr = depcorr;
    cal_coef(em, depcorr, 0.03);
    return em;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm0, 0x8(%rsp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x15e90
movq %rax, %r15
testq %rax, %rax
je 0x21614
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r15)
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x15e90
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x21614
movq %rax, %r14
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%r14)
movsd 0xa8d82(%rip), %xmm0    # 0xca0b0
subsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x1, %ebx
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x16470
mulsd 0xa9d87(%rip), %xmm0    # 0xcb0e0
addsd 0xa9d87(%rip), %xmm0    # 0xcb0e8
movsd %xmm0, (%r14,%rbx,8)
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0x2133f
movl $0x400000, %edi         # imm = 0x400000
movl $0x8, %esi
callq 0x15e90
movq %rax, 0x10(%r15)
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x21614
movl $0x10000, %edi          # imm = 0x10000
movl $0x8, %esi
callq 0x15e90
testq %rax, %rax
je 0x21614
movq %rax, %r14
movq %r15, 0x20(%rsp)
movl $0x1, %eax
movl $0x2, %ebx
movl %eax, %r15d
leal 0x1(%r15), %eax
movl %eax, 0x18(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x14f70
movsd %xmm0, 0x10(%rsp)
movl %r15d, %r12d
shll $0x8, %r12d
movl $0x2, %r13d
leal -0x1(%r13), %ebp
orl %r12d, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
callq 0x14f70
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
callq 0x14f70
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rbp,8)
incl %r13d
decl %r15d
jne 0x213e8
incl %ebx
cmpl $0x101, %ebx            # imm = 0x101
movl 0x18(%rsp), %eax
jne 0x213be
movl $0x1, %ebx
movl %ebx, %eax
negl %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0xa8dbd(%rip), %xmm0    # 0xca218
divsd %xmm0, %xmm1
callq 0x16470
movsd %xmm0, 0x8(%rsp)
callq 0x14d80
movsd %xmm0, 0x10(%rsp)
movsd 0xa8c33(%rip), %xmm0    # 0xca0b0
subsd 0x8(%rsp), %xmm0
callq 0x14d80
movsd 0x10(%rsp), %xmm2
movapd %xmm0, %xmm3
movq %rbx, 0x30(%rsp)
shlq $0x13, %rbx
addq 0x28(%rsp), %rbx
movq %rbx, 0x38(%rsp)
xorl %ebx, %ebx
movl $0x1, %r13d
movsd %xmm0, 0x18(%rsp)
movq %r13, %r15
shlq $0x8, %r15
movq %r13, %r12
shlq $0xb, %r12
movq %r15, %rax
xorps %xmm4, %xmm4
cvtsi2sd %r13d, %xmm4
orq %r13, %rax
mulsd %xmm2, %xmm4
addsd (%r14,%rax,8), %xmm4
addq 0x38(%rsp), %r12
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, (%r12,%r13,8)
movl $0x1, %ebp
movq %rbx, 0x40(%rsp)
movsd %xmm4, 0x8(%rsp)
movl %ebx, %eax
orl %r15d, %eax
cltq
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
mulsd %xmm2, %xmm1
addsd (%r14,%rax,8), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
subsd %xmm4, %xmm0
callq 0x14420
callq 0x145a0
movsd 0x18(%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
addsd %xmm1, %xmm0
subsd %xmm0, %xmm1
mulsd 0xa9b9d(%rip), %xmm1    # 0xcb0f0
movl %ebx, %eax
movsd %xmm1, (%r12,%rax,8)
leaq -0x1(%rbx), %rax
incq %rbx
incl %ebp
movapd %xmm0, %xmm4
cmpq $0x1, %rbx
movq %rax, %rbx
jg 0x214f6
incq %r13
movq 0x40(%rsp), %rbx
incq %rbx
cmpq $0x100, %r13            # imm = 0x100
jne 0x214b3
movq 0x30(%rsp), %rbx
incq %rbx
cmpq $0x40, %rbx
jne 0x21448
movl $0x10000, %edi          # imm = 0x10000
movl $0x8, %esi
callq 0x15e90
movq 0x20(%rsp), %r15
movq %rax, 0x18(%r15)
testq %rax, %rax
je 0x2160c
xorl %ecx, %ecx
movapd 0xa9b4e(%rip), %xmm0    # 0xcb110
movl $0x800, %edx            # imm = 0x800
movq %r14, %rsi
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
xorl %edi, %edi
movupd (%rsi,%rdi,8), %xmm2
movapd %xmm1, %xmm3
mulpd %xmm0, %xmm3
addpd %xmm2, %xmm3
movupd %xmm3, (%rax,%rdi,8)
addq $0x2, %rdi
cmpq $0x100, %rdi            # imm = 0x100
jne 0x215d7
incq %rcx
addq %rdx, %rax
addq %rdx, %rsi
cmpq $0x100, %rcx            # imm = 0x100
jne 0x215ca
movq %r14, %rdi
callq 0x14dd0
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq