// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, %r10d
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %rbx
movl %edi, %ebp
movl 0x58(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x50(%rsp), %eax
movq 0x90(%rsi), %rcx
cmpq 0x98(%rsi), %rcx
movl %eax, 0xc(%rsp)
jne 0xb27e
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x98(%rbx)
movq 0xa0(%rbx), %rdi
shlq $0x4, %rsi
movl %r14d, %r12d
movl %r10d, %r14d
callq 0x2260
movl %r14d, %r10d
movl %r12d, %r14d
movq %rax, 0xa0(%rbx)
movq 0x90(%rbx), %rcx
jmp 0xb285
movq 0xa0(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x90(%rbx)
shlq $0x4, %rcx
leaq (%rax,%rcx), %r12
movq 0x14(%r13), %rsi
movq %rsi, (%rax,%rcx)
movb %r14b, 0xd(%rax,%rcx)
movb %r10b, 0xc(%rax,%rcx)
movl 0x10(%r13), %esi
addl %r15d, %esi
movl %esi, 0x8(%rax,%rcx)
movq 0x78(%rbx), %rcx
cmpq 0x80(%rbx), %rcx
movl %r15d, 0x10(%rsp)
jne 0xb317
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0x80(%rbx)
movq 0x88(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rsi
movl %r14d, %r15d
movl %r10d, %r14d
callq 0x2260
movl %r14d, %r10d
movl %r15d, %r14d
movq %rax, 0x88(%rbx)
movq 0x78(%rbx), %rcx
movq 0x90(%rbx), %rdx
movl 0x8(%r12), %esi
jmp 0xb31e
movq 0x88(%rbx), %rax
movl 0xc(%rsp), %r11d
leaq 0x1(%rcx), %rdi
movq %rdi, 0x78(%rbx)
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %r15
movl %esi, 0x10(%r15)
decl %edx
movl %edx, 0x14(%r15)
movq (%r13), %rsi
movq %rsi, (%r15)
movq 0x8(%r13), %rax
movq %rax, 0x8(%r15)
movl 0x1c(%r15), %ecx
movl %r10d, %edi
andl $0x7, %edi
andl $-0x8, %ecx
orl %edi, %ecx
movl %ecx, 0x1c(%r15)
movl 0x18(%r13), %ecx
incl %ecx
movl %ecx, 0x18(%r15)
cmpl $0x0, 0x14(%rsp)
sete %r8b
testl %r11d, %r11d
sete %r9b
orb %r8b, %r9b
jne 0xb387
leal (%rdi,%rcx,8), %edi
movl %edi, 0x1c(%r15)
jmp 0xb39b
movl 0x1c(%r13), %r8d
andl $-0x8, %r8d
orl %edi, %r8d
movl %r8d, 0x1c(%r15)
testl %r11d, %r11d
je 0xb418
movq 0x20(%r13), %r8
shlq $0x10, %r8
movslq 0x18(%r13), %rdi
incq %rdi
orq %r8, %rdi
movq %rdi, 0x20(%r15)
cmpl $0x5, 0x19e18(%rip)     # 0x251d0
jg 0xb41e
movl %r14d, %r12d
addl %ebp, %ebp
movq $-0x1, %rdx
movl %ebp, %ecx
shlq %cl, %rdx
shlq $0x2, %rsi
notq %rdx
andq %rsi, %rdx
orq %r12, %rdx
movl $0x3, %ecx
subl %r14d, %ecx
movslq %ecx, %rsi
addb $-0x2, %bpl
movl %ebp, %ecx
shlq %cl, %rsi
movq %rdx, (%r15)
shrq $0x2, %rax
orq %rax, %rsi
movq %rsi, 0x8(%r15)
movq 0x78(%rbx), %rdi
movq 0x88(%rbx), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7f42
movq 0x20(%r13), %rdi
jmp 0xb3ad
movq 0x19bd3(%rip), %rax     # 0x24ff8
movq (%rax), %rdi
movq %r12, %r9
movl %r14d, %r12d
leaq 0x11fb8(%rip), %rax     # 0x1d3ed
movsbl (%r12,%rax), %r8d
movl %r10d, %eax
leaq 0x12900(%rip), %rsi     # 0x1dd44
movsbl (%rax,%rsi), %r10d
movl 0x8(%r9), %r11d
leaq 0x128c6(%rip), %rsi     # 0x1dd1a
movl 0x10(%rsp), %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x21c0
addq $0x10, %rsp
movq (%r15), %rsi
movq 0x8(%r15), %rax
jmp 0xb3bd