// File: /workspace/github_c_makefile_star2_O0/adsr[P]phpspy/./phpspy_trace.c
// Function: do_trace_70
static int do_trace(trace_context_t *context) {
    int rv, depth;
    zend_executor_globals executor_globals;

    try(rv, copy_executor_globals(context, &executor_globals));
    try(rv, context->event_handler(context, PHPSPY_TRACE_EVENT_STACK_BEGIN));

    rv = PHPSPY_OK;
    do {
        #define maybe_break_on_err() do {                      \
            if (   (rv & PHPSPY_ERR_PID_DEAD) != 0             \
                || (rv & PHPSPY_ERR_BUF_FULL) != 0             \
                || (rv != PHPSPY_OK && !opt_continue_on_error) \
            ) {                                                \
                goto do_trace_end;                             \
            }                                                  \
        } while(0)

        rv |= trace_stack(context, executor_globals.current_execute_data, &depth);
        maybe_break_on_err();
        if (depth < 1) break;

        if (opt_capture_req) {
            rv |= trace_request_info(context);
            maybe_break_on_err();
        }

        if (opt_capture_mem) {
            rv |= trace_memory_info(context);
            maybe_break_on_err();
        }

        if (HASH_CNT(hh, glopeek_map) > 0) {
            rv |= trace_globals(context);
            maybe_break_on_err();
        }

        #undef maybe_break_on_err
    } while (0);

do_trace_end:
    if (rv == PHPSPY_OK || opt_continue_on_error) {
        try(rv, context->event_handler(context, PHPSPY_TRACE_EVENT_STACK_END));
    }

    return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x12770
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xa9b2
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xab76
jmp 0xa9b4
jmp 0xa9b6
movq -0x10(%rbp), %rax
movq 0x798(%rax), %rax
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xa9df
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xab76
jmp 0xa9e1
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x127e0
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xaa24
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xaa24
cmpl $0x0, -0x14(%rbp)
je 0xaa29
cmpl $0x0, 0x31b1e(%rip)     # 0x3c540
jne 0xaa29
jmp 0xab35
jmp 0xaa2b
cmpl $0x1, -0x18(%rbp)
jge 0xaa36
jmp 0xab33
cmpl $0x0, 0x31ab3(%rip)     # 0x3c4f0
je 0xaa7c
movq -0x10(%rbp), %rdi
callq 0x12c10
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xaa73
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xaa73
cmpl $0x0, -0x14(%rbp)
je 0xaa78
cmpl $0x0, 0x31acf(%rip)     # 0x3c540
jne 0xaa78
jmp 0xab35
jmp 0xaa7a
jmp 0xaa7c
cmpl $0x0, 0x31a81(%rip)     # 0x3c504
je 0xaabf
movq -0x10(%rbp), %rdi
callq 0x12ec0
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xaab9
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xaab9
cmpl $0x0, -0x14(%rbp)
je 0xaabb
cmpl $0x0, 0x31a89(%rip)     # 0x3c540
jne 0xaabb
jmp 0xab35
jmp 0xaabd
jmp 0xaabf
cmpq $0x0, 0x31a91(%rip)     # 0x3c558
je 0xaae2
movq 0x31a88(%rip), %rax     # 0x3c558
movq 0x300(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x204(%rbp)
jmp 0xaaec
xorl %eax, %eax
movl %eax, -0x204(%rbp)
jmp 0xaaec
movl -0x204(%rbp), %eax
cmpl $0x0, %eax
jbe 0xab31
movq -0x10(%rbp), %rdi
callq 0x12fb0
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xab2b
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xab2b
cmpl $0x0, -0x14(%rbp)
je 0xab2d
cmpl $0x0, 0x31a17(%rip)     # 0x3c540
jne 0xab2d
jmp 0xab35
jmp 0xab2f
jmp 0xab31
jmp 0xab33
jmp 0xab35
cmpl $0x0, -0x14(%rbp)
je 0xab44
cmpl $0x0, 0x319fe(%rip)     # 0x3c540
je 0xab70
jmp 0xab46
movq -0x10(%rbp), %rax
movq 0x798(%rax), %rax
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xab6c
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xab76
jmp 0xab6e
jmp 0xab70
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)