// File: chhylp123[P]hifiasm/inter.cpp
// Function: update_ug_uo_t(void*, long, int)
static void update_ug_uo_t(void *data, long i, int tid)
{
	r_contain_aux *sl = (r_contain_aux *)data; int32_t r;
	ma_hit_t_alloc *src = sl->src, *x; uint32_t k, qn, tn, uv, uw, v, w;
	asg_arc_t *e = &(sl->ug->g->arc[i]), t; 
	uv = e->ul>>32; uw = e->v; e->ou = 0;
	if(sl->ug->u.a[uv>>1].circ || sl->ug->u.a[uw>>1].circ) return;
	v = ((uv&1)?(sl->ug->u.a[uv>>1].start^1):(sl->ug->u.a[uv>>1].end^1));
	w = ((uw&1)?(sl->ug->u.a[uw>>1].end):(sl->ug->u.a[uw>>1].start));
	x = &(src[v>>1]);

	for (k = 0; k < x->length; k++) {
		qn = Get_qn(x->buffer[k]);
		tn = Get_tn(x->buffer[k]);
		if(qn == (v>>1) && tn == (w>>1)) {
			r = ma_hit2arc(&(x->buffer[k]), sl->rg->seq[v>>1].len, sl->rg->seq[w>>1].len,
            							sl->max_hang, asm_opt.max_hang_rate, sl->min_ovlp, &t);
			if(r < 0) continue;
            if((t.ul>>32)!=v || t.v!=w) continue;
			e->ou = (x->buffer[k].cc>OU_MASK?OU_MASK:x->buffer[k].cc);
			break;
		}
	}
	assert(k < x->length);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x48(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x60(%rbp), %rax
movw 0x10(%rax), %cx
andw $0xc000, %cx            # imm = 0xC000
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2faceb
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2facf0
jmp 0x2faf6a
movl -0x48(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2fad20
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x2fad43
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2fad76
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x2fad96
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
movl -0x50(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2faf3d
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
movl -0x50(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x2faf2d
movl -0x44(%rbp), %eax
movl -0x54(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x2faf2d
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl -0x3c(%rbp), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movl -0x54(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
leaq 0xc9983(%rip), %rax     # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %r8d
leaq -0x78(%rbp), %r9
callq 0x287f40
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x2fae9f
jmp 0x2faf2f
movq -0x78(%rbp), %rax
shrq $0x20, %rax
movl -0x50(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2faeb7
movl -0x70(%rbp), %eax
cmpl -0x54(%rbp), %eax
je 0x2faeb9
jmp 0x2faf2f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
cmpl $0x3fff, %eax           # imm = 0x3FFF
jbe 0x2faee8
movl $0x3fff, %eax           # imm = 0x3FFF
movl %eax, -0x84(%rbp)
jmp 0x2faf09
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movw %ax, %dx
movq -0x60(%rbp), %rax
movw 0x10(%rax), %cx
andw $0x3fff, %dx            # imm = 0x3FFF
andw $0xc000, %cx            # imm = 0xC000
orw %dx, %cx
movw %cx, 0x10(%rax)
jmp 0x2faf3d
jmp 0x2faf2f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2fadb9
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2faf4b
jmp 0x2faf6a
leaq 0x9ae6b(%rip), %rdi     # 0x395dbd
leaq 0x958d6(%rip), %rsi     # 0x39082f
movl $0x528a, %edx           # imm = 0x528A
leaq 0x9ae66(%rip), %rcx     # 0x395dcb
callq 0x2130
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)