// File: /workspace/github_cpp_makefile_star2_O1/luooofan[P]hblzbd_compiler/src/Pass/dominant.cpp
// Function: ComputeDominance::AncestorWithLowestSemi(IRBasicBlock*)
ComputeDominance::BB* ComputeDominance::AncestorWithLowestSemi(ComputeDominance::BB* v) {
  MyAssert(ancestor.find(v) != ancestor.end());
  // 从a到v(included)这段已经算过了 存在best[v]里 compute min(dfnum[semi[y]])
  auto a = ancestor[v];
  MyAssert(nullptr != a);  // 不会出现a为空的情况 根节点不会被链入到ancestor中
  if (ancestor.find(a) != ancestor.end()) {
    // 把当前生成树森林中v的最小的祖先到a(included)这段也算了 存在best[a]里 即b
    auto b = AncestorWithLowestSemi(a);
    // 更新 使更新后从ancestor[a]到v(included)这段都算过 存在best[v]里
    ancestor[v] = ancestor[a];
    if (dfnum[semi[b]] < dfnum[semi[best[v]]]) {
      best[v] = b;
    }
  }
  return best[v];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0xc0(%rdi), %rdi
movq 0xc8(%rbx), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x4b3af
movq (%rax), %r9
movq %rax, %r10
cmpq %rsi, 0x8(%r9)
je 0x4b3af
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x4b3ac
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x4b3af
movq %r11, %r10
cmpq %rsi, %rdi
jne 0x4b380
jmp 0x4b3af
xorl %r10d, %r10d
testq %r10, %r10
je 0x4b511
cmpq $0x0, (%r10)
je 0x4b511
leaq 0xc0(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4c234
movq (%rax), %rsi
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
je 0x4b54c
movq 0xc0(%rbx), %rdi
movq 0xc8(%rbx), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x4b445
movq (%rax), %r9
movq %rax, %r10
cmpq 0x8(%r9), %rsi
je 0x4b445
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x4b442
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x4b445
movq %r11, %r10
cmpq %rdi, %rsi
jne 0x4b416
jmp 0x4b445
xorl %r10d, %r10d
testq %r10, %r10
je 0x4b4ed
cmpq $0x0, (%r10)
je 0x4b4ed
movq %rbx, %rdi
callq 0x4b33a
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x4c234
movq (%rax), %r13
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x4c234
movq %r13, (%rax)
leaq 0x50(%rbx), %r13
leaq 0x130(%rbx), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4c234
movq %r13, %rdi
movq %rax, %rsi
callq 0x4c2da
movl (%rax), %r15d
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4c234
movq %rbp, %rdi
movq %rax, %rsi
callq 0x4c234
movq %r13, %rdi
movq %rax, %rsi
callq 0x4c2da
cmpl (%rax), %r15d
jge 0x4b4ed
movq 0x8(%rsp), %r15
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4c234
movq %r15, (%rax)
addq $0xf8, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4c234
movq (%rax), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x44ad8(%rip), %rdi     # 0x8fff0
leaq 0x23c49(%rip), %rsi     # 0x6f168
callq 0x8280
leaq 0x272f7(%rip), %rsi     # 0x72822
movq %rax, %rdi
callq 0x8280
leaq 0x24e86(%rip), %rsi     # 0x703c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x17, %esi
jmp 0x4b585
movq 0x44a9d(%rip), %rdi     # 0x8fff0
leaq 0x23c0e(%rip), %rsi     # 0x6f168
callq 0x8280
leaq 0x272bc(%rip), %rsi     # 0x72822
movq %rax, %rdi
callq 0x8280
leaq 0x24e4b(%rip), %rsi     # 0x703c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x1a, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380