// File: /workspace/github_c_makefile_star2_O3/negge[P]xlink/src/xlink.c
// Function: xlink_binary_find_public
xlink_public *xlink_binary_find_public(xlink_binary *bin, const char *symb) {
  xlink_public *ret;
  int i, j, k;
  ret = NULL;
  for (i = 1; i <= bin->nmodules; i++) {
    xlink_module *mod;
    mod = xlink_binary_get_module(bin, i);
    for (j = 1; j <= mod->npublics; j++) {
      xlink_public *pub;
      pub = xlink_module_get_public(mod, j);
      if (!pub->is_local && strcmp(symb, pub->name) == 0) {
        XLINK_ERROR(ret != NULL,
         ("Duplicate public definition found for symbol %s in %s and %s",
         symb, ret->module->filename, mod->filename));
        ret = pub;
      }
    }
  }
  for (i = 1; i <= bin->nlibrarys; i++) {
    xlink_library *lib;
    lib = xlink_binary_get_library(bin, i);
    for (j = 1; j <= lib->nmodules; j++) {
      xlink_module *mod;
      mod = xlink_library_get_module(lib, j);
      for (k = 1; k <= mod->npublics; k++) {
        xlink_public *pub;
        pub = xlink_module_get_public(mod, k);
        if (!pub->is_local && strcmp(symb, pub->name) == 0) {
          XLINK_ERROR(ret != NULL,
           ("Duplicate public definition found for symbol %s in %s and %s",
           symb, ret->module->filename, mod->filename));
          ret = pub;
        }
      }
    }
  }
  XLINK_ERROR(ret == NULL, ("Could not find public definition %s", symb));
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpl $0x0, 0x30(%rdi)
movq %rdi, (%rsp)
jle 0x35ff
movl $0x1, %r12d
xorl %r13d, %r13d
movl %r12d, %esi
callq 0x347f
cmpl $0x0, 0x150(%rax)
jle 0x35e5
movq %rax, %r15
xorl %ebp, %ebp
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x2f92
cmpl $0x0, 0x12c(%rax)
jne 0x35ca
movq %rax, %r14
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
je 0x35db
movq %r13, %r14
movq %r14, %r13
cmpl 0x150(%r15), %ebp
jl 0x35a2
jmp 0x35e8
testq %r13, %r13
je 0x35cd
jmp 0x36fd
movq %r13, %r14
leal 0x1(%r12), %eax
movq %r14, %r13
movq (%rsp), %rdi
cmpl 0x30(%rdi), %r12d
movl %eax, %r12d
jl 0x358c
jmp 0x3602
xorl %r14d, %r14d
cmpl $0x0, 0x40(%rdi)
jle 0x36bd
movl $0x1, %esi
movq %rsi, 0x8(%rsp)
callq 0x3512
cmpl $0x0, 0x28(%rax)
jle 0x369e
movl $0x1, %ebp
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movl %ebp, %esi
callq 0x33ec
cmpl $0x0, 0x150(%rax)
jle 0x3687
movq %rax, %r12
xorl %r13d, %r13d
incl %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x2f92
cmpl $0x0, 0x12c(%rax)
jne 0x366e
movq %rax, %r15
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
je 0x3680
movq %r14, %r15
movq %r15, %r14
cmpl 0x150(%r12), %r13d
jl 0x3644
jmp 0x368a
testq %r14, %r14
je 0x3671
jmp 0x36d7
movq %r14, %r15
leal 0x1(%rbp), %ecx
movq %r15, %r14
movq 0x10(%rsp), %rax
cmpl 0x28(%rax), %ebp
movl %ecx, %ebp
jl 0x362b
jmp 0x36a1
movq %r14, %r15
movq 0x8(%rsp), %rcx
leal 0x1(%rcx), %eax
movq %r15, %r14
movq (%rsp), %rdi
cmpl 0x40(%rdi), %ecx
movl %eax, %esi
jl 0x3611
jmp 0x36c0
movq %r14, %r15
testq %r15, %r15
je 0x3709
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rax
movq (%rax), %rdx
movq (%r12), %rcx
leaq 0x70b7(%rip), %rdi      # 0xa7a0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
movq 0x8(%r13), %rax
movq (%rax), %rdx
movq (%r15), %rcx
jmp 0x36e2
leaq 0x70cd(%rip), %rdi      # 0xa7dd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
jmp 0x36f3