LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_NoteOn
static void Func_NoteOn( int channel, int key, int velocity )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_noteon(&ev, channel, key, velocity);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movups %xmm0, 0xc(%rax)
movw $0x6, (%rax)
movb %dil, 0x10(%rax)
movb %sil, 0x11(%rax)
movb %dl, 0x12(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6f23(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x1041e(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6f15(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x103df(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x93ed
movq 0x103cc(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x93bd
jns 0x93df
leaq 0x1ef6(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x103aa(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x93fd
leaq 0x1f4d(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_PolyAftertouch
static void Func_PolyAftertouch( int channel, int key, int pressure )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_keypress(&ev, channel, key, pressure);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movups %xmm0, 0xc(%rax)
movw $0x8, (%rax)
movb %dil, 0x10(%rax)
movb %sil, 0x11(%rax)
movb %dl, 0x12(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6e89(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x10384(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6e7b(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x10345(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x9487
movq 0x10332(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x9457
jns 0x9479
leaq 0x1e5c(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x10310(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x9497
leaq 0x1eb3(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_ControlChange
static void Func_ControlChange( int channel, int number, int value )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_controller(&ev, channel, number, value);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movl $0x0, 0x10(%rax)
movw $0xa, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x14(%rax)
movl %edx, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6ded(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x102e8(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6ddf(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x102a9(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x9523
movq 0x10296(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x94f3
jns 0x9515
leaq 0x1dc0(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x10274(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x9533
leaq 0x1e17(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_ProgramChange
static void Func_ProgramChange( int channel, int program )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_pgmchange(&ev, channel, program);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0xb, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6d53(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x1024e(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6d45(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x1020f(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x95bd
movq 0x101fc(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x958d
jns 0x95af
leaq 0x1d26(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x101da(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x95cd
leaq 0x1d7d(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_ChannelAftertouch
static void Func_ChannelAftertouch( int channel, int pressure )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_chanpress(&ev, channel, pressure);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0xc, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6cb9(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x101b4(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6cab(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x10175(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x9657
movq 0x10162(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x9627
jns 0x9649
leaq 0x1c8c(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x10140(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x9667
leaq 0x1ce3(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_PitchBend
static void Func_PitchBend( int channel, int lsb, int msb )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_pitchbend(&ev, channel, (lsb | (msb << 7)) - 8192);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0xd, (%rax)
movb %dil, 0x10(%rax)
shll $0x7, %edx
orl %esi, %edx
addl $0xffffe000, %edx       # imm = 0xFFFFE000
movl %edx, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6c14(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
movl 0x1010f(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6c06(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x100d0(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2260
testl %eax, %eax
js 0x96fc
movq 0x100bd(%rip), %rdi     # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x96cc
jns 0x96ee
leaq 0x1be7(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0x1009b(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x970c
leaq 0x1c3e(%rip), %rdi      # 0xb341
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: ALSADrv_MIDI_StartPlayback
int ALSADrv_MIDI_StartPlayback(void (*service)(void))
{
    ALSADrv_MIDI_HaltPlayback();

    threadService = service;
    threadQuit = 0;

    ALSADrv_MIDI_QueueStart();

    if (pthread_create(&thread, NULL, threadProc, NULL)) {
        ASS_Message("ALSADrv: pthread_create returned error\n");

        ALSADrv_MIDI_HaltPlayback();
        
        return ALSAErr_PlayThread;
    }

    threadRunning = 1;

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x9711
movq %rbx, 0x10031(%rip)     # 0x19798
movl $0x0, 0x1002f(%rip)     # 0x197a0
callq 0x97b8
leaq 0x1002b(%rip), %rdi     # 0x197a8
leaq 0xa8(%rip), %rdx        # 0x982c
xorl %ebx, %ebx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2390
testl %eax, %eax
je 0x97ad
leaq 0x1abf(%rip), %rdi      # 0xb259
xorl %eax, %eax
callq 0x8b10
callq 0x9711
movl $0x8, %ebx
jmp 0x97b4
movb $0x1, 0xfffc(%rip)      # 0x197b0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: ALSADrv_MIDI_QueueStart
void ALSADrv_MIDI_QueueStart(void)
{
    int result;

    if (!queueRunning) {
        result = snd_seq_start_queue(seq, seq_queue, NULL);
        if (result < 0) {
            ASS_Message("ALSADrv: snd_seq_start_queue err %d\n", result);
        }

        while ((result = snd_seq_drain_output(seq)) > 0);
        if (result < 0) {
            ASS_Message("ALSADrv: could not drain output: err %d\n", result);
        }

        snd_seq_sync_output_queue(seq);

        queueRunning = 1;
    }
}

// Assembly:
cmpb $0x0, 0xfff9(%rip)      # 0x197b8
jne 0x982b
pushq %rax
movq 0xffc7(%rip), %rdi      # 0x19790
movl 0x6aed(%rip), %esi      # 0x102bc
movl $0x1e, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2210
testl %eax, %eax
jns 0x97f2
leaq 0x1abe(%rip), %rdi      # 0xb2a7
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0xff97(%rip), %rdi      # 0x19790
callq 0x2380
testl %eax, %eax
jg 0x97f2
jns 0x9814
leaq 0x1ac1(%rip), %rdi      # 0xb2cc
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0xff75(%rip), %rdi      # 0x19790
callq 0x2070
movb $0x1, 0xff91(%rip)      # 0x197b8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: threadProc
static void * threadProc(void * parm)
{
    struct timeval tv;
    int sleepAmount = 1000000 / THREAD_QUEUE_INTERVAL;
    unsigned int sequenceTime;

    (void)parm;

    // prime the pump
    threadTimer = get_tick();
    threadQueueTimer = threadTimer + threadQueueTicks;
    while (threadTimer < threadQueueTimer) {
        if (threadService) {
            threadService();
        }
        threadTimer++;
    }
    
    while (!threadQuit) {
        tv.tv_sec = 0;
        tv.tv_usec = sleepAmount;

        select(0, NULL, NULL, NULL, &tv);

        sequenceTime = get_tick();

        sleepAmount = 1000000 / THREAD_QUEUE_INTERVAL;
        if ((int)(threadTimer - sequenceTime) > threadQueueTicks) {
            // we're running ahead, so sleep for half the usual
            // amount and try again
            sleepAmount /= 2;
            continue;
        }

        threadQueueTimer = sequenceTime + threadQueueTicks;
        while (threadTimer < threadQueueTimer) {
            if (threadService) {
                threadService();
            }
            threadTimer++;
        }
    }

    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x9a51
movl %eax, 0xff7e(%rip)      # 0x197bc
movl 0xff70(%rip), %ecx      # 0x197b4
addl %eax, %ecx
movl %ecx, 0xff74(%rip)      # 0x197c0
cmpl %ecx, %eax
jae 0x9881
movq 0xff41(%rip), %rdx      # 0x19798
testq %rdx, %rdx
je 0x9873
callq *%rdx
movq 0xff33(%rip), %rdx      # 0x19798
movl 0xff51(%rip), %eax      # 0x197bc
movl 0xff4f(%rip), %ecx      # 0x197c0
jmp 0x9875
xorl %edx, %edx
incl %eax
movl %eax, 0xff3f(%rip)      # 0x197bc
cmpl %ecx, %eax
jb 0x9857
cmpl $0x0, 0xff18(%rip)      # 0x197a0
jne 0x9926
movl $0xc350, %r14d          # imm = 0xC350
leaq 0x8(%rsp), %rbx
movq $0x0, 0x8(%rsp)
movq %r14, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x21d0
callq 0x9a51
movl 0xfefa(%rip), %ecx      # 0x197bc
movl %ecx, %esi
subl %eax, %esi
movl 0xfee8(%rip), %edx      # 0x197b4
movl $0x61a8, %r14d          # imm = 0x61A8
cmpl %edx, %esi
jg 0x9919
addl %eax, %edx
movl %edx, 0xfee2(%rip)      # 0x197c0
movl $0xc350, %r14d          # imm = 0xC350
cmpl %edx, %ecx
jae 0x9919
movq 0xfea9(%rip), %rax      # 0x19798
testq %rax, %rax
je 0x990b
callq *%rax
movq 0xfe9b(%rip), %rax      # 0x19798
movl 0xfeb9(%rip), %ecx      # 0x197bc
movl 0xfeb7(%rip), %edx      # 0x197c0
jmp 0x990d
xorl %eax, %eax
incl %ecx
movl %ecx, 0xfea7(%rip)      # 0x197bc
cmpl %edx, %ecx
jb 0x98ef
cmpl $0x0, 0xfe80(%rip)      # 0x197a0
je 0x9899
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: ALSADrv_MIDI_QueueStop
void ALSADrv_MIDI_QueueStop(void)
{
    int result;

    if (queueRunning) {
        result = snd_seq_stop_queue(seq, seq_queue, NULL);
        if (result < 0) {
            ASS_Message("ALSADrv: snd_seq_stop_queue err %d\n", result);
        }

        while ((result = snd_seq_drop_output(seq)) > 0);
        if (result < 0) {
            ASS_Message("ALSADrv: could not drop output: err %d\n", result);
        }

        snd_seq_sync_output_queue(seq);

        queueRunning = 0;
    }
}

// Assembly:
cmpb $0x1, 0xfe81(%rip)      # 0x197b8
jne 0x99a3
pushq %rax
movq 0xfe4f(%rip), %rdi      # 0x19790
movl 0x6975(%rip), %esi      # 0x102bc
movl $0x20, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2210
testl %eax, %eax
jns 0x996a
leaq 0x1994(%rip), %rdi      # 0xb2f5
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0xfe1f(%rip), %rdi      # 0x19790
callq 0x20e0
testl %eax, %eax
jg 0x996a
jns 0x998c
leaq 0x1996(%rip), %rdi      # 0xb319
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movq 0xfdfd(%rip), %rdi      # 0x19790
callq 0x2070
movb $0x0, 0xfe19(%rip)      # 0x197b8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: ALSADrv_MIDI_SetTempo
void ALSADrv_MIDI_SetTempo(int tempo, int division)
{
    double tps;
    snd_seq_queue_tempo_t * t;

    ALSADrv_MIDI_QueueStop();

    snd_seq_queue_tempo_alloca(&t);
    snd_seq_queue_tempo_set_tempo(t, 60000000 / tempo);
    snd_seq_queue_tempo_set_ppq(t, division);
    snd_seq_set_queue_tempo(seq, seq_queue, t);

    tps = ( (double) tempo * (double) division ) / 60.0;
    threadQueueTicks = (int) ceil(tps / (double) THREAD_QUEUE_INTERVAL);

    ALSADrv_MIDI_QueueStart();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq 0x9930
callq 0x2160
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
callq 0x2160
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x20f0
movl $0x3938700, %eax        # imm = 0x3938700
xorl %edx, %edx
idivl %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x21e0
movq %r15, %rdi
movl %ebx, %esi
callq 0x22f0
movq 0xfd8b(%rip), %rdi      # 0x19790
movl 0x68b1(%rip), %esi      # 0x102bc
movq %r15, %rdx
callq 0x23a0
cvtsi2sd %r14d, %xmm1
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
divsd 0x1688(%rip), %xmm0     # 0xb0b0
divsd 0x1688(%rip), %xmm0     # 0xb0b8
callq 0x20a0
cvttsd2si %xmm0, %eax
movl %eax, 0xfd75(%rip)      # 0x197b4
callq 0x97b8
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: get_tick
static unsigned int get_tick(void)
{
    snd_seq_queue_status_t * status;
    int result;

    snd_seq_queue_status_alloca(&status);
    
    result = snd_seq_get_queue_status(seq, seq_queue, status);
    if (result < 0) {
        ASS_Message("ALSADrv: snd_seq_get_queue_status err %d\n", result);
        return 0;
    }

    return (unsigned int) snd_seq_queue_status_get_tick_time(status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x20c0
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
callq 0x20c0
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x20f0
movq 0xfd07(%rip), %rdi      # 0x19790
movl 0x682d(%rip), %esi      # 0x102bc
movq %r14, %rdx
callq 0x23b0
testl %eax, %eax
js 0x9aa7
movq %r14, %rdi
callq 0x2280
movl %eax, %ebx
jmp 0x9ab7
leaq 0x18bb(%rip), %rdi      # 0xb369
movl %eax, %esi
xorl %eax, %eax
callq 0x8b10
movl %ebx, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/zfs-generator.c
// Function: getRootOptions
int getRootOptions(char **options) {
	char *optionsval;
	int ret;
	char rw;
	size_t len;

	ret = cmdline_getParam("rootflags=", &optionsval);
	if (ret < 0) {
		fprintf(stderr, "Could not get rootflags= parameter. Error %d\n", ret);
		return 1;
	} else if (ret == 1) {
		// No rootflags specified, go with zfsutil
		optionsval = malloc((strlen("zfsutil") + 1) * sizeof(char));
		strcpy(optionsval, "zfsutil");
	} else if (ret != 0) {
		fprintf(stderr, "Unknown thing happened while reading the rootflags= paramter\n");
		return 2;
	}
	len = strlen(optionsval) + 1;
	// Do we already have zfsutil?
	if (strstr(optionsval, "zfsutil") == NULL) {
		len += strlen(",zfsutil");
	}
	// Do we need to switch to ro?
	ret = cmdline_getSwitch("rw", &rw);
	if (ret != 0) {
		fprintf(stderr, "Could not get rw parameter");
	} else if (rw != 1) {
		len += strlen(",ro");
	}
	// Allocate and fill
	*options = malloc(len * sizeof(char));
	strcpy(*options, optionsval);
	if (strstr(optionsval, "zfsutil") == NULL) {
		strcat(*options, ",zfsutil");
	}
	if (rw != 1) {
		strcat(*options, ",ro");
	}
	free(optionsval);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x9b6c5(%rip), %rdi     # 0x49d004
leaq -0x28(%rbp), %rsi
callq 0x40256b
testl %eax, %eax
js 0x401a46
cmpl $0x1, %eax
je 0x401963
testl %eax, %eax
jne 0x401a71
movq -0x28(%rbp), %r14
jmp 0x401981
movl $0x8, %edi
callq 0x4210d0
movq %rax, %r14
movq %rax, -0x28(%rbp)
movabsq $0x6c69747573667a, %rax # imm = 0x6C69747573667A
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4010d8
movq %rax, %r15
leaq 0x9b707(%rip), %rsi     # 0x49d09a
movq %r14, %rdi
callq 0x401078
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leaq (%r15,%rcx,8), %r14
incq %r14
leaq 0x9b6ca(%rip), %rdi     # 0x49d07b
leaq -0x19(%rbp), %rsi
callq 0x402632
testl %eax, %eax
jne 0x401a67
leaq 0x3(%r14), %rax
cmpb $0x1, -0x19(%rbp)
cmovneq %rax, %r14
movq %r14, %rdi
callq 0x4210d0
movq %rax, %r14
movq %rax, (%rbx)
movq -0x28(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x401020
leaq 0x9b6a8(%rip), %rsi     # 0x49d09a
movq %rbx, %rdi
callq 0x401078
testq %rax, %rax
jne 0x401a1b
movq %r14, %rdi
callq 0x4010d8
movabsq $0x6c69747573667a2c, %rcx # imm = 0x6C69747573667A2C
movq %rcx, (%r14,%rax)
movb $0x0, 0x8(%r14,%rax)
cmpb $0x1, -0x19(%rbp)
je 0x401a31
movq %r14, %rdi
callq 0x4010d8
movl $0x6f722c, (%r14,%rax)  # imm = 0x6F722C
movq %rbx, %rdi
callq 0x421410
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b5b8(%rip), %rsi     # 0x49d00f
movl %eax, %edx
xorl %eax, %eax
callq 0x40c530
movl $0x1, %eax
jmp 0x401a3b
callq 0x401100
jmp 0x4019ce
callq 0x401122
movl $0x2, %eax
jmp 0x401a3b
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/zfs-generator.c
// Function: getForce
int getForce(char **forceParam) {
	char *forceval;
	int ret;
	char force = 0;

	ret = cmdline_getParam("zfs_force=", &forceval);
	if (ret < 0) {
		fprintf(stderr, "Could not get zfs_force= parameter. Error %d\n", ret);
		return 1;
	} else if (ret == 1) {
		// No zfs_force parameter specified
	} else if (ret != 0) {
		fprintf(stderr, "Unknown thing happened while reading the zfs_force= paremter\n");
		return 2;
	} else {
		if (strcmp(forceval, "1") == 0) {
			force = 1;
		}
		free(forceval);
	}

	if (force == 0) {
		*forceParam = malloc(sizeof(char));
		strcpy(*forceParam, "");
	} else {
		*forceParam = malloc(4 * sizeof(char));
		strcpy(*forceParam, " -f");
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x9b610(%rip), %rdi     # 0x49d0a2
leaq -0x18(%rbp), %rsi
callq 0x40256b
testl %eax, %eax
js 0x401afe
je 0x401ab2
cmpl $0x1, %eax
je 0x401ae3
callq 0x401144
movl $0x2, %eax
jmp 0x401af5
movq -0x18(%rbp), %rdi
cmpb $0x31, (%rdi)
jne 0x401ade
movb 0x1(%rdi), %r14b
callq 0x421410
testb %r14b, %r14b
jne 0x401ae3
movl $0x4, %edi
callq 0x4210d0
movq %rax, (%rbx)
movl $0x662d20, (%rax)       # imm = 0x662D20
jmp 0x401af3
callq 0x421410
movl $0x1, %edi
callq 0x4210d0
movq %rax, (%rbx)
movb $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b59e(%rip), %rsi     # 0x49d0ad
movl %eax, %edx
xorl %eax, %eax
callq 0x40c530
movl $0x1, %eax
jmp 0x401af5
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/zfs-generator.c
// Function: getIgnoreCache
int getIgnoreCache(char *ignore) {
	char *ignoreval;
	int ret;

	ret = cmdline_getParam("zfs_ignorecache=", &ignoreval);
	if (ret < 0) {
		fprintf(stderr, "Could not get zfs_ignorecache= parameter. Error %d\n", ret);
		return 1;
	} else if (ret == 1) {
		*ignore = 0;
		return 0;
	} else if (ret != 0) {
		fprintf(stderr, "Unknown thing happened while reading the ignorecache= paremter\n");
		return 2;
	}
	if (strcmp(ignoreval, "1") == 0) {
		*ignore = 1;
		free(ignoreval);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x9b5e5(%rip), %rdi     # 0x49d119
leaq -0x18(%rbp), %rsi
callq 0x40256b
testl %eax, %eax
js 0x401b6c
je 0x401b50
cmpl $0x1, %eax
jne 0x401b8d
movb $0x0, (%r14)
xorl %ebx, %ebx
jmp 0x401b97
movq -0x18(%rbp), %rdi
xorl %ebx, %ebx
cmpb $0x31, (%rdi)
jne 0x401b97
cmpb $0x0, 0x1(%rdi)
jne 0x401b97
movb $0x1, (%r14)
callq 0x421410
jmp 0x401b97
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b5ad(%rip), %rsi     # 0x49d12a
movl %eax, %edx
xorl %eax, %eax
callq 0x40c530
movl $0x1, %ebx
jmp 0x401b97
callq 0x401166
movl $0x2, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/cmdline.c
// Function: getCmdline
int getCmdline(char **cmdline) {
	FILE *fd;
	size_t linelen;

	fd = fopen(CMDLINE_FILE, "r");
	if (fd == NULL) {
		perror("Cannot open kernel command line\n");
		return -1;
	}
	if (getline(cmdline, &linelen, fd) < 0) {
		perror("Cannot read kernel command line\n");
		fclose(fd);
		return -2;
	}
	fclose(fd);
	return linelen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x9b354(%rip), %rdi     # 0x49d855
leaq 0xb285f(%rip), %rsi     # 0x4b4d67
callq 0x4133f0
testq %rax, %rax
je 0x40253d
movq %rax, %rbx
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x40c8e0
testq %rax, %rax
js 0x402550
movq %rbx, %rdi
callq 0x412cc0
movl -0x18(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9b31f(%rip), %rdi     # 0x49d863
callq 0x40c820
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x402534
leaq 0x9b32d(%rip), %rdi     # 0x49d884
callq 0x40c820
movq %rbx, %rdi
callq 0x412cc0
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x402534
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/cmdline.c
// Function: cmdline_getParam
int cmdline_getParam(char *paramName, char **value) {
	char *cmdline = NULL;
	char *param;

	if (getCmdline(&cmdline) < 0) {
		return -1;
	}
	// Parse tokens of command line
	param = strtok(cmdline, " \t\n");
	do {
		if (strncmp(param, paramName, strlen(paramName)) == 0) {
			*value = malloc((strlen(param) - strlen(paramName) + 1) * sizeof(char));
			strcpy(*value, &(param[strlen(paramName)]));
			free(cmdline);
			return 0;
		}
	} while ((param = strtok(NULL, " \t\n")) != NULL);

	free(cmdline);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x4024ec
testl %eax, %eax
js 0x4025df
movq -0x30(%rbp), %rdi
leaq 0x9b307(%rip), %r12     # 0x49d8a5
movq %r12, %rsi
callq 0x424200
movq %rax, %r15
movq %rbx, %rdi
callq 0x4010d8
movq %rax, %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x401080
testl %eax, %eax
je 0x4025e6
xorl %edi, %edi
movq %r12, %rsi
callq 0x424200
movq %rax, %r15
testq %rax, %rax
jne 0x4025a9
movl $0x1, %ebx
jmp 0x402618
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x402621
movq %r15, %rdi
callq 0x4010d8
subq %r13, %rax
leaq 0x1(%rax), %rdi
callq 0x4210d0
movq %rax, %r12
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x4010d8
addq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x401020
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
callq 0x421410
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dasJ[P]sd-zfs/src/cmdline.c
// Function: cmdline_getSwitch
int cmdline_getSwitch(char *switchName, char *value) {
	char *cmdline = NULL;
	char *param;

	if (getCmdline(&cmdline) < 0) {
		return -1;
	}

	*value = 0;
	// Parse tokens of command line
	param = strtok(cmdline, " \t\n");
	do {
		if (strcmp(param, switchName) == 0) {
			*value = 1;
			break;
		}
	} while ((param = strtok(NULL, " \t\n")) != NULL);

	free(cmdline);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x4024ec
testl %eax, %eax
js 0x40268c
movb $0x0, (%rbx)
movq -0x20(%rbp), %rdi
leaq 0x9b241(%rip), %r15     # 0x49d8a5
movq %r15, %rsi
callq 0x424200
movq %rax, %rdi
movq %r14, %rsi
callq 0x4010b0
testl %eax, %eax
je 0x402693
xorl %edi, %edi
movq %r15, %rsi
callq 0x424200
testq %rax, %rax
jne 0x40266c
jmp 0x402696
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4026a1
movb $0x1, (%rbx)
movq -0x20(%rbp), %rdi
callq 0x421410
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/pack.c
// Function: usage
static int usage(conf_pack_t *conf) {
  fprintf(stderr, "\n");
  fprintf(stderr, "Usage: tbmate pack [options] <in.bed> <out.tbk>\n");
  fprintf(stderr, "\n");
  fprintf(stderr, "Options:\n");
  fprintf(stderr, "    -s        int1, int2, int32, int, float, double, stringf, stringd, ones ([-1,1] up to 3e-5 precision)\n");
  fprintf(stderr, "    -x        optional output of an index file containing address for each record.\n");
  fprintf(stderr, "    -n        integer number for nan or '.' [%f]. \n", conf->nan),
  fprintf(stderr, "    -m        optional message, it will also be used to locate index file.\n");
  fprintf(stderr, "    -h        This help\n");
  fprintf(stderr, "\n");
  fprintf(stderr, "Note, in.bed is an index-ordered bed file. Column 4 will be made a .tbk file.\n");
  fprintf(stderr, "\n");

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x5b293(%rip), %r12     # 0x5efe8
movq (%r12), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x49e9b(%rip), %rdi     # 0x4dc09
pushq $0x30
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3770
movq (%r12), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x49682(%rip), %rdi     # 0x4d415
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x49e91(%rip), %rdi     # 0x4dc3a
pushq $0x6a
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x49ee6(%rip), %rdi     # 0x4dca5
pushq $0x53
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rdi
cvtss2sd (%r15), %xmm0
leaq 0x49f1f(%rip), %rsi     # 0x4dcf9
movb $0x1, %al
callq 0x37e0
movq (%r12), %rcx
leaq 0x49f41(%rip), %rdi     # 0x4dd2d
pushq $0x4b
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x499e2(%rip), %rdi     # 0x4d7e4
pushq $0x18
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x49f56(%rip), %rdi     # 0x4dd79
pushq $0x4e
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rsi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3350
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/header.c
// Function: usage
static int usage() {
  fprintf(stderr, "\n");
  fprintf(stderr, "Usage: tbmate header [options] [.tbk [...]]\n");
  fprintf(stderr, "\n");
  fprintf(stderr, "Options:\n");
  fprintf(stderr, "    -m        set message for the first tbk (index path)\n");
  fprintf(stderr, "    -h        This help\n");
  fprintf(stderr, "\n");

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x5b0f6(%rip), %r15     # 0x5efe8
movq (%r15), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x4a014(%rip), %rdi     # 0x4df1d
pushq $0x2c
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3770
movq (%r15), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x494e9(%rip), %rdi     # 0x4d415
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r15), %rcx
leaq 0x4a009(%rip), %rdi     # 0x4df4a
pushq $0x39
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r15), %rcx
leaq 0x4988e(%rip), %rdi     # 0x4d7e4
pushq $0x18
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r15), %rsi
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x3350
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/main.c
// Function: main
int main(int argc, char *argv[]) {
  int ret;
  if (argc < 2) return usage();
  if (strcmp(argv[1], "pack") == 0) ret = main_pack(argc-1, argv+1);
  else if (strcmp(argv[1], "view") == 0) ret = main_view(argc-1, argv+1);
  else if (strcmp(argv[1], "header") == 0) ret = main_header(argc-1, argv+1);
  else if (strcmp(argv[1], "bundle") == 0) ret = main_bundle(argc-1, argv+1);
  else {
    fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
    return 1;
  }

  fflush(stdout);             /* not enough for remote file systems */
  fclose(stdout);

  return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jle 0x57f8
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x47953(%rip), %rsi     # 0x4d0b0
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x57b0
leaq 0x47945(%rip), %rsi     # 0x4d0b5
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x57be
leaq 0x47937(%rip), %rsi     # 0x4d0ba
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x57cc
leaq 0x4792b(%rip), %rsi     # 0x4d0c1
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
jne 0x5804
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0xaf98
jmp 0x57d8
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x99cb
jmp 0x57d8
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x6431
jmp 0x57d8
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0xa870
movl %eax, %ebx
movq 0x59817(%rip), %r14     # 0x5eff8
movq (%r14), %rdi
callq 0x38b0
movq (%r14), %rdi
callq 0x36c0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x3900
movl $0x1, %ebx
jmp 0x57f1
movq 0x597dd(%rip), %rax     # 0x5efe8
movq (%rax), %rdi
leaq 0x478b3(%rip), %rsi     # 0x4d0c8
movq %r14, %rdx
xorl %eax, %eax
callq 0x37e0
jmp 0x57fd
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/./wzio.h
// Function: line_get_fields
static inline void line_get_fields(const char *line, const char *sep, char ***fields, int *nfields) {

  *nfields = 1;
  const char *s = line;
  while ((s = strpbrk(s, sep)) != NULL) { (*nfields)++; s++; }

  *fields = calloc(*nfields, sizeof(char *));
  char *working = calloc(strlen(line) + 1, sizeof(char));
  strcpy(working, line);
  char *tok; int i;

  tok = strtok(working, sep);
  for (i=0; tok != NULL; ++i) {
    (*fields)[i] = strdup(tok);
    tok = strtok(NULL, sep);
  }
  free(working);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, (%rcx)
callq 0x3210
movl $0x1, %r13d
testq %rax, %rax
je 0x7968
incq %r13
movl %r13d, (%r12)
incq %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x3210
jmp 0x794c
movl $0x8, %esi
movq %r13, %rdi
callq 0x36a0
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x3380
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x36a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x3650
movq %r12, %rdi
movq %r14, %rsi
callq 0x3660
testq %rax, %rax
je 0x79d1
xorl %r15d, %r15d
movq %rax, %rdi
callq 0x35f0
movq (%rbx), %rcx
movq %rax, (%rcx,%r15)
xorl %edi, %edi
movq %r14, %rsi
callq 0x3660
addq $0x8, %r15
testq %rax, %rax
jne 0x79af
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3370
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/view.c
// Function: error
static void error(const char *format, ...) {
  va_list ap;
  va_start(ap, format);
  vfprintf(stderr, format, ap);
  va_end(ap);
  exit(EXIT_FAILURE);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x7a40
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x57581(%rip), %rax     # 0x5efe8
movq (%rax), %rdi
movq %r10, %rsi
callq 0x3300
movl $0x1, %edi
callq 0x3170
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/pack.c
// Function: free_data
void free_data(void *bd0) {
  int i;
  beddata_t *bd = (beddata_t*) bd0;
  for (i=0; i<bd->n; ++i) {
    free(bd->s[i]);
    bd->s[i] = 0;
  }
}

// Assembly:
cmpl $0x0, 0x28(%rdi)
jle 0x9534
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x3370
movq $0x0, (%rbx,%r14,8)
incq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x9510
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/pack.c
// Function: parse_data
void parse_data(bed1_t *b, char **fields, int nfields) {
  if (nfields < 4) wzfatal("No data in column 4.\n");
  int i; beddata_t *bd = (beddata_t*) b->data;
  for (i=0; i<bd->n; ++i) {
    bd->s[i] = strdup(fields[3+i]);
  }
  /* b->data = strdup(fields[3]); */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x3, %edx
jle 0x9577
movq 0x18(%rdi), %r14
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x956b
movq %rsi, %rbx
xorl %r12d, %r12d
movq 0x18(%rbx,%r12,8), %rdi
callq 0x35f0
movq %rax, (%r14,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x9555
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x44539(%rip), %rdi     # 0x4dab7
xorl %eax, %eax
callq 0x9585
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/./tbmate.h
// Function: tbf_next
static inline void tbf_next(tbf_t *tbf, tbk_t *tbk) {
  memset(tbk, 0, sizeof(tbk_t));
  tbk->offset_sample_beg = tbf->offset;
  tbk->tbf = tbf;
  
  char id[3];
  tbf_read(tbf, id, HDR_ID, 1);

  if (id[0] != 't' || id[1] != 'b' || id[2] != 'k')
    wzfatal("%s is not a valid tbk file.\n", tbf->fname);

  tbf_read(tbf, &tbk->version, HDR_VERSION, 1);
  tbf_read(tbf, &tbk->dtype,   HDR_DATA_TYPE, 1);
  tbf_read(tbf, &tbk->nmax,    HDR_NMAX, 1);
  tbf_read(tbf, &tbk->extra,   HDR_EXTRA, 1);
  tbk_set_sname_by_extra(tbk);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x2028, %edx           # imm = 0x2028
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3090
movq 0x8(%r14), %rax
movq %rax, 0x20(%rbx)
movq %r14, 0x8(%rbx)
movq (%r14), %rcx
leaq 0xd(%rsp), %r15
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x35b0
addq $0x3, 0x8(%r14)
cmpb $0x74, (%r15)
jne 0xaf86
cmpb $0x62, 0xe(%rsp)
jne 0xaf86
cmpb $0x6b, 0xf(%rsp)
jne 0xaf86
leaq 0x10(%rbx), %rdi
movq (%r14), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x35b0
addq $0x4, 0x8(%r14)
leaq 0x2018(%rbx), %rdi
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x35b0
addq $0x8, 0x8(%r14)
leaq 0x18(%rbx), %rdi
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x35b0
addq $0x8, 0x8(%r14)
leaq 0x28(%rbx), %r15
movq (%r14), %rcx
movl $0x1fe9, %esi           # imm = 0x1FE9
movl $0x1, %edx
movq %r15, %rdi
callq 0x35b0
addq $0x1fe9, 0x8(%r14)      # imm = 0x1FE9
cmpq $0x0, (%rbx)
jne 0xaf7c
movq %r15, %rdi
callq 0x3380
cmpb $0x0, 0x2(%rax,%r15)
je 0xaf7c
leaq (%rax,%r15), %rdi
addq $0x2, %rdi
callq 0x35f0
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r14), %rsi
leaq 0x4243c(%rip), %rdi     # 0x4d3cd
xorl %eax, %eax
callq 0xadd5
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/htslib/hts.c
// Function: hts_parse_format
int hts_parse_format(htsFormat *format, const char *str) {
    char fmt[8];
    const char *cp = scan_keyword(str, ',', fmt, sizeof fmt);

    format->version.minor = 0; // unknown
    format->version.major = 0; // unknown

    if (strcmp(fmt, "sam") == 0) {
        format->category          = sequence_data;
        format->format            = sam;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strcmp(fmt, "bam") == 0) {
        format->category          = sequence_data;
        format->format            = bam;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else if (strcmp(fmt, "cram") == 0) {
        format->category          = sequence_data;
        format->format            = cram;
        format->compression       = custom;
        format->compression_level = -1;
    } else if (strcmp(fmt, "vcf") == 0) {
        format->category          = variant_data;
        format->format            = vcf;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strcmp(fmt, "bcf") == 0) {
        format->category          = variant_data;
        format->format            = bcf;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else {
        return -1;
    }

    return hts_parse_opt_list(format, cp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movzbl (%rbx), %r12d
testl %r12d, %r12d
je 0xe059
cmpl $0x2c, %r12d
je 0xe059
cmpq $0x6, %r15
ja 0xe054
callq 0x3690
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rsp,%r15)
incq %r15
incq %rbx
jmp 0xe02c
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movb $0x0, (%rsp,%r15)
movl $0x0, 0x8(%r14)
cmpl $0x6d6173, (%rsp)       # imm = 0x6D6173
je 0xe0bd
movw $0xffff, %cx            # imm = 0xFFFF
movl $0x2, %eax
cmpl $0x6d6162, (%rsp)       # imm = 0x6D6162
je 0xe0cb
movl $0x6d617263, %edx       # imm = 0x6D617263
xorl (%rsp), %edx
movzbl 0x4(%rsp), %esi
orl %edx, %esi
je 0xe0d5
cmpl $0x666376, (%rsp)       # imm = 0x666376
je 0xe0e4
cmpl $0x666362, (%rsp)       # imm = 0x666362
je 0xe0ee
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x4001b(%rip), %xmm0    # 0x4e0e0
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0xe0f6
movsd 0x4001d(%rip), %xmm0    # 0x4e0f0
jmp 0xe0f6
movsd 0x40023(%rip), %xmm0    # 0x4e100
movl $0x3, %eax
jmp 0xe0f6
movsd 0x40024(%rip), %xmm0    # 0x4e110
jmp 0xe0c5
movsd 0x4002a(%rip), %xmm0    # 0x4e120
movlps %xmm0, (%r14)
movl %eax, 0xc(%r14)
movw %cx, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xdf6b
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/htslib/regidx.c
// Function: regidx_build_index
int _regidx_build_index(regidx_t *idx)
{
    int iseq;
    for (iseq=0; iseq<idx->nseq; iseq++)
    {
        reglist_t *list = &idx->seq[iseq];
        int j,k, imax = 0;   // max index bin
        for (j=0; j<list->nregs; j++)
        {
            int ibeg = list->regs[j].start >> LIDX_SHIFT;
            int iend = list->regs[j].end >> LIDX_SHIFT;
            if ( imax < iend + 1 )
            {
                int old_imax = imax; 
                imax = iend + 1;
                kroundup32(imax);
                list->idx = (int*) realloc(list->idx, imax*sizeof(int));
                for (k=old_imax; k<imax; k++) list->idx[k] = -1;
            }
            if ( ibeg==iend )
            {
                if ( list->idx[ibeg]<0 ) list->idx[ibeg] = j;
            }
            else
            {
                for (k=ibeg; k<=iend; k++)
                    if ( list->idx[k]<0 ) list->idx[k] = j;
            }
            list->nidx = iend + 1;
        }
    }
    return 0;
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
jle 0x12690
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %esi, %esi
movq %rdi, 0x10(%rsp)
movq 0x8(%rdi), %rcx
leaq (%rsi,%rsi,4), %rdx
cmpl $0x0, 0xc(%rcx,%rdx,8)
jle 0x12673
movq %rsi, 0x18(%rsp)
leaq (%rcx,%rdx,8), %r15
xorl %r12d, %r12d
xorl %edx, %edx
movq %r15, 0x20(%rsp)
movq 0x18(%r15), %rax
movl (%rax,%r12,8), %ebx
movl 0x4(%rax,%r12,8), %r14d
movl %r14d, %r13d
shrl $0xd, %r13d
cmpl %r13d, %edx
jg 0x12616
movl %r14d, %eax
shrl $0xe, %eax
orl %r13d, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %ebp
shrl $0x10, %ebp
orl %ecx, %ebp
leal 0x1(%rbp), %eax
movl %eax, 0xc(%rsp)
movq (%r15), %rdi
leaq 0x4(,%rbp,4), %rsi
movl %edx, %r15d
callq 0x37b0
movl %r15d, %ecx
movq 0x20(%rsp), %r15
movq %rax, (%r15)
subl %ecx, %ebp
jl 0x12612
movl %ecx, %ecx
leaq (%rax,%rcx,4), %rdi
leaq 0x4(,%rbp,4), %rdx
movl $0xff, %esi
callq 0x3090
movl 0xc(%rsp), %edx
movl %ebx, %eax
shrl $0xd, %eax
cmpl %r13d, %eax
jne 0x1262f
movq (%r15), %rcx
cmpl $0x0, (%rcx,%rax,4)
jns 0x12650
movl %r12d, (%rcx,%rax,4)
jmp 0x12650
ja 0x12650
movq (%r15), %rax
shrl $0xd, %ebx
shrl $0xd, %r14d
incq %r14
cmpl $0x0, (%rax,%rbx,4)
jns 0x12648
movl %r12d, (%rax,%rbx,4)
incq %rbx
cmpq %rbx, %r14
jne 0x1263e
incl %r13d
movl %r13d, 0x8(%r15)
incq %r12
movslq 0xc(%r15), %rax
cmpq %rax, %r12
jl 0x12593
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
movq 0x18(%rsp), %rsi
incq %rsi
movslq %eax, %rcx
cmpq %rcx, %rsi
jl 0x1256d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/htslib/regidx.c
// Function: regidx_parse_tab
int regidx_parse_tab(const char *line, char **chr_beg, char **chr_end, reg_t *reg, void *payload, void *usr)
{
    char *ss = (char*) line;
    while ( *ss && isspace(*ss) ) ss++;
    if ( !*ss ) return -1;      // skip blank lines
    if ( *ss=='#' ) return -1;  // skip comments
    
    char *se = ss;
    while ( *se && !isspace(*se) ) se++;
    if ( !*se ) { fprintf(stderr,"Could not parse bed line: %s\n", line); return -2; }

    *chr_beg = ss;
    *chr_end = se-1;

    ss = se+1;
    reg->start = hts_parse_decimal(ss, &se, 0) - 1;
    if ( ss==se ) { fprintf(stderr,"Could not parse bed line: %s\n", line); return -2; }

    if ( !se[0] || !se[1] )
        reg->end = reg->start;
    else
    {
        ss = se+1;
        reg->end = hts_parse_decimal(ss, &se, 0);
        if ( ss==se ) reg->end = reg->start;
        else reg->end--;
    }
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb (%rdi), %bl
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %bl, %bl
je 0x12faa
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq %rcx, 0x8(%rsp)
callq 0x3410
movq (%rax), %rax
leaq 0x1(%r14), %r15
movsbq %bl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x12f02
movb (%r15), %bl
incq %r15
testb %bl, %bl
jne 0x12ee8
jmp 0x12faa
cmpb $0x23, %bl
je 0x12faa
leaq -0x1(%r15), %rcx
movq %rcx, 0x10(%rsp)
movsbq %bl, %rdx
testb $0x20, 0x1(%rax,%rdx,2)
jne 0x12f36
movb (%r15), %bl
incq %r15
testb %bl, %bl
jne 0x12f14
decq %r15
movq %r15, 0x10(%rsp)
jmp 0x12fc7
leaq -0x1(%r15), %rax
leaq 0x10(%rsp), %rbp
movq %rax, (%rbp)
movq %rcx, (%r13)
leaq -0x2(%r15), %rax
movq %rax, (%r12)
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x11122
decl %eax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq (%rbp), %r12
cmpq %r12, %r15
je 0x12fc7
cmpb $0x0, (%r12)
je 0x12fa5
cmpb $0x0, 0x1(%r12)
je 0x12fa5
incq %r12
leaq 0x10(%rsp), %r14
xorl %ebp, %ebp
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x11122
cmpq (%r14), %r12
je 0x12fbb
decl %eax
movq 0x8(%rsp), %rcx
movl %eax, 0x4(%rcx)
jmp 0x12faa
movl %eax, 0x4(%rcx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rcx
movl (%rcx), %eax
movl %eax, 0x4(%rcx)
jmp 0x12faa
movq 0x4c01a(%rip), %rax     # 0x5efe8
movq (%rax), %rdi
leaq 0x3b893(%rip), %rsi     # 0x4e86b
movq %r14, %rdx
xorl %eax, %eax
callq 0x37e0
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x12faa
// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/htslib/regidx.c
// Function: regidx_destroy
void regidx_destroy(regidx_t *idx)
{
    int i, j;
    for (i=0; i<idx->nseq; i++)
    {
        reglist_t *list = &idx->seq[i];
        if ( idx->free )
        {
            for (j=0; j<list->nregs; j++)
                idx->free(list->payload + idx->payload_size*j);
        }
        free(list->payload);
        free(list->regs);
        free(list->idx);
    }
    free(idx->seq_names);
    free(idx->seq);
    free(idx->str.s);
    free(idx->payload);
    khash_str2int_destroy_free(idx->seq2regs);
    free(idx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x1316c
xorl %r14d, %r14d
leaq (%r14,%r14,4), %r15
shlq $0x3, %r15
addq 0x8(%rbx), %r15
cmpq $0x0, 0x20(%rbx)
je 0x13147
cmpl $0x0, 0xc(%r15)
jle 0x13147
xorl %r12d, %r12d
movslq 0x5c(%rbx), %rdi
movslq %r12d, %r12
imulq %r12, %rdi
addq 0x20(%r15), %rdi
callq *0x20(%rbx)
incl %r12d
cmpl 0xc(%r15), %r12d
jl 0x1312c
movq 0x20(%r15), %rdi
callq 0x3370
movq 0x18(%r15), %rdi
callq 0x3370
movq (%r15), %rdi
callq 0x3370
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x1310f
movq 0x18(%rbx), %rdi
callq 0x3370
movq 0x8(%rbx), %rdi
callq 0x3370
movq 0x48(%rbx), %rdi
callq 0x3370
movq 0x60(%rbx), %rdi
callq 0x3370
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x13202
movl (%r14), %eax
testl %eax, %eax
je 0x131df
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rcx
movq %r12, %rdx
shrq $0x4, %rdx
movl (%rcx,%rdx,4), %edx
movl %r15d, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0x131d1
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x3370
movl (%r14), %eax
incq %r12
movl %eax, %ecx
addl $0x2, %r15d
cmpq %rcx, %r12
jb 0x131a6
movq 0x18(%r14), %rdi
callq 0x3370
movq 0x10(%r14), %rdi
callq 0x3370
movq 0x20(%r14), %rdi
callq 0x3370
movq %r14, %rdi
callq 0x3370
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3370