LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jfaudiolib/src/driver_sdl.c
// Function: fillData
static void fillData(void * userdata, Uint8 * ptr, int remaining)
{
    int len;
    char *sptr;

    (void)userdata;

    while (remaining > 0) {
        if (MixBufferUsed == MixBufferSize) {
            MixCallBack();
            
            MixBufferUsed = 0;
            MixBufferCurrent++;
            if (MixBufferCurrent >= MixBufferCount) {
                MixBufferCurrent -= MixBufferCount;
            }
        }
        
        while (remaining > 0 && MixBufferUsed < MixBufferSize) {
            sptr = MixBuffer + (MixBufferCurrent * MixBufferSize) + MixBufferUsed;
            
            len = MixBufferSize - MixBufferUsed;
            if (remaining < len) {
                len = remaining;
            }
            
            memcpy(ptr, sptr, len);
            
            ptr += len;
            MixBufferUsed += len;
            remaining -= len;
        }
    }
}

// Assembly:
testl %edx, %edx
jle 0x8efe
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl 0x10926(%rip), %eax     # 0x1977c
cmpl 0x10914(%rip), %eax     # 0x19770
jne 0x8e8a
callq *0x1091c(%rip)          # 0x19780
movl $0x0, 0x1090e(%rip)     # 0x1977c
movl 0x10904(%rip), %eax     # 0x19778
incl %eax
movl %eax, 0x108fc(%rip)     # 0x19778
subl 0x108f2(%rip), %eax     # 0x19774
jl 0x8e8a
movl %eax, 0x108ee(%rip)     # 0x19778
movslq 0x108df(%rip), %r12     # 0x19770
movl 0x108e4(%rip), %r13d    # 0x1977c
cmpl %r12d, %r13d
jge 0x8ee8
movslq 0x108d4(%rip), %rbp     # 0x19778
imulq %r12, %rbp
addq 0x108b9(%rip), %rbp     # 0x19768
movslq %r13d, %r13
movq %rbp, %rsi
addq %r13, %rsi
movl %r12d, %eax
subl %r13d, %eax
cmpl %eax, %ebx
cmovll %ebx, %eax
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2170
addq %r15, %r14
addl %r15d, %r13d
subl %r15d, %ebx
jle 0x8ee1
cmpl %r12d, %r13d
jl 0x8eaf
movl %r13d, 0x10894(%rip)    # 0x1977c
testl %ebx, %ebx
jg 0x8e50
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jfaudiolib/src/driver_sdl.c
// Function: SDLDrv_PCM_BeginPlayback
int SDLDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize,
						int NumDivisions, void ( *CallBackFunc )( void ) )
{
    if (!Initialised) {
        ErrorCode = SDLErr_Uninitialised;
        return SDLErr_Error;
    }
    
    if (Playing) {
        SDLDrv_PCM_StopPlayback();
    }

    MixBuffer = BufferStart;
    MixBufferSize = BufferSize;
    MixBufferCount = NumDivisions;
    MixBufferCurrent = 0;
    MixBufferUsed = 0;
    MixCallBack = CallBackFunc;
    
    // prime the buffer
    MixCallBack();

    SDL_PauseAudio(0);
    
    Playing = 1;
    
    return SDLErr_Ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x10847(%rip)     # 0x19754
je 0x8f6f
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
cmpb $0x1, 0x1083f(%rip)     # 0x19760
jne 0x8f34
movl $0x1, %edi
callq 0x2160
movb $0x0, 0x1082c(%rip)     # 0x19760
movq %r15, 0x1082d(%rip)     # 0x19768
movl %r14d, 0x1082e(%rip)    # 0x19770
movl %ebp, 0x1082c(%rip)     # 0x19774
xorl %ebp, %ebp
movl %ebp, 0x10828(%rip)     # 0x19778
movl %ebp, 0x10826(%rip)     # 0x1977c
movq %rbx, 0x10823(%rip)     # 0x19780
callq *%rbx
xorl %edi, %edi
callq 0x2160
movb $0x1, 0x107f3(%rip)     # 0x19760
jmp 0x8f7e
movl $0x1, 0x107d7(%rip)     # 0x19750
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: ALSADrv_MIDI_Shutdown
void ALSADrv_MIDI_Shutdown(void)
{
    ALSADrv_MIDI_HaltPlayback();
    
    if (seq_queue >= 0) {
        snd_seq_free_queue(seq, seq_queue);
    }
    if (seq_port >= 0) {
        snd_seq_delete_simple_port(seq, seq_port);
    }
    if (seq) {
        snd_seq_close(seq);
    }
    seq_queue = -1;
    seq_port = -1;
    seq = 0;
}

// Assembly:
pushq %rax
callq 0x969a
movl 0x70b9(%rip), %esi      # 0x102bc
testl %esi, %esi
js 0x9213
movq 0x10582(%rip), %rdi     # 0x19790
callq 0x2140
movl 0x709f(%rip), %esi      # 0x102b8
testl %esi, %esi
js 0x9229
movq 0x1056c(%rip), %rdi     # 0x19790
callq 0x2320
movq 0x10560(%rip), %rdi     # 0x19790
testq %rdi, %rdi
je 0x923a
callq 0x22a0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x7077(%rip)      # 0x102bc
movl %eax, 0x706d(%rip)      # 0x102b8
movq $0x0, 0x1053a(%rip) # 0x19790
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: Func_NoteOff
static void Func_NoteOff( int channel, int key, int velocity )
{
    snd_seq_event_t ev;
    snd_seq_ev_clear(&ev);
    snd_seq_ev_set_noteoff(&ev, channel, key, velocity);
    sequence_event(&ev);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movups %xmm0, 0xc(%rax)
movb $0x7, (%rax)
movb %dil, 0x10(%rax)
movb %sil, 0x11(%rax)
movb %dl, 0x12(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x7035(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x1052c(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x7023(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x104ed(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x92df
movq 0x104da(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x92af
jns 0x92d1
leaq 0x1f94(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x104b8(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x92ef
leaq 0x1feb(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movb $0x6, (%rax)
movb %dil, 0x10(%rax)
movb %sil, 0x11(%rax)
movb %dl, 0x12(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6f99(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x10490(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6f87(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x10451(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x937b
movq 0x1043e(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x934b
jns 0x936d
leaq 0x1ef8(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x1041c(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x938b
leaq 0x1f4f(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movb $0x8, (%rax)
movb %dil, 0x10(%rax)
movb %sil, 0x11(%rax)
movb %dl, 0x12(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6efd(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x103f4(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6eeb(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x103b5(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x9417
movq 0x103a2(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x93e7
jns 0x9409
leaq 0x1e5c(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x10380(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x9427
leaq 0x1eb3(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movups %xmm0, 0xc(%rax)
movb $0xa, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x14(%rax)
movl %edx, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6e62(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x10359(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6e50(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x1031a(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x94b2
movq 0x10307(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x9482
jns 0x94a4
leaq 0x1dc1(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x102e5(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x94c2
leaq 0x1e18(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movups %xmm0, 0xc(%rax)
movb $0xb, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6dca(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x102c1(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6db8(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x10282(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x954a
movq 0x1026f(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x951a
jns 0x953c
leaq 0x1d29(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x1024d(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x955a
leaq 0x1d80(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movups %xmm0, 0xc(%rax)
movb $0xc, (%rax)
movb %dil, 0x10(%rax)
movl %esi, 0x18(%rax)
movw $0xfdfe, 0xe(%rax)      # imm = 0xFDFE
movb 0x6d32(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x10229(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6d20(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x101ea(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x95e2
movq 0x101d7(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x95b2
jns 0x95d4
leaq 0x1c91(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x101b5(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x95f2
leaq 0x1ce8(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movups %xmm0, 0xc(%rax)
movb $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 0x6c8f(%rip), %cl       # 0x102b8
movb %cl, 0xd(%rax)
andb $-0x10, 0x1(%rax)
movl 0x10186(%rip), %ecx     # 0x197bc
movl %ecx, 0x4(%rax)
movb 0x6c7d(%rip), %cl       # 0x102bc
movb %cl, 0x3(%rax)
movq 0x10147(%rip), %rdi     # 0x19790
movq %rax, %rsi
callq 0x2250
testl %eax, %eax
js 0x9685
movq 0x10134(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x9655
jns 0x9677
leaq 0x1bee(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x10112(%rip), %rdi     # 0x19790
callq 0x2070
jmp 0x9695
leaq 0x1c45(%rip), %rdi      # 0xb2d1
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x969a
movq %rbx, 0x100a8(%rip)     # 0x19798
movl $0x0, 0x100a6(%rip)     # 0x197a0
callq 0x9741
leaq 0x100a2(%rip), %rdi     # 0x197a8
leaq 0xa8(%rip), %rdx        # 0x97b5
xorl %ebx, %ebx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2380
testl %eax, %eax
je 0x9736
leaq 0x1ac6(%rip), %rdi      # 0xb1e9
xorl %eax, %eax
callq 0x8aa8
callq 0x969a
movl $0x8, %ebx
jmp 0x973d
movb $0x1, 0x10073(%rip)     # 0x197b0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x10070(%rip)     # 0x197b8
jne 0x97b4
pushq %rax
movq 0x1003e(%rip), %rdi     # 0x19790
movl 0x6b64(%rip), %esi      # 0x102bc
movl $0x1e, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2200
testl %eax, %eax
jns 0x977b
leaq 0x1ac5(%rip), %rdi      # 0xb237
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0x1000e(%rip), %rdi     # 0x19790
callq 0x2370
testl %eax, %eax
jg 0x977b
jns 0x979d
leaq 0x1ac8(%rip), %rdi      # 0xb25c
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0xffec(%rip), %rdi      # 0x19790
callq 0x2070
movb $0x1, 0x10008(%rip)     # 0x197b8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x99be
movl %eax, 0xfff5(%rip)      # 0x197bc
movl 0xffe7(%rip), %ecx      # 0x197b4
addl %eax, %ecx
movl %ecx, 0xffeb(%rip)      # 0x197c0
cmpl %ecx, %eax
jae 0x97fd
movq 0xffb8(%rip), %rax      # 0x19798
testq %rax, %rax
je 0x97e7
callq *%rax
movl 0xffcf(%rip), %eax      # 0x197bc
incl %eax
movl %eax, 0xffc7(%rip)      # 0x197bc
cmpl 0xffc5(%rip), %eax      # 0x197c0
jb 0x97d9
cmpl $0x0, 0xff9c(%rip)      # 0x197a0
jne 0x9893
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 0x21c0
callq 0x99be
movl 0xff7e(%rip), %edx      # 0x197bc
subl %eax, %edx
movl 0xff6e(%rip), %ecx      # 0x197b4
movl $0x61a8, %r14d          # imm = 0x61A8
cmpl %ecx, %edx
jg 0x988a
addl %eax, %ecx
movl %ecx, 0xff68(%rip)      # 0x197c0
movl $0xc350, %r14d          # imm = 0xC350
cmpl %ecx, 0xff58(%rip)      # 0x197bc
jae 0x988a
movq 0xff2b(%rip), %rax      # 0x19798
testq %rax, %rax
je 0x9874
callq *%rax
movl 0xff42(%rip), %eax      # 0x197bc
incl %eax
movl %eax, 0xff3a(%rip)      # 0x197bc
cmpl 0xff38(%rip), %eax      # 0x197c0
jb 0x9866
cmpl $0x0, 0xff0f(%rip)      # 0x197a0
je 0x9815
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0xff14(%rip)      # 0x197b8
jne 0x9910
pushq %rax
movq 0xfee2(%rip), %rdi      # 0x19790
movl 0x6a08(%rip), %esi      # 0x102bc
movl $0x20, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2200
testl %eax, %eax
jns 0x98d7
leaq 0x19b7(%rip), %rdi      # 0xb285
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0xfeb2(%rip), %rdi      # 0x19790
callq 0x20e0
testl %eax, %eax
jg 0x98d7
jns 0x98f9
leaq 0x19b9(%rip), %rdi      # 0xb2a9
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movq 0xfe90(%rip), %rdi      # 0x19790
callq 0x2070
movb $0x0, 0xfeac(%rip)      # 0x197b8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x989d
callq 0x2150
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
callq 0x2150
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 0x21d0
movq %r15, %rdi
movl %ebx, %esi
callq 0x22e0
movq 0xfe1e(%rip), %rdi      # 0x19790
movl 0x6944(%rip), %esi      # 0x102bc
movq %r15, %rdx
callq 0x2390
cvtsi2sd %r14d, %xmm1
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
divsd 0x16ab(%rip), %xmm0     # 0xb040
divsd 0x16ab(%rip), %xmm0     # 0xb048
callq 0x20a0
cvttsd2si %xmm0, %eax
movl %eax, 0xfe08(%rip)      # 0x197b4
callq 0x9741
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xfd9a(%rip), %rdi      # 0x19790
movl 0x68c0(%rip), %esi      # 0x102bc
movq %r14, %rdx
callq 0x23a0
testl %eax, %eax
js 0x9a14
movq %r14, %rdi
callq 0x2270
movl %eax, %ebx
jmp 0x9a24
leaq 0x18de(%rip), %rdi      # 0xb2f9
movl %eax, %esi
xorl %eax, %eax
callq 0x8aa8
movl %ebx, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_09/copy_io.c
// Function: main
int main(void)
{
  int c;
  int last_c = '\0';

  while ((c = getchar()) != EOF)
  {
    if (c != ' ' || last_c != ' ')
    {
      putchar(c);
    }

    last_c = c;
  }

  return 0;
}

// Assembly:
pushq %rbx
callq 0x1040
cmpl $-0x1, %eax
je 0x1178
xorl %ebx, %ebx
movl %ebx, %ecx
movl %eax, %ebx
xorl $0x20, %eax
xorl $0x20, %ecx
orl %eax, %ecx
je 0x116e
movl %ebx, %edi
callq 0x1030
callq 0x1040
cmpl $-0x1, %eax
jne 0x1159
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9b6e5(%rip), %rdi     # 0x49d004
leaq -0x28(%rbp), %rsi
callq 0x402557
testl %eax, %eax
js 0x401a20
je 0x401956
cmpl $0x1, %eax
jne 0x401a4b
movl $0x8, %edi
callq 0x4210c0
movq %rax, -0x28(%rbp)
movabsq $0x6c69747573667a, %rcx # imm = 0x6C69747573667A
movq %rcx, (%rax)
movq -0x28(%rbp), %r14
movq %r14, %rdi
callq 0x4010d8
movq %rax, %r15
leaq 0x9b72e(%rip), %rsi     # 0x49d09a
movq %r14, %rdi
callq 0x401078
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leaq (%r15,%rcx,8), %r14
incq %r14
leaq 0x9b6f1(%rip), %rdi     # 0x49d07b
leaq -0x19(%rbp), %rsi
callq 0x40261e
testl %eax, %eax
jne 0x401a41
leaq 0x3(%r14), %rax
cmpb $0x1, -0x19(%rbp)
cmovneq %rax, %r14
movq %r14, %rdi
callq 0x4210c0
movq %rax, %r14
movq %rax, (%rbx)
movq -0x28(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x401020
leaq 0x9b6cf(%rip), %rsi     # 0x49d09a
movq %rbx, %rdi
callq 0x401078
testq %rax, %rax
jne 0x4019f4
movq %r14, %rdi
callq 0x4010d8
movabsq $0x6c69747573667a2c, %rcx # imm = 0x6C69747573667A2C
movq %rcx, (%r14,%rax)
movb $0x0, 0x8(%r14,%rax)
cmpb $0x1, -0x19(%rbp)
je 0x401a0a
movq %r14, %rdi
callq 0x4010d8
movl $0x6f722c, (%r14,%rax)  # imm = 0x6F722C
movq -0x28(%rbp), %rdi
callq 0x421400
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b5de(%rip), %rsi     # 0x49d00f
movl %eax, %edx
xorl %eax, %eax
callq 0x40c520
movl $0x1, %eax
jmp 0x401a15
callq 0x401100
jmp 0x4019a7
callq 0x401122
movl $0x2, %eax
jmp 0x401a15
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9b637(%rip), %rdi     # 0x49d0a2
leaq -0x20(%rbp), %rsi
callq 0x402557
testl %eax, %eax
js 0x401ae0
je 0x401a8b
cmpl $0x1, %eax
je 0x401aae
callq 0x401144
movl $0x2, %eax
jmp 0x401ac0
movq -0x20(%rbp), %r14
leaq 0x9e402(%rip), %rsi     # 0x49fe98
movq %r14, %rdi
callq 0x4010b0
movl %eax, %r15d
movq %r14, %rdi
callq 0x421400
testl %r15d, %r15d
je 0x401acb
movl $0x1, %edi
callq 0x4210c0
movq %rax, (%rbx)
movb $0x0, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x4210c0
movq %rax, (%rbx)
movl $0x662d20, (%rax)       # imm = 0x662D20
jmp 0x401abe
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b5bc(%rip), %rsi     # 0x49d0ad
movl %eax, %edx
xorl %eax, %eax
callq 0x40c520
movl $0x1, %eax
jmp 0x401ac0
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9b604(%rip), %rdi     # 0x49d119
leaq -0x20(%rbp), %rsi
callq 0x402557
testl %eax, %eax
js 0x401b58
je 0x401b31
cmpl $0x1, %eax
jne 0x401b7a
movb $0x0, (%rbx)
xorl %r14d, %r14d
jmp 0x401b85
movq -0x20(%rbp), %r15
leaq 0x9e35c(%rip), %rsi     # 0x49fe98
movq %r15, %rdi
callq 0x4010b0
xorl %r14d, %r14d
testl %eax, %eax
jne 0x401b85
movb $0x1, (%rbx)
movq %r15, %rdi
callq 0x421400
jmp 0x401b85
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b5c1(%rip), %rsi     # 0x49d12a
movl %eax, %edx
xorl %eax, %eax
callq 0x40c520
movl $0x1, %r14d
jmp 0x401b85
callq 0x401166
movl $0x2, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9b368(%rip), %rdi     # 0x49d855
leaq 0xb2873(%rip), %rsi     # 0x4b4d67
callq 0x4133e0
testq %rax, %rax
je 0x402529
movq %rax, %rbx
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x40c8d0
testq %rax, %rax
js 0x40253c
movq %rbx, %rdi
callq 0x412cb0
movl -0x18(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9b333(%rip), %rdi     # 0x49d863
callq 0x40c810
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x402520
leaq 0x9b341(%rip), %rdi     # 0x49d884
callq 0x40c810
movq %rbx, %rdi
callq 0x412cb0
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x402520
// File: /workspace/github_c_makefile_star2_O1/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 0x4024d8
testl %eax, %eax
js 0x4025cb
movq -0x30(%rbp), %rdi
leaq 0x9b31b(%rip), %r12     # 0x49d8a5
movq %r12, %rsi
callq 0x4241f0
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 0x4025d2
xorl %edi, %edi
movq %r12, %rsi
callq 0x4241f0
movq %rax, %r15
testq %rax, %rax
jne 0x402595
movl $0x1, %ebx
jmp 0x402604
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x40260d
movq %r15, %rdi
callq 0x4010d8
subq %r13, %rax
leaq 0x1(%rax), %rdi
callq 0x4210c0
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 0x421400
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_O1/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 0x4024d8
testl %eax, %eax
js 0x402678
movb $0x0, (%rbx)
movq -0x20(%rbp), %rdi
leaq 0x9b255(%rip), %r15     # 0x49d8a5
movq %r15, %rsi
callq 0x4241f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x4010b0
testl %eax, %eax
je 0x40267f
xorl %edi, %edi
movq %r15, %rsi
callq 0x4241f0
testq %rax, %rax
jne 0x402658
jmp 0x402682
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x40268d
movb $0x1, (%rbx)
movq -0x20(%rbp), %rdi
callq 0x421400
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-lab[P]tbmate/main.c
// Function: main.cold.1
static int usage()
{
  fprintf(stderr, "\n");
  fprintf(stderr, "Program: tbmate (Tabix Mate)\n");
  fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
  fprintf(stderr, "Contact: Wanding Zhou<wanding.zhou@pennmedicine.upenn.edu>\n\n");
  fprintf(stderr, "Usage:   tbmate <command> [options]\n\n");
  fprintf(stderr, "Command:\n");
  fprintf(stderr, "     pack         pack data to tbk\n");
  fprintf(stderr, "     view         view data stored in tbk\n");
  fprintf(stderr, "     header       view and set tbk data header\n");
  fprintf(stderr, "     bundle       bundle tbk into a multi-tbk.\n");
  fprintf(stderr, "\n");

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x5a6d9(%rip), %r12     # 0x5dfe8
movq (%r12), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x497c2(%rip), %rdi     # 0x4d0ea
pushq $0x1d
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3770
movq (%r12), %rdi
leaq 0x497c6(%rip), %rsi     # 0x4d108
leaq 0x497cc(%rip), %rdx     # 0x4d115
xorl %eax, %eax
callq 0x37e0
movq (%r12), %rcx
leaq 0x497c7(%rip), %rdi     # 0x4d122
pushq $0x3c
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x497ee(%rip), %rdi     # 0x4d15f
pushq $0x25
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x497fe(%rip), %rdi     # 0x4d185
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x497f2(%rip), %rdi     # 0x4d18f
pushq $0x23
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x49800(%rip), %rdi     # 0x4d1b3
pushq $0x2a
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x49815(%rip), %rdi     # 0x4d1de
pushq $0x2f
popq %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x3770
movq (%r12), %rcx
leaq 0x4982b(%rip), %rdi     # 0x4d20e
movq %r15, %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_O1/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 0x5a293(%rip), %r12     # 0x5dfe8
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 0x4967e(%rip), %rdi     # 0x4d411
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 0x499de(%rip), %rdi     # 0x4d7e0
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_O1/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 0x5a0f0(%rip), %r15     # 0x5dfe8
movq (%r15), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x4a00e(%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 0x494df(%rip), %rdi     # 0x4d411
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r15), %rcx
leaq 0x4a003(%rip), %rdi     # 0x4df4a
pushq $0x39
popq %rsi
movq %r14, %rdx
callq 0x3770
movq (%r15), %rcx
leaq 0x49884(%rip), %rdi     # 0x4d7e0
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_O1/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 0x5938
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x47813(%rip), %rsi     # 0x4d0b0
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x58f0
leaq 0x47805(%rip), %rsi     # 0x4d0b5
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x58fe
leaq 0x477f7(%rip), %rsi     # 0x4d0ba
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
je 0x590c
leaq 0x477eb(%rip), %rsi     # 0x4d0c1
movq %r14, %rdi
callq 0x3620
testl %eax, %eax
jne 0x5944
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0xae50
jmp 0x5918
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x97f2
jmp 0x5918
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x64dd
jmp 0x5918
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0xa6e8
movl %eax, %ebx
movq 0x586d7(%rip), %r14     # 0x5dff8
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 0x5931
movq 0x5869d(%rip), %rax     # 0x5dfe8
movq (%rax), %rdi
leaq 0x47773(%rip), %rsi     # 0x4d0c8
movq %r14, %rdx
xorl %eax, %eax
callq 0x37e0
jmp 0x593d
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-lab[P]tbmate/./wzmisc.h
// Function: wzfatal
static inline void wzfatal(const char *msg, ...) {
  va_list args;
  va_start(args, msg);
  vfprintf(stderr, msg, args);
  va_end (args);
  fflush(stderr);
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
subq $0xd0, %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 0x61c8
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 0x57df9(%rip), %rbx     # 0x5dfe8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x3300
movq (%rbx), %rdi
callq 0x38b0
movl $0x1, %edi
callq 0x3170
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, (%rcx)
callq 0x3210
testq %rax, %rax
je 0x7851
movl (%r12), %ebp
incl %ebp
movl %ebp, (%r12)
incq %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x3210
incl %ebp
testq %rax, %rax
jne 0x7838
movslq (%r12), %rdi
movl $0x8, %esi
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 0x78bb
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 0x7899
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3370
// File: /workspace/github_c_makefile_star2_O1/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 0x7929
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 0x56698(%rip), %rax     # 0x5dfe8
movq (%rax), %rdi
movq %r10, %rsi
callq 0x3300
movl $0x1, %edi
callq 0x3170
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x9344
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 0x9320
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9387
movq 0x18(%rdi), %r14
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x937b
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 0x9365
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x44729(%rip), %rdi     # 0x4dab7
xorl %eax, %eax
callq 0x9395
// File: /workspace/github_c_makefile_star2_O1/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 0xae3b
cmpb $0x62, 0xe(%rsp)
jne 0xae3b
cmpb $0x6b, 0xf(%rsp)
jne 0xae3b
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 0xae31
movq %r15, %rdi
callq 0x3380
cmpb $0x0, 0x2(%rax,%r15)
je 0xae31
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 0x42583(%rip), %rdi     # 0x4d3c9
xorl %eax, %eax
callq 0xac8a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0xde52
cmpl $0x2c, %r12d
je 0xde52
cmpq $0x6, %r15
ja 0xde4d
callq 0x3690
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rsp,%r15)
incq %r15
incq %rbx
jmp 0xde25
movb $0x0, (%rsp,%r15)
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movl $0x0, 0x8(%r14)
movl $0x1, %eax
cmpl $0x6d6173, (%rsp)       # imm = 0x6D6173
je 0xdeb6
movw $0xffff, %cx            # imm = 0xFFFF
cmpl $0x6d6162, (%rsp)       # imm = 0x6D6162
je 0xdec1
movl $0x6d617263, %edx       # imm = 0x6D617263
xorl (%rsp), %edx
movzbl 0x4(%rsp), %esi
orl %edx, %esi
je 0xdecd
cmpl $0x666376, (%rsp)       # imm = 0x666376
je 0xded9
cmpl $0x666362, (%rsp)       # imm = 0x666362
je 0xdee7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %edx, %edx
movl $0x3, %esi
xorl %ecx, %ecx
jmp 0xdef6
movl $0x2, %edx
movl $0x4, %esi
jmp 0xdef6
movl $0x3, %edx
movl $0x6, %esi
jmp 0xdef6
xorl %edx, %edx
movl $0x8, %esi
movl $0x2, %eax
jmp 0xdebd
movl $0x9, %esi
movl $0x2, %eax
movl $0x2, %edx
movl %eax, (%r14)
movl %esi, 0x4(%r14)
movl %edx, 0xc(%r14)
movw %cx, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xdd75