// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/pileup_mod.c
// Function: main
int main(int argc, char **argv) {
    int compact = 0;
    while (argc > 1 && strcmp(argv[1], "-c") == 0) {
        compact++;
        argc--;
        argv++;
    }

    samFile *in = sam_open(argc > 1 ? argv[1] : "-", "r");
    bam1_t *b = bam_init1();
    sam_hdr_t *h = sam_hdr_read(in);

    // Pileup iterator with constructor/destructor to parse base mod tags
    plp_dat dat = {
        .fp = in,
        .h = h,
    };
    bam_plp_t iter = bam_plp_init(readaln, &dat);
    bam_plp_constructor(iter, pileup_cd_create);
    bam_plp_destructor(iter, pileup_cd_destroy);

    const bam_pileup1_t *p;
    int tid, pos, n = 0;
    while ((p = bam_plp_auto(iter, &tid, &pos, &n)) != 0) {
        switch (compact) {
        case 0:
            process_mod_pileup1(h, p, tid, pos, n);
            break;
        case 1:
            process_mod_pileup2(h, p, tid, pos, n);
            break;
        default:
            process_pileup(h, p, tid, pos, n);
            break;
        }
    }
    bam_plp_destroy(iter);

    sam_close(in);
    bam_destroy1(b);
    sam_hdr_destroy(h);

    return n != 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x8(%rbp)
movb %al, -0x5d(%rbp)
jle 0x6465
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xdfc0b(%rip), %rsi     # 0xe6062
callq 0x46b0
cmpl $0x0, %eax
sete %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x646e
jmp 0x648e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x643d
cmpl $0x1, -0x8(%rbp)
jle 0x64a2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x64af
leaq 0xdfb90(%rip), %rax     # 0xe6039
movq %rax, -0x68(%rbp)
jmp 0x64af
movq -0x68(%rbp), %rdi
leaq 0xe3774(%rip), %rsi     # 0xe9c2e
callq 0x137d0
movq %rax, -0x20(%rbp)
callq 0x28390
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2ceb0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0xf0(%rip), %rdi        # 0x65e0
leaq -0x40(%rbp), %rsi
callq 0x389d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x7c8(%rip), %rsi      # 0x5d40
callq 0x38dd0
movq -0x48(%rbp), %rdi
leaq -0x778(%rip), %rsi      # 0x5da0
callq 0x38df0
movl $0x0, -0x5c(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x54(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x5c(%rbp), %rcx
callq 0x3a190
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x65a4
movl -0x14(%rbp), %eax
movl %eax, -0x6c(%rbp)
testl %eax, %eax
je 0x6559
jmp 0x654f
movl -0x6c(%rbp), %eax
subl $0x1, %eax
je 0x6572
jmp 0x658b
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
callq 0x5dd0
jmp 0x65a2
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
callq 0x6150
jmp 0x65a2
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
callq 0x5ae0
jmp 0x6524
movq -0x48(%rbp), %rdi
callq 0x38b70
movq -0x20(%rbp), %rdi
callq 0x158f0
movq -0x28(%rbp), %rdi
callq 0x285d0
movq -0x30(%rbp), %rdi
callq 0x27450
cmpl $0x0, -0x5c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)