// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: update_ug_arch_ul(void*, long, int)
static void update_ug_arch_ul(void *data, long i, int tid) // callback for kt_for()
{
	const ma_ug_t *ug = (ma_ug_t *)data;
	asg_arc_t *e = &(ug->g->arc[i]); e->ou = 0;
	uint32_t v = e->ul>>32, w = e->v, k, uv, uw;
	uint64_t *a, a_n; uc_block_t *p, *n;
	a = UL_INF.ridx.occ.a + UL_INF.ridx.idx.a[v>>1];
	a_n = UL_INF.ridx.idx.a[(v>>1)+1] - UL_INF.ridx.idx.a[v>>1]; 
	for (k = 0; k < a_n; k++) {
		p = &(UL_INF.a[a[k]>>32].bb.a[(uint32_t)(a[k])]);
		if(p->base || (!p->el) || (!p->pchain)) continue;
		uv = (((uint32_t)(p->hid))<<1)|((uint32_t)(p->rev));
		if((uv == v) && (p->aidx != (uint32_t)-1)) {
			n = &(UL_INF.a[a[k]>>32].bb.a[p->aidx]);
			assert((!n->base)&&(n->el)&&(n->pchain)&&(n->pidx==((uint32_t)(a[k]))));
			uw = (((uint32_t)(n->hid))<<1)|((uint32_t)(n->rev));
			if(uw == w) e->ou++;
		}

		if(((uv^1) == v) && (p->pidx != (uint32_t)-1)) {
			n = &(UL_INF.a[a[k]>>32].bb.a[p->pidx]);
			// if(!((!n->base)&&(n->el)&&(n->pchain)&&(n->aidx==((uint32_t)(a[k]))))) {
			// 	fprintf(stderr, "ulid->%ld, n->base::%u, n->el::%u, n->pchain::%u, n->aidx::%u, ((uint32_t)(a[k]))::%u\n", 
			// 	i, n->base, n->el, n->pchain, n->aidx, ((uint32_t)(a[k])));
			// }
			assert((!n->base)&&(n->el)&&(n->pchain)&&(n->aidx==((uint32_t)(a[k]))));
			uw = (((uint32_t)(n->hid))<<1)|((uint32_t)(n->rev)); uw ^= 1;
			if(uw == w) e->ou++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq 0x8(%rax), %r8
leaq (%rsi,%rsi,2), %r9
movzwl 0x10(%r8,%r9,8), %eax
andl $0xc000, %eax           # imm = 0xC000
movw %ax, 0x10(%r8,%r9,8)
movq (%r8,%r9,8), %rcx
leaq 0xb55f6(%rip), %rdx     # 0x296318
movq 0x28(%rdx), %rdi
movq %rcx, %r10
shrq $0x21, %r10
movl (%rdi,%r10,4), %esi
movl 0x4(%rdi,%r10,4), %edi
subl %esi, %edi
je 0x1e0eb6
leaq (%r8,%r9,8), %r8
shrq $0x20, %rcx
movq %r8, (%rsp)
movl 0x8(%r8), %r9d
shlq $0x3, %rsi
addq 0x40(%rdx), %rsi
xorl %r10d, %r10d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movq 0x48(%rdx), %rbx
movq (%rsi,%r10,8), %r14
movq %r14, %r15
shrq $0x20, %r15
imulq $0x58, %r15, %r15
movq 0x30(%rbx,%r15), %r15
movl %r14d, %ebx
leaq (%rbx,%rbx,8), %rbx
movzbl 0x20(%r15,%rbx,4), %r12d
movl %r12d, %ebp
andb $-0x40, %bpl
negb %bpl
setno %bpl
testb $0x1f, %r12b
sete %r13b
orb %bpl, %r13b
jne 0x1e0eaa
leaq (%r15,%rbx,4), %rbx
movl (%rbx), %r13d
shrl $0x5, %r12d
andl $0x1, %r12d
leal (%r12,%r13,2), %ebp
cmpl %ecx, %ebp
jne 0x1e0e28
movl 0x1c(%rbx), %r12d
cmpq %r11, %r12
je 0x1e0e28
leaq (%r12,%r12,8), %r13
movzbl 0x20(%r15,%r13,4), %r12d
movl %r12d, %r8d
andb $-0x40, %r8b
negb %r8b
jno 0x1e0ec5
movl %r12d, %r8d
andb $0x1f, %r8b
je 0x1e0ec5
leaq (%r15,%r13,4), %r15
cmpl %r14d, 0x14(%r15)
jne 0x1e0ec5
movl (%r15), %r8d
shrl $0x5, %r12d
andl $0x1, %r12d
leal (%r12,%r8,2), %r8d
cmpl %r9d, %r8d
jne 0x1e0e28
leal 0x1(%rax), %r8d
andl $0x3fff, %r8d           # imm = 0x3FFF
andl $0xffffc000, %eax       # imm = 0xFFFFC000
orl %r8d, %eax
movq (%rsp), %r8
movw %ax, 0x10(%r8)
xorl %ecx, %ebp
cmpl $0x1, %ebp
jne 0x1e0eaa
movl 0x14(%rbx), %ebx
cmpq %r11, %rbx
je 0x1e0eaa
movq 0x48(%rdx), %r8
movq (%rsi,%r10,8), %r14
movq %r14, %r15
shrq $0x20, %r15
imulq $0x58, %r15, %r15
movq 0x30(%r8,%r15), %r15
leaq (%rbx,%rbx,8), %r12
movzbl 0x20(%r15,%r12,4), %ebx
movl %ebx, %r8d
andb $-0x40, %r8b
negb %r8b
jno 0x1e0ee4
movl %ebx, %r8d
andb $0x1f, %r8b
je 0x1e0ee4
leaq (%r15,%r12,4), %r15
cmpl %r14d, 0x1c(%r15)
jne 0x1e0ee4
movl (%r15), %r8d
shrl $0x5, %ebx
andl $0x1, %ebx
leal (%rbx,%r8,2), %r8d
xorl %r9d, %r8d
cmpl $0x1, %r8d
jne 0x1e0eaa
leal 0x1(%rax), %r8d
andl $0x3fff, %r8d           # imm = 0x3FFF
andl $0xffffc000, %eax       # imm = 0xFFFFC000
orl %r8d, %eax
movq (%rsp), %r8
movw %ax, 0x10(%r8)
incq %r10
cmpq %r10, %rdi
jne 0x1e0d5f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x64020(%rip), %rdi     # 0x244eec
leaq 0x5ed88(%rip), %rsi     # 0x23fc5b
leaq 0x64052(%rip), %rcx     # 0x244f2c
movl $0x4cab, %edx           # imm = 0x4CAB
callq 0x2110
leaq 0x6406b(%rip), %rdi     # 0x244f56
leaq 0x5ed69(%rip), %rsi     # 0x23fc5b
leaq 0x64033(%rip), %rcx     # 0x244f2c
movl $0x4cb6, %edx           # imm = 0x4CB6
callq 0x2110