// File: /workspace/github_c_makefile_star2_O1/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 0x3631
movl $0x1, %r12d
xorl %r13d, %r13d
movl %r12d, %esi
callq 0x34af
cmpl $0x0, 0x150(%rax)
jle 0x3617
movq %rax, %r15
xorl %ebp, %ebp
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x2fa2
cmpl $0x0, 0x12c(%rax)
jne 0x35fc
movq %rax, %r14
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
je 0x360d
movq %r13, %r14
movq %r14, %r13
cmpl 0x150(%r15), %ebp
jl 0x35d4
jmp 0x361a
testq %r13, %r13
je 0x35ff
jmp 0x372f
movq %r13, %r14
leal 0x1(%r12), %eax
movq %r14, %r13
movq (%rsp), %rdi
cmpl 0x30(%rdi), %r12d
movl %eax, %r12d
jl 0x35be
jmp 0x3634
xorl %r14d, %r14d
cmpl $0x0, 0x40(%rdi)
jle 0x36ef
movl $0x1, %esi
movq %rsi, 0x8(%rsp)
callq 0x3543
cmpl $0x0, 0x28(%rax)
jle 0x36d0
movl $0x1, %ebp
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movl %ebp, %esi
callq 0x341b
cmpl $0x0, 0x150(%rax)
jle 0x36b9
movq %rax, %r12
xorl %r13d, %r13d
incl %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x2fa2
cmpl $0x0, 0x12c(%rax)
jne 0x36a0
movq %rax, %r15
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
je 0x36b2
movq %r14, %r15
movq %r15, %r14
cmpl 0x150(%r12), %r13d
jl 0x3676
jmp 0x36bc
testq %r14, %r14
je 0x36a3
jmp 0x3709
movq %r14, %r15
leal 0x1(%rbp), %ecx
movq %r15, %r14
movq 0x10(%rsp), %rax
cmpl 0x28(%rax), %ebp
movl %ecx, %ebp
jl 0x365d
jmp 0x36d3
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 0x3643
jmp 0x36f2
movq %r14, %r15
testq %r15, %r15
je 0x373b
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 0x7085(%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 0x3714
leaq 0x709b(%rip), %rdi      # 0xa7dd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
jmp 0x3725