// File: /workspace/github_c_makefile_star2_O0/adsr[P]phpspy/addr_objdump.c
// Function: popen_read_line
static int popen_read_line(char *buf, size_t buf_size, char *cmd_fmt, ...) {
    FILE *fp;
    char cmd[PHPSPY_STR_SIZE];
    int buf_len;
    va_list cmd_args;
    va_start(cmd_args, cmd_fmt);
    if (vsnprintf(cmd, sizeof(cmd), cmd_fmt, cmd_args) >= (int)(sizeof(cmd) - 1)) {
        log_error("vsnprintf overflow\n");
        return 1;
    }
    va_end(cmd_args);
    if (!(fp = popen(cmd, "r"))) {
        perror("popen");
        return 1;
    }
    if (fgets(buf, buf_size-1, fp) == NULL) {
        log_error("popen_read_line: No stdout; cmd=%s\n", cmd);
        pclose(fp);
        return 1;
    }
    pclose(fp);
    buf_len = strlen(buf);
    while (buf_len > 0 && buf[buf_len-1] == '\n') {
        --buf_len;
    }
    if (buf_len < 1) {
        log_error("popen_read_line: Expected strlen(buf)>0; cmd=%s\n", cmd);
        return 1;
    }
    buf[buf_len] = '\0';
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
testb %al, %al
je 0x2cc47
movaps %xmm0, -0x1d0(%rbp)
movaps %xmm1, -0x1c0(%rbp)
movaps %xmm2, -0x1b0(%rbp)
movaps %xmm3, -0x1a0(%rbp)
movaps %xmm4, -0x190(%rbp)
movaps %xmm5, -0x180(%rbp)
movaps %xmm6, -0x170(%rbp)
movaps %xmm7, -0x160(%rbp)
movq %r9, -0x1d8(%rbp)
movq %r8, -0x1e0(%rbp)
movq %rcx, -0x1e8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x150(%rbp), %rax
leaq -0x200(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
leaq -0x130(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x150(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x60f0
cmpl $0xff, %eax
jl 0x2cccc
leaq 0x8663(%rip), %rdi      # 0x3531c
movb $0x0, %al
callq 0x9cc0
movl $0x1, -0x4(%rbp)
jmp 0x2cdf2
leaq -0x150(%rbp), %rax
leaq -0x130(%rbp), %rdi
leaq 0x7cdb(%rip), %rsi      # 0x349bc
callq 0x6500
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x2cd08
leaq 0x8190(%rip), %rdi      # 0x34e87
callq 0x6520
movl $0x1, -0x4(%rbp)
jmp 0x2cdf2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
subq $0x1, %rax
movl %eax, %esi
movq -0x28(%rbp), %rdx
callq 0x62c0
cmpq $0x0, %rax
jne 0x2cd4f
leaq -0x130(%rbp), %rsi
leaq 0x85fd(%rip), %rdi      # 0x35330
movb $0x0, %al
callq 0x9cc0
movq -0x28(%rbp), %rdi
callq 0x61c0
movl $0x1, -0x4(%rbp)
jmp 0x2cdf2
movq -0x28(%rbp), %rdi
callq 0x61c0
movq -0x10(%rbp), %rdi
callq 0x6160
movl %eax, -0x134(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x134(%rbp)
movb %al, -0x201(%rbp)
jle 0x2cd98
movq -0x10(%rbp), %rax
movl -0x134(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
sete %al
movb %al, -0x201(%rbp)
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x2cda4
jmp 0x2cdb5
movl -0x134(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x2cd67
cmpl $0x1, -0x134(%rbp)
jge 0x2cddc
leaq -0x130(%rbp), %rsi
leaq 0x8588(%rip), %rdi      # 0x35354
movb $0x0, %al
callq 0x9cc0
movl $0x1, -0x4(%rbp)
jmp 0x2cdf2
movq -0x10(%rbp), %rax
movslq -0x134(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nop