// File: /workspace/github_cpp_makefile_star2_O3/buildsi[P]ldaudit-yaml/auditlib.cpp
// Function: la_objsearch
char * la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) {

  // Derive a human friendly flag name
  std::string flagName;
  std::string desc;
  switch(flag) {
    case LA_SER_ORIG:
      desc = "This is the original name that is being searched for (ELF NEEDED or filename)";
      flagName = "LA_SER_ORIG";
      break;
    case LA_SER_LIBPATH:
      flagName = "LA_SER_LIBPATH";
      desc = "name was created using a directory specified in LD_LIBRARY_PATH";
      break;
    case LA_SER_RUNPATH:
      flagName = "LA_SER_RUNPATH";
      desc = "name was created using a directory specified in an ELF DT_RPATH or DT_RUNPATH list.";
      break;
    case LA_SER_DEFAULT:
      flagName = "LA_SER_DEFAULT";
      desc = "name was found via a search of one of the default directories.";
      break;
    case LA_SER_CONFIG:
      flagName = "LA_SER_CONFIG";
      desc = "name was found via the ldconfig(8) cache (/etc/ld.so.cache).";
      break;
    case LA_SER_SECURE:
      desc = "name is specific to a secure object (unused on Linux).";
      flagName = "LA_SER_SECURE";
  }
  
  std::stringstream ss;
  ss << cookie;
   
  std::string output = "  - event: searching_for\n    function: la_objsearch\n    name: \"" + std::string(name) + "\"\n";
  output += "    initiated_by: " + ss.str() + "\n    flag: \"" + flagName + "\"\n    description: \"" + desc + "\"\n";
  doPrint(output);

  return (char*)name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rsi, %r14
movq %rdi, %r13
leaq 0x50(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x30(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leal -0x1(%rdx), %eax
cmpl $0x7, %eax
ja 0x2bd1
leaq 0x3462(%rip), %rcx      # 0x6000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3521(%rip), %rcx      # 0x60cf
leaq 0x20(%rsp), %rdi
movl $0x4d, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0xb, %r8d
leaq 0x354e(%rip), %rcx      # 0x611d
jmp 0x2c0e
cmpl $0x40, %edx
je 0x2c96
cmpl $0x80, %edx
jne 0x2cce
leaq 0x3687(%rip), %rcx      # 0x6274
leaq 0x20(%rsp), %rdi
movl $0x36, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0xd, %r8d
leaq 0x369d(%rip), %rcx      # 0x62ab
leaq 0x40(%rsp), %rdi
jmp 0x2cc3
leaq 0x360a(%rip), %rcx      # 0x6229
leaq 0x40(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3c, %r8d
leaq 0x35f7(%rip), %rcx      # 0x6237
jmp 0x2cbe
leaq 0x34e0(%rip), %rcx      # 0x6129
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3f, %r8d
leaq 0x34ce(%rip), %rcx      # 0x6138
jmp 0x2cbe
leaq 0x3505(%rip), %rcx      # 0x6178
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x53, %r8d
leaq 0x34f3(%rip), %rcx      # 0x6187
jmp 0x2cbe
leaq 0x353e(%rip), %rcx      # 0x61db
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3e, %r8d
leaq 0x352c(%rip), %rcx      # 0x61ea
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
callq 0x21f0
leaq 0x160(%rsp), %rdi
callq 0x20b0
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
callq 0x20e0
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
movq %r13, %rsi
callq 0x2210
leaq 0x35b2(%rip), %rcx      # 0x62b9
leaq 0x60(%rsp), %rdi
movl $0x3f, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d41
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d48
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3590(%rip), %rsi      # 0x62f9
callq 0x2250
leaq 0x90(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d9e
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2da4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x2dd5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x70(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x2df1
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x178(%rsp), %rsi
leaq 0x140(%rsp), %rdi
callq 0x2200
leaq 0x32af(%rip), %rcx      # 0x60bc
leaq 0x140(%rsp), %rdi
movl $0x12, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
leaq 0xf0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e54
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x2e5b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x347b(%rip), %rsi      # 0x62fc
callq 0x2250
leaq 0xb0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2eb6
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x2ebc
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xa0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x2060
leaq 0x110(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f1a
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x2f21
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x100(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x33c2(%rip), %rsi      # 0x6309
callq 0x2250
leaq 0xd0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f7c
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x2f82
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0xc0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x2060
movq %r12, 0x60(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2fd3
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2fdb
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x32fb(%rip), %rsi      # 0x62f9
callq 0x2250
movq %rbp, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3024
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x302b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x2060
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x306f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3086
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x30a3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x30c0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x30e5
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3102
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x150(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3123
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x130(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0x2090
leaq 0x120(%rsp), %rdi
callq 0x2823
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3179
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %rbx
je 0x31a3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x5e0e(%rip), %rsi      # 0x8fb8
leaq 0x160(%rsp), %rdi
callq 0x20d0
leaq 0x1e0(%rsp), %rdi
callq 0x2070
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x31e0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x31f7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2130
movq %r13, %rax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3322
movq 0x130(%rsp), %rsi
jmp 0x3315
jmp 0x331f
movq %rax, %r13
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x3250
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3250
movq %rax, %r13
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x326c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x326c
movq %rax, %r13
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x328e
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x328e
movq %rax, %r13
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x32b0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x32b0
movq %rax, %r13
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x32da
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x32da
movq %rax, %r13
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x32fc
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x32fc
movq %rax, %r13
leaq 0x150(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3322
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3322
movq %rax, %r13
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3381
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3381
movq %rax, %r13
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x3367
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3367
movq %rax, %r13
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3381
movq 0x70(%rsp), %rsi
jmp 0x333f
jmp 0x337e
movq %rax, %r13
movq 0x5c30(%rip), %rsi      # 0x8fb8
leaq 0x160(%rsp), %rdi
callq 0x20d0
leaq 0x1e0(%rsp), %rdi
callq 0x2070
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x33be
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x33da
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2130
movq %r13, %rdi
callq 0x2230
jmp 0x33e4
movq %rax, %r13
jmp 0x33a2