// File: /workspace/github_cpp_makefile_star2_O2/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), %rdi
imulq $0x18, %rsi, %rsi
leaq (%rdi,%rsi), %rax
movq %rax, (%rsp)
movzwl 0x10(%rdi,%rsi), %ecx
andl $0xc000, %ecx           # imm = 0xC000
movw %cx, 0x10(%rdi,%rsi)
movq (%rdi,%rsi), %r8
movq %r8, %rdx
shrq $0x20, %rdx
movl 0x8(%rdi,%rsi), %esi
leaq 0xc0627(%rip), %rdi     # 0x254318
movq 0x28(%rdi), %r9
shrq $0x21, %r8
movl (%r9,%r8,4), %r10d
movl 0x4(%r9,%r8,4), %r8d
subl %r10d, %r8d
movq %r10, %r9
shlq $0x3, %r9
addq 0x40(%rdi), %r9
xorl %r10d, %r10d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
cmpq %r10, %r8
je 0x193e5a
movq 0x48(%rdi), %rbx
movq (%r9,%r10,8), %r15
movq %r15, %r14
shrq $0x20, %r14
imulq $0x58, %r14, %r14
movq 0x30(%rbx,%r14), %r14
movl %r15d, %ebx
imulq $0x24, %rbx, %rbx
movzbl 0x20(%r14,%rbx), %r12d
movl %r12d, %ebp
andb $-0x40, %bpl
negb %bpl
setno %bpl
testb $0x1f, %r12b
sete %r13b
orb %bpl, %r13b
jne 0x193e52
addq %r14, %rbx
movl (%rbx), %r13d
shrl $0x5, %r12d
andl $0x1, %r12d
leal (%r12,%r13,2), %ebp
cmpl %edx, %ebp
jne 0x193ddf
movl 0x1c(%rbx), %r12d
cmpq %r11, %r12
je 0x193ddf
imulq $0x24, %r12, %r13
movzbl 0x20(%r14,%r13), %r12d
movl %r12d, %eax
andb $-0x40, %al
negb %al
jno 0x193e69
movl %r12d, %eax
andb $0x1f, %al
je 0x193e69
addq %r13, %r14
cmpl %r15d, 0x14(%r14)
jne 0x193e69
movl (%r14), %eax
shrl $0x5, %r12d
andl $0x1, %r12d
leal (%r12,%rax,2), %eax
cmpl %esi, %eax
jne 0x193ddf
leal 0x1(%rcx), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
andl $0xffffc000, %ecx       # imm = 0xFFFFC000
orl %eax, %ecx
movq (%rsp), %rax
movw %cx, 0x10(%rax)
xorl %edx, %ebp
cmpl $0x1, %ebp
jne 0x193e52
movl 0x14(%rbx), %ebx
cmpq %r11, %rbx
je 0x193e52
movq 0x48(%rdi), %rax
movq (%r9,%r10,8), %r14
movq %r14, %r15
shrq $0x20, %r15
imulq $0x58, %r15, %r15
movq 0x30(%rax,%r15), %r15
imulq $0x24, %rbx, %r12
movzbl 0x20(%r15,%r12), %ebx
movl %ebx, %eax
andb $-0x40, %al
negb %al
jno 0x193e88
movl %ebx, %eax
andb $0x1f, %al
je 0x193e88
addq %r12, %r15
cmpl %r14d, 0x1c(%r15)
jne 0x193e88
movl (%r15), %eax
shrl $0x5, %ebx
andl $0x1, %ebx
leal (%rbx,%rax,2), %eax
xorl %esi, %eax
cmpl $0x1, %eax
jne 0x193e52
leal 0x1(%rcx), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
andl $0xffffc000, %ecx       # imm = 0xFFFFC000
orl %eax, %ecx
movq (%rsp), %rax
movw %cx, 0x10(%rax)
incq %r10
jmp 0x193d19
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x62f44(%rip), %rdi     # 0x1f6db4
leaq 0x5dcac(%rip), %rsi     # 0x1f1b23
leaq 0x62f76(%rip), %rcx     # 0x1f6df4
movl $0x4cab, %edx           # imm = 0x4CAB
callq 0x2110
leaq 0x62f8f(%rip), %rdi     # 0x1f6e1e
leaq 0x5dc8d(%rip), %rsi     # 0x1f1b23
leaq 0x62f57(%rip), %rcx     # 0x1f6df4
movl $0x4cb6, %edx           # imm = 0x4CB6
callq 0x2110