// File: /workspace/github_c_makefile_star2_O2/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 0x17ec4
cmpq $0x0, 0x200(%r14)
je 0x17f1e
leaq 0x63ed(%rip), %rcx      # 0x1e261
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x17dac
testl %eax, %eax
jne 0x18010
leaq 0x642c(%rip), %rdx      # 0x1e2c4
xorl %r12d, %r12d
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x1807b
testl %eax, %eax
je 0x17f6e
leaq 0x6433(%rip), %rdi      # 0x1e2f2
jmp 0x18009
leaq 0xd4ad(%rip), %rax      # 0x25378
movq (%rax), %rdi
leaq 0x5ce7(%rip), %rcx      # 0x1dbbc
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x17dac
testl %eax, %eax
jne 0x18010
leaq 0x6200(%rip), %rdx      # 0x1e0f6
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movl %ebp, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1807b
testl %eax, %eax
je 0x17f8a
leaq 0x623e(%rip), %rdi      # 0x1e157
jmp 0x18009
leaq 0x630a(%rip), %rcx      # 0x1e22f
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
callq 0x17dac
testl %eax, %eax
jne 0x18010
leaq 0x62c7(%rip), %rdx      # 0x1e210
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x1807b
testl %eax, %eax
je 0x17fb5
leaq 0x62cb(%rip), %rdi      # 0x1e234
jmp 0x18009
movq %rsp, %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x62e0
addq 0x200(%r14), %rax
movq %rax, (%rbx)
jmp 0x18014
leaq 0x61e0(%rip), %rdx      # 0x1e171
movq %rsp, %r8
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x61d0
cmpl $0xff, %eax
jle 0x18029
leaq 0x61cf(%rip), %rdi      # 0x1e182
jmp 0x18009
movq %rsp, %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x62e0
movq %rax, %r13
leaq 0x6295(%rip), %rcx      # 0x1e261
leaq 0x100(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x17dac
testl %eax, %eax
jne 0x18010
leaq 0x627f(%rip), %rdx      # 0x1e26b
movq %rsp, %rdi
leaq 0x100(%rsp), %rcx
xorl %eax, %eax
callq 0x1807b
testl %eax, %eax
je 0x1805f
leaq 0x628f(%rip), %rdi      # 0x1e298
xorl %eax, %eax
callq 0xa442
pushq $0x1
popq %r12
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 0x1804f
leaq 0x610c(%rip), %rdx      # 0x1e14a
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 0x17e5f
movq %rsp, %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x62e0
subq %rax, %r13
movq %r13, 0x200(%r14)
jmp 0x17e6d