// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/addr_objdump.c
// Function: get_symbol_addr
int get_symbol_addr(addr_memo_t *memo, pid_t pid, const char *symbol, uint64_t *raddr) {
    char *php_bin_path, *php_bin_path_root;
    uint64_t *php_base_addr;
    uint64_t addr_offset;
    php_bin_path = memo->php_bin_path;
    php_bin_path_root = memo->php_bin_path_root;
    php_base_addr = &memo->php_base_addr;
    if (*php_bin_path == '\0' && get_php_bin_path(pid, php_bin_path_root, php_bin_path) != 0) {
        return 1;
    } else if (*php_base_addr == 0 && get_php_base_addr(pid, php_bin_path_root, php_bin_path, php_base_addr) != 0) {
        return 1;
    } else if (get_symbol_offset(php_bin_path_root, symbol, &addr_offset) != 0) {
        return 1;
    }
    *raddr = *php_base_addr + addr_offset;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
leaq 0x100(%rdi), %r12
cmpb $0x0, (%rdi)
je 0x18f50
cmpq $0x0, 0x200(%r14)
je 0x18faa
leaq 0x6361(%rip), %rcx      # 0x1f261
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x18e34
testl %eax, %eax
jne 0x190a4
leaq 0x63a0(%rip), %rdx      # 0x1f2c4
xorl %r12d, %r12d
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x19113
testl %eax, %eax
je 0x18ffa
leaq 0x63a7(%rip), %rdi      # 0x1f2f2
jmp 0x1909d
leaq 0xc421(%rip), %rax      # 0x25378
movq (%rax), %rdi
leaq 0x5c5b(%rip), %rcx      # 0x1ebbc
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x18e34
testl %eax, %eax
jne 0x190a4
leaq 0x6174(%rip), %rdx      # 0x1f0f6
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movl %ebp, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x19113
testl %eax, %eax
je 0x19018
leaq 0x61b2(%rip), %rdi      # 0x1f157
jmp 0x1909d
leaq 0x627e(%rip), %rcx      # 0x1f22f
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
callq 0x18e34
testl %eax, %eax
jne 0x190a4
leaq 0x623b(%rip), %rdx      # 0x1f210
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x19113
testl %eax, %eax
je 0x19047
leaq 0x623f(%rip), %rdi      # 0x1f234
jmp 0x1909d
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62e0
addq 0x200(%r14), %rax
movq %rax, (%rbx)
jmp 0x190aa
leaq 0x6152(%rip), %rdx      # 0x1f171
movq %rsp, %r8
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x61d0
cmpl $0xff, %eax
jle 0x190bf
leaq 0x613d(%rip), %rdi      # 0x1f182
jmp 0x1909d
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62e0
movq %rax, %r13
leaq 0x6201(%rip), %rcx      # 0x1f261
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x18e34
testl %eax, %eax
jne 0x190a4
leaq 0x61eb(%rip), %rdx      # 0x1f26b
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
xorl %eax, %eax
callq 0x19113
testl %eax, %eax
je 0x190f5
leaq 0x61fb(%rip), %rdi      # 0x1f298
xorl %eax, %eax
callq 0xab99
movl $0x1, %r12d
movl %r12d, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
xorl %esi, %esi
callq 0x6500
testl %eax, %eax
je 0x190e5
leaq 0x6076(%rip), %rdx      # 0x1f14a
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x61d0
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6090
jmp 0x18eeb
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62e0
subq %rax, %r13
movq %r13, 0x200(%r14)
jmp 0x18ef9