// File: /workspace/github_cpp_makefile_star2_O1/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 0x2bd8
leaq 0x345b(%rip), %rcx      # 0x6000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x351a(%rip), %rcx      # 0x60cf
leaq 0x20(%rsp), %rdi
movl $0x4d, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0xb, %r8d
leaq 0x3547(%rip), %rcx      # 0x611d
jmp 0x2c15
cmpl $0x40, %edx
je 0x2c9d
cmpl $0x80, %edx
jne 0x2cd5
leaq 0x3680(%rip), %rcx      # 0x6274
leaq 0x20(%rsp), %rdi
movl $0x36, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0xd, %r8d
leaq 0x3696(%rip), %rcx      # 0x62ab
leaq 0x40(%rsp), %rdi
jmp 0x2cca
leaq 0x3603(%rip), %rcx      # 0x6229
leaq 0x40(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3c, %r8d
leaq 0x35f0(%rip), %rcx      # 0x6237
jmp 0x2cc5
leaq 0x34d9(%rip), %rcx      # 0x6129
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3f, %r8d
leaq 0x34c7(%rip), %rcx      # 0x6138
jmp 0x2cc5
leaq 0x34fe(%rip), %rcx      # 0x6178
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x53, %r8d
leaq 0x34ec(%rip), %rcx      # 0x6187
jmp 0x2cc5
leaq 0x3537(%rip), %rcx      # 0x61db
leaq 0x40(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movl $0x3e, %r8d
leaq 0x3525(%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 0x35ab(%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 0x2d48
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d4f
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 0x3589(%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 0x2da5
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2dab
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 0x2ddc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x70(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x2df8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x178(%rsp), %rsi
leaq 0x140(%rsp), %rdi
callq 0x2200
leaq 0x32a8(%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 0x2e5b
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x2e62
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 0x3474(%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 0x2ebd
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x2ec3
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 0x2f21
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x2f28
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 0x33bb(%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 0x2f83
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x2f89
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 0x2fda
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2fe2
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 0x32f4(%rip), %rsi      # 0x62f9
callq 0x2250
movq %rbp, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x302b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3032
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 0x3076
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x308d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x30aa
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x30c7
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x30ec
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3109
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2130
leaq 0x150(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x312a
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 0x282a
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3180
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %rbx
je 0x31aa
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x5e07(%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 0x31e7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x31fe
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 0x3329
movq 0x130(%rsp), %rsi
jmp 0x331c
jmp 0x3326
movq %rax, %r13
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x3257
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3257
movq %rax, %r13
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3273
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3273
movq %rax, %r13
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3295
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3295
movq %rax, %r13
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x32b7
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x32b7
movq %rax, %r13
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x32e1
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x32e1
movq %rax, %r13
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3303
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3303
movq %rax, %r13
leaq 0x150(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3329
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3329
movq %rax, %r13
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3388
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x3388
movq %rax, %r13
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x336e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x336e
movq %rax, %r13
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3388
movq 0x70(%rsp), %rsi
jmp 0x3346
jmp 0x3385
movq %rax, %r13
movq 0x5c29(%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 0x33c5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x33e1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2130
movq %r13, %rdi
callq 0x2230
jmp 0x33eb
movq %rax, %r13
jmp 0x33a9