// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/correct.c
// Function: update_aux
static inline void update_aux(int k, fmc_aux_t *a, const echeap1_t *p, int b, int state, int penalty, int is_diff, int is_solid)
{
	ecstack1_t *q;
	echeap1_t *r;
	// update the stack
	kv_pushp(ecstack1_t, a->stack, &q);
	q->parent = p->k;
	q->i = p->i;
	q->base = b;
	q->state = state;
	q->penalty = p->penalty + penalty;
	// update the heap
	kv_pushp(echeap1_t, a->heap, &r);
	r->penalty = q->penalty;
	r->k = a->stack.n - 1;
	r->kmer[0] = p->kmer[0], r->kmer[1] = p->kmer[1];
	r->state = state;
	r->i = state == STATE_I? p->i : p->i + 1;
	r->last_solid = is_solid && is_diff? r->i : p->last_solid;
	r->ec_pos4 = is_diff? p->ec_pos4<<16 | (p->i + 1) : p->ec_pos4;
	if (fmc_verbose >= 6)fprintf(stderr, "+> [%d] (%d,%c), ipen=%d, state=%c, w=%d\n", r->k, r->i, "ACGTN"[b], penalty, "NMID"[state], q->penalty);
	if (state != STATE_D) append_to_kmer(k, r->kmer, b);
	ks_heapup_ec(a->heap.n, a->heap.a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x98(%rcx), %rax
jne 0xe195
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0xe14e
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0xe159
movl $0x2, %eax
movq %rax, -0x40(%rbp)
jmp 0xe159
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
shlq $0x4, %rsi
callq 0x2270
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x90(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x90(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0xd(%rax)
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
addl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jne 0xe283
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xe23f
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
shlq %rax
movq %rax, -0x48(%rbp)
jmp 0xe24a
movl $0x2, %eax
movq %rax, -0x48(%rbp)
jmp 0xe24a
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0x28, 0x80(%rax), %rsi
callq 0x2270
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x78(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x78(%rdx)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x20(%rbp), %edx
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x7, %edx
andl $-0x8, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
cmpl $0x2, -0x20(%rbp)
jne 0xe317
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0xe324
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
cmpl $0x0, 0x18(%rbp)
je 0xe346
cmpl $0x0, 0x10(%rbp)
je 0xe346
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0xe353
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
shrl $0x3, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %edx
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1fffffff, %edx       # imm = 0x1FFFFFFF
shll $0x3, %edx
andl $0x7, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
cmpl $0x0, 0x10(%rbp)
je 0xe396
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
shlq $0x10, %rax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0xe3a2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpl $0x6, 0x24e2b(%rip)     # 0x331e0
jl 0xe410
movq 0x24c3a(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movl 0x14(%rax), %edx
movq -0x38(%rbp), %rax
movl 0x18(%rax), %ecx
movslq -0x1c(%rbp), %rsi
leaq 0x1dfc1(%rip), %rax     # 0x2c39b
movsbl (%rax,%rsi), %r8d
movl -0x24(%rbp), %r9d
movslq -0x20(%rbp), %rsi
leaq 0x1e786(%rip), %rax     # 0x2cb74
movsbl (%rax,%rsi), %r10d
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x1e749(%rip), %rsi     # 0x2cb4a
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x21d0
cmpl $0x3, -0x20(%rbp)
je 0xe425
movl -0x4(%rbp), %edi
movq -0x38(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xdc90
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x9f80
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)