LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
testl %ebx, %ebx
jle 0x8554
movl 0x102c3(%rip), %ebp     # 0x1878c
cmpl 0x102b1(%rip), %ebp     # 0x18780
jne 0x84fc
callq *0x102b9(%rip)          # 0x18790
andl $0x0, 0x102ae(%rip)     # 0x1878c
movl 0x102a4(%rip), %ecx     # 0x18788
incl %ecx
movl %ecx, 0x1029c(%rip)     # 0x18788
xorl %ebp, %ebp
movl %ecx, %eax
subl 0x1028e(%rip), %eax     # 0x18784
jge 0x8504
movl %ecx, %eax
jmp 0x850a
movl 0x10286(%rip), %eax     # 0x18788
jmp 0x850a
movl %eax, 0x1027e(%rip)     # 0x18788
movl 0x1026f(%rip), %r12d    # 0x18780
imull %r12d, %eax
movslq %eax, %r13
addq 0x10259(%rip), %r13     # 0x18778
testl %ebx, %ebx
jle 0x84bb
movl %r12d, %eax
subl %ebp, %eax
jle 0x84bb
movslq %ebp, %rsi
addq %r13, %rsi
cmpl %eax, %ebx
cmovll %ebx, %eax
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2180
addq %r15, %r14
addl %r15d, %ebp
movl %ebp, 0x1023d(%rip)     # 0x1878c
subl %r15d, %ebx
jmp 0x851f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x101f3(%rip)     # 0x18764
je 0x85c9
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
cmpb $0x1, 0x101eb(%rip)     # 0x18770
jne 0x858c
callq 0x85e3
movq %r15, 0x101e5(%rip)     # 0x18778
movl %r14d, 0x101e6(%rip)    # 0x18780
movl %ebp, 0x101e4(%rip)     # 0x18784
andl $0x0, 0x101e1(%rip)     # 0x18788
andl $0x0, 0x101de(%rip)     # 0x1878c
movq %rbx, 0x101db(%rip)     # 0x18790
callq *%rbx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2170
movb $0x1, 0x101a9(%rip)     # 0x18770
jmp 0x85d6
movl $0x1, 0x1018d(%rip)     # 0x18760
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x89ca
movl 0x6a86(%rip), %esi      # 0xf2cc
testl %esi, %esi
js 0x8856
movq 0xff4f(%rip), %rdi      # 0x187a0
callq 0x2140
movl 0x6a6c(%rip), %esi      # 0xf2c8
testl %esi, %esi
js 0x886c
movq 0xff39(%rip), %rdi      # 0x187a0
callq 0x2340
movq 0xff2d(%rip), %rdi      # 0x187a0
testq %rdi, %rdi
je 0x887d
callq 0x22c0
orl $-0x1, 0x6a48(%rip)     # 0xf2cc
orl $-0x1, 0x6a3d(%rip)     # 0xf2c8
andq $0x0, 0xff0d(%rip)      # 0x187a0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x89ca
movq %rbx, 0xfd88(%rip)      # 0x187a8
movl $0x0, 0xfd86(%rip)      # 0x187b0
callq 0x8a6f
leaq 0xfd82(%rip), %rdi      # 0x187b8
leaq 0xa4(%rip), %rdx        # 0x8ae1
xorl %ebx, %ebx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x23a0
testl %eax, %eax
je 0x8a64
leaq 0x1776(%rip), %rdi      # 0xa1c9
xorl %eax, %eax
callq 0x813d
callq 0x89ca
pushq $0x8
popq %rbx
jmp 0x8a6b
movb $0x1, 0xfd55(%rip)      # 0x187c0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xfd52(%rip)      # 0x187c8
jne 0x8ae0
pushq %rax
movq 0xfd20(%rip), %rdi      # 0x187a0
movl 0x6846(%rip), %esi      # 0xf2cc
pushq $0x1e
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2220
testl %eax, %eax
jns 0x8aa7
leaq 0x1779(%rip), %rdi      # 0xa217
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movq 0xfcf2(%rip), %rdi      # 0x187a0
callq 0x2390
testl %eax, %eax
jg 0x8aa7
jns 0x8ac9
leaq 0x177c(%rip), %rdi      # 0xa23c
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movq 0xfcd0(%rip), %rdi      # 0x187a0
callq 0x2070
movb $0x1, 0xfcec(%rip)      # 0x187c8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
callq 0x8d47
movl %eax, 0xfcdb(%rip)      # 0x187cc
movl %eax, %ecx
addl 0xfccb(%rip), %ecx      # 0x187c4
movl %ecx, 0xfcd1(%rip)      # 0x187d0
cmpl %ecx, %eax
jae 0x8b27
movq 0xfc9e(%rip), %rdx      # 0x187a8
testq %rdx, %rdx
je 0x8b1d
callq *%rdx
movl 0xfcb9(%rip), %ecx      # 0x187d0
movl 0xfcaf(%rip), %eax      # 0x187cc
incl %eax
movl %eax, 0xfca7(%rip)      # 0x187cc
jmp 0x8aff
movl $0xc350, %esi           # imm = 0xC350
movq %rsp, %rbx
cmpl $0x0, 0xfc7a(%rip)      # 0x187b0
jne 0x8ba7
andq $0x0, (%rsp)
movq %rsi, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x21d0
callq 0x8d47
movl 0xfc6f(%rip), %ecx      # 0x187cc
movl %ecx, %edi
subl %eax, %edi
movl 0xfc5d(%rip), %edx      # 0x187c4
movl $0x61a8, %esi           # imm = 0x61A8
cmpl %edx, %edi
jg 0x8b2f
addl %eax, %edx
movl %edx, 0xfc58(%rip)      # 0x187d0
cmpl %edx, %ecx
jae 0x8ba0
movq 0xfc25(%rip), %rax      # 0x187a8
testq %rax, %rax
je 0x8b96
callq *%rax
movl 0xfc40(%rip), %edx      # 0x187d0
movl 0xfc36(%rip), %ecx      # 0x187cc
incl %ecx
movl %ecx, 0xfc2e(%rip)      # 0x187cc
jmp 0x8b78
movl $0xc350, %esi           # imm = 0xC350
jmp 0x8b2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xfc12(%rip)      # 0x187c8
jne 0x8c20
pushq %rax
movq 0xfbe0(%rip), %rdi      # 0x187a0
movl 0x6706(%rip), %esi      # 0xf2cc
pushq $0x20
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2220
testl %eax, %eax
jns 0x8be7
leaq 0x1687(%rip), %rdi      # 0xa265
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movq 0xfbb2(%rip), %rdi      # 0x187a0
callq 0x20e0
testl %eax, %eax
jg 0x8be7
jns 0x8c09
leaq 0x1689(%rip), %rdi      # 0xa289
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movq 0xfb90(%rip), %rdi      # 0x187a0
callq 0x2070
movb $0x0, 0xfbac(%rip)      # 0x187c8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8baf
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 0x2300
movq 0xfb1e(%rip), %rdi      # 0x187a0
movl 0x6644(%rip), %esi      # 0xf2cc
movq %r15, %rdx
callq 0x23b0
cvtsi2sd %r14d, %xmm1
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
divsd 0x137b(%rip), %xmm0     # 0xa020
divsd 0x137b(%rip), %xmm0     # 0xa028
callq 0x20a0
cvttsd2si %xmm0, %eax
movl %eax, 0xfb08(%rip)      # 0x187c4
callq 0x8a6f
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/driver_alsa.c
// Function: sequence_event
static inline void sequence_event(snd_seq_event_t * ev)
{
    int result = 0;
    
    snd_seq_ev_set_subs(ev);
    snd_seq_ev_set_source(ev, seq_port);
    snd_seq_ev_schedule_tick(ev, seq_queue, 0, threadTimer);
    result = snd_seq_event_output(seq, ev);
    if (result < 0) {
        ASS_Message("ALSADrv: could not queue event: err %d\n", result);
    } else {
        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);
    }
}

// Assembly:
pushq %rax
movq %rdi, %rsi
movw $0xfdfe, 0xe(%rdi)      # imm = 0xFDFE
movb 0x65ea(%rip), %al       # 0xf2c8
movb %al, 0xd(%rdi)
andb $-0x4, 0x1(%rdi)
movl 0xfae1(%rip), %eax      # 0x187cc
movl %eax, 0x4(%rdi)
movb 0x65d8(%rip), %al       # 0xf2cc
movb %al, 0x3(%rdi)
movq 0xfaa2(%rip), %rdi      # 0x187a0
callq 0x2270
testl %eax, %eax
js 0x8d36
movq 0xfa92(%rip), %rdi      # 0x187a0
callq 0x2390
testl %eax, %eax
jg 0x8d07
jns 0x8d29
leaq 0x151c(%rip), %rdi      # 0xa23c
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movq 0xfa70(%rip), %rdi      # 0x187a0
popq %rax
jmp 0x2070
leaq 0x1574(%rip), %rdi      # 0xa2b1
movl %eax, %esi
xorl %eax, %eax
popq %rcx
jmp 0x813d
// File: /workspace/github_c_makefile_star2_O2/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 0xfa21(%rip), %rdi      # 0x187a0
movl 0x6547(%rip), %esi      # 0xf2cc
movq %r14, %rdx
callq 0x23c0
testl %eax, %eax
js 0x8d9d
movq %r14, %rdi
callq 0x2290
movl %eax, %ebx
jmp 0x8dad
leaq 0x1535(%rip), %rdi      # 0xa2d9
movl %eax, %esi
xorl %eax, %eax
callq 0x813d
movl %ebx, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
callq 0x1040
cmpl $-0x1, %eax
je 0x1174
movl %eax, %ebx
xorl $0x20, %eax
xorl $0x20, %ebp
orl %eax, %ebp
movl %ebx, %ebp
je 0x1151
movl %ebx, %edi
callq 0x1030
movl %ebx, %ebp
jmp 0x1151
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9b935(%rip), %rdi     # 0x49d004
leaq -0x28(%rbp), %rsi
callq 0x4023d6
testl %eax, %eax
js 0x4017d4
cmpl $0x1, %eax
je 0x4016f3
testl %eax, %eax
jne 0x401813
movq -0x28(%rbp), %r14
jmp 0x40170f
pushq $0x8
popq %rdi
callq 0x420f40
movq %rax, %r14
movq %rax, -0x28(%rbp)
movabsq $0x6c69747573667a, %rax # imm = 0x6C69747573667A
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4010d8
movq %rax, %r15
leaq 0x9b979(%rip), %rsi     # 0x49d09a
movq %r14, %rdi
callq 0x401078
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leaq (%r15,%rcx,8), %r14
incq %r14
leaq 0x9b93c(%rip), %rdi     # 0x49d07b
leaq -0x19(%rbp), %rsi
callq 0x4024a5
testl %eax, %eax
jne 0x4017f2
leaq 0x3(%r14), %rax
cmpb $0x1, -0x19(%rbp)
cmovneq %rax, %r14
movq %r14, %rdi
callq 0x420f40
movq %rax, %r14
movq %rax, (%rbx)
movq -0x28(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x401020
leaq 0x9b91a(%rip), %rsi     # 0x49d09a
movq %rbx, %rdi
callq 0x401078
testq %rax, %rax
jne 0x4017a9
movq %r14, %rdi
callq 0x4010d8
movabsq $0x6c69747573667a2c, %rcx # imm = 0x6C69747573667A2C
movq %rcx, (%r14,%rax)
movb $0x0, 0x8(%r14,%rax)
cmpb $0x1, -0x19(%rbp)
je 0x4017bf
movq %r14, %rdi
callq 0x4010d8
movl $0x6f722c, (%r14,%rax)  # imm = 0x6F722C
movq %rbx, %rdi
callq 0x421280
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b82a(%rip), %rsi     # 0x49d00f
movl %eax, %edx
xorl %eax, %eax
callq 0x40c3a0
pushq $0x1
jmp 0x401831
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rcx
leaq 0x9b87b(%rip), %rdi     # 0x49d07e
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x413360
jmp 0x40175c
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rcx
leaq 0x9b819(%rip), %rdi     # 0x49d03d
pushq $0x3d
popq %rsi
pushq $0x1
popq %rdx
callq 0x413360
pushq $0x2
popq %rax
jmp 0x4017c9
// File: /workspace/github_c_makefile_star2_O2/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 0x9b859(%rip), %rdi     # 0x49d0a2
leaq -0x18(%rbp), %rsi
callq 0x4023d6
testl %eax, %eax
js 0x4018c5
je 0x40187d
cmpl $0x1, %eax
je 0x4018ac
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rcx
leaq 0x9b86d(%rip), %rdi     # 0x49d0db
pushq $0x3d
popq %rsi
pushq $0x1
popq %rdx
callq 0x413360
pushq $0x2
jmp 0x4018e1
movq -0x18(%rbp), %rdi
cmpb $0x31, (%rdi)
jne 0x4018a7
movb 0x1(%rdi), %r14b
callq 0x421280
testb %r14b, %r14b
jne 0x4018ac
pushq $0x4
popq %rdi
callq 0x420f40
movq %rax, (%rbx)
movl $0x662d20, (%rax)       # imm = 0x662D20
jmp 0x4018ba
callq 0x421280
pushq $0x1
popq %rdi
callq 0x420f40
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 0x9b7d7(%rip), %rsi     # 0x49d0ad
movl %eax, %edx
xorl %eax, %eax
callq 0x40c3a0
pushq $0x1
popq %rax
jmp 0x4018bc
// File: /workspace/github_c_makefile_star2_O2/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 0x9b820(%rip), %rdi     # 0x49d119
leaq -0x18(%rbp), %rsi
callq 0x4023d6
testl %eax, %eax
js 0x401931
je 0x401915
cmpl $0x1, %eax
jne 0x40194f
movb $0x0, (%r14)
xorl %ebx, %ebx
jmp 0x40196e
movq -0x18(%rbp), %rdi
xorl %ebx, %ebx
cmpb $0x31, (%rdi)
jne 0x40196e
cmpb $0x0, 0x1(%rdi)
jne 0x40196e
movb $0x1, (%r14)
callq 0x421280
jmp 0x40196e
movq $0x4cd6e8, %rcx         # imm = 0x4CD6E8
movq (%rcx), %rdi
leaq 0x9b7e8(%rip), %rsi     # 0x49d12a
movl %eax, %edx
xorl %eax, %eax
callq 0x40c3a0
pushq $0x1
jmp 0x40196d
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rcx
leaq 0x9b7fe(%rip), %rdi     # 0x49d15e
pushq $0x3f
popq %rsi
pushq $0x1
popq %rdx
callq 0x413360
pushq $0x2
popq %rbx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9b4e4(%rip), %rdi     # 0x49d855
leaq 0xb29ef(%rip), %rsi     # 0x4b4d67
callq 0x413260
testq %rax, %rax
je 0x4023ad
movq %rax, %rbx
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x40c750
testq %rax, %rax
js 0x4023bd
movq %rbx, %rdi
callq 0x412b30
movl -0x18(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9b4af(%rip), %rdi     # 0x49d863
callq 0x40c690
pushq $-0x1
jmp 0x4023d3
leaq 0x9b4c0(%rip), %rdi     # 0x49d884
callq 0x40c690
movq %rbx, %rdi
callq 0x412b30
pushq $-0x2
popq %rax
jmp 0x4023a4
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %rdi
andq $0x0, (%rdi)
callq 0x40235c
testl %eax, %eax
js 0x40244d
movq %r14, -0x38(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x9b498(%rip), %r13     # 0x49d8a5
movq %r13, %rsi
callq 0x424070
movq %rax, %r15
pushq $0x1
popq %r12
movq %rbx, %rdi
callq 0x4010d8
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x401080
testl %eax, %eax
je 0x402453
xorl %edi, %edi
movq %r13, %rsi
callq 0x424070
movq %rax, %r15
testq %rax, %rax
jne 0x40241c
jmp 0x40248a
pushq $-0x1
popq %r12
jmp 0x402493
movq %r15, %rdi
callq 0x4010d8
subq %r14, %rax
leaq 0x1(%rax), %rdi
callq 0x420f40
movq %rax, %r14
movq -0x38(%rbp), %rax
movq %r14, (%rax)
movq %rbx, %rdi
callq 0x4010d8
addq %rax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x401020
xorl %r12d, %r12d
movq -0x30(%rbp), %rdi
callq 0x421280
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rdi)
callq 0x40235c
testl %eax, %eax
js 0x4024fc
movb $0x0, (%rbx)
movq -0x20(%rbp), %rdi
leaq 0x9b3d1(%rip), %r15     # 0x49d8a5
movq %r15, %rsi
callq 0x424070
movq %rax, %rdi
movq %r14, %rsi
callq 0x4010b0
testl %eax, %eax
je 0x402501
xorl %edi, %edi
movq %r15, %rsi
callq 0x424070
testq %rax, %rax
jne 0x4024dc
jmp 0x402504
pushq $-0x1
popq %rax
jmp 0x40250f
movb $0x1, (%rbx)
movq -0x20(%rbp), %rdi
callq 0x421280
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x1, %edi
jle 0x3ac4
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
addq $0x8, %rbx
leaq 0x3b68f(%rip), %rsi     # 0x3f0b0
movq %r14, %rdi
callq 0x3630
testl %eax, %eax
je 0x3a78
leaq 0x3b681(%rip), %rsi     # 0x3f0b5
movq %r14, %rdi
callq 0x3630
testl %eax, %eax
je 0x3a86
leaq 0x3b673(%rip), %rsi     # 0x3f0ba
movq %r14, %rdi
callq 0x3630
testl %eax, %eax
je 0x3a94
leaq 0x3b667(%rip), %rsi     # 0x3f0c1
movq %r14, %rdi
callq 0x3630
testl %eax, %eax
jne 0x3bbd
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x85e4
jmp 0x3aa0
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x7113
jmp 0x3aa0
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x44e3
jmp 0x3aa0
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x7ec4
movl %eax, %ebx
movq 0x4f54f(%rip), %r14     # 0x52ff8
movq (%r14), %rdi
callq 0x38c0
movq (%r14), %rdi
callq 0x36d0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4f51d(%rip), %r12     # 0x52fe8
movq (%r12), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x3b606(%rip), %rdi     # 0x3f0ea
pushq $0x1d
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3780
movq (%r12), %rdi
leaq 0x3b60a(%rip), %rsi     # 0x3f108
leaq 0x3b610(%rip), %rdx     # 0x3f115
xorl %eax, %eax
callq 0x37f0
movq (%r12), %rcx
leaq 0x3b60b(%rip), %rdi     # 0x3f122
pushq $0x3c
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b632(%rip), %rdi     # 0x3f15f
pushq $0x25
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b642(%rip), %rdi     # 0x3f185
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b636(%rip), %rdi     # 0x3f18f
pushq $0x23
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b644(%rip), %rdi     # 0x3f1b3
pushq $0x2a
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b659(%rip), %rdi     # 0x3f1de
pushq $0x2f
popq %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3b66f(%rip), %rdi     # 0x3f20e
movq %r15, %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rsi
movl %ebx, %edi
callq 0x3350
pushq $0x1
popq %rbx
jmp 0x3ab9
movq 0x4f424(%rip), %rax     # 0x52fe8
movq (%rax), %rdi
leaq 0x3b4fa(%rip), %rsi     # 0x3f0c8
movq %r14, %rdx
xorl %eax, %eax
callq 0x37f0
jmp 0x3bb5
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x413a
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 0x4ee87(%rip), %rbx     # 0x52fe8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x3300
movq (%rbx), %rdi
callq 0x38c0
pushq $0x1
popq %rdi
callq 0x3170
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/./tbmate.h
// Function: tbk_seek_n
static inline void tbk_seek_n(tbk_t *tbk, int64_t n) {
  int64_t offset = tbk->offset_sample_beg + HDR_TOTALBYTES;
  offset += n * unit_size(tbk->dtype);

  tbf_t *tbf = tbk->tbf;
  if (offset == tbf->offset) return;
  
  tbf->offset = offset;
  if (fseek(tbf->fh, tbf->offset, SEEK_SET))
    wzfatal("File %s cannot be seeked.\n", tbk->tbf->fname);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x2018(%rdi), %rdx
movzbl %dl, %edi
movl %edi, %r8d
shrq $0x8, %rdx
xorl %r9d, %r9d
cmpq $0x7, %rdi
cmovnel %r9d, %edx
leaq 0x3ae65(%rip), %rdi     # 0x3f010
addl (%rdi,%r8,4), %edx
movslq %edx, %rdx
imulq %rsi, %rdx
leaq (%rcx,%rdx), %rsi
addq $0x2000, %rsi           # imm = 0x2000
cmpq 0x8(%rax), %rsi
je 0x41d9
movq %rsi, 0x8(%rax)
movq (%rax), %rdi
xorl %edx, %edx
callq 0x3120
testl %eax, %eax
jne 0x41db
popq %rbx
retq
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x3b1c8(%rip), %rdi     # 0x3f3b2
xorl %eax, %eax
callq 0x40db
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/./tbmate.h
// Function: tbf_open1
static inline void tbf_open1(char *fname, tbf_t *tbf, char *sname) {
  memset(tbf, 0, sizeof(tbf_t));
  tbf->offset = 0;
  tbf->fname = strdup(fname);
  tbf->fh = fopen(fname, "rb");
  if (!tbf->fh) wzfatal("Cannot open %s to read.\n", tbf->fname);
  if (sname != NULL) {tbf->sname_first = strdup(sname);}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
callq 0x3600
movq %rax, 0x10(%rbx)
leaq 0x39e5d(%rip), %rsi     # 0x3f802
movq %r15, %rdi
callq 0x3250
movq %rax, (%rbx)
testq %rax, %rax
je 0x59cc
testq %r14, %r14
je 0x59c6
movq %r14, %rdi
callq 0x3600
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rsi
leaq 0x39e2e(%rip), %rdi     # 0x3f805
xorl %eax, %eax
callq 0x40db
// File: /workspace/github_c_makefile_star2_O2/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)
pushq $0x1
popq %r13
movq %rdi, %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x3210
testq %rax, %rax
je 0x5a1c
incq %r13
movl %r13d, (%r12)
incq %rax
jmp 0x5a00
pushq $0x8
popq %rsi
movq %r13, %rdi
callq 0x36b0
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x3380
leaq 0x1(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x36b0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x3660
movq %r12, %rdi
movq %r14, %rsi
callq 0x3670
xorl %r15d, %r15d
testq %rax, %rax
je 0x5a7e
movq %rax, %rdi
callq 0x3600
movq (%rbx), %rcx
movq %rax, (%rcx,%r15)
xorl %edi, %edi
movq %r14, %rsi
callq 0x3670
addq $0x8, %r15
jmp 0x5a5a
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3370
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/./wzmisc.h
// Function: free_char_array
static inline void free_char_array(char **char_array, int n) {
  int i;
  for (i=0; i<n; ++i)
    free(char_array[i]);
  free(char_array);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x5ab6
movq (%rbx,%r15,8), %rdi
callq 0x3370
incq %r15
jmp 0x5aa3
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3370
// File: /workspace/github_c_makefile_star2_O2/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 0x5b21
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 0x4d4a0(%rip), %rax     # 0x52fe8
movq (%rax), %rdi
movq %r10, %rsi
callq 0x3300
pushq $0x1
popq %rdi
callq 0x3170
nop
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jge 0x6cae
movq (%rbx,%r14,8), %rdi
callq 0x3370
andq $0x0, (%rbx,%r14,8)
incq %r14
jmp 0x6c92
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6cf5
movq %rsi, %rbx
movq 0x18(%rdi), %r14
movslq 0x28(%r14), %r15
xorl %r12d, %r12d
cmpq %r15, %r12
jge 0x6ce9
movq 0x18(%rbx,%r12,8), %rdi
callq 0x3600
movq %rax, (%r14,%r12,8)
incq %r12
jmp 0x6cd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x38dbb(%rip), %rdi     # 0x3fab7
xorl %eax, %eax
callq 0x6d03
// File: /workspace/github_c_makefile_star2_O2/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 0x4b3fa(%rip), %r12     # 0x52fe8
movq (%r12), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x38002(%rip), %rdi     # 0x3fc09
pushq $0x30
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3780
movq (%r12), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x377e9(%rip), %rdi     # 0x3f415
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x37ff8(%rip), %rdi     # 0x3fc3a
pushq $0x6a
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x3804d(%rip), %rdi     # 0x3fca5
pushq $0x53
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rdi
cvtss2sd (%r15), %xmm0
leaq 0x38086(%rip), %rsi     # 0x3fcf9
movb $0x1, %al
callq 0x37f0
movq (%r12), %rcx
leaq 0x380a8(%rip), %rdi     # 0x3fd2d
pushq $0x4b
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rcx
leaq 0x37b49(%rip), %rdi     # 0x3f7e4
pushq $0x18
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r12), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r12), %rcx
leaq 0x380bd(%rip), %rdi     # 0x3fd79
pushq $0x4e
popq %rsi
movq %r14, %rdx
callq 0x3780
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_O2/zhou-lab[P]tbmate/./wzbed.h
// Function: init_bed1
static inline bed1_t *init_bed1(init_data_f init_data, void *aux_data) {
  bed1_t *b = calloc(1, sizeof(bed1_t));
  if (init_data != NULL)
    init_data(b, aux_data);
  return b;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x36b0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6c64
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/./tbmate.h
// Function: tbk_write_hdr
static inline void tbk_write_hdr(int32_t version, uint64_t dtype, int64_t n, char *msg, FILE*tbk_out) {
  char id[3] = {'t','b','k'};
  fwrite(&id,      HDR_ID,         1, tbk_out);
  fwrite(&version, HDR_VERSION,    1, tbk_out);
  fwrite(&dtype,   HDR_DATA_TYPE,  1, tbk_out);
  fwrite(&n,       HDR_NMAX,       1, tbk_out);
  fwrite(msg,      HDR_EXTRA,      1, tbk_out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
leaq 0x4(%rsp), %r13
movl $0x1, (%r13)
leaq 0x10(%rsp), %rbp
movq %rdi, (%rbp)
leaq 0x8(%rsp), %r12
movq %rsi, (%r12)
movq %rsp, %rdi
movb $0x6b, 0x2(%rdi)
movw $0x6274, (%rdi)         # imm = 0x6274
pushq $0x3
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x3780
pushq $0x4
popq %rsi
movq %r13, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3780
pushq $0x8
popq %r13
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3780
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3780
movl $0x1fe9, %esi           # imm = 0x1FE9
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3780
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/./wzmisc.h
// Function: ensure_number
static inline void ensure_number(char *s) {
  int i;
  for (i=0;s[i];++i) {
    if (!isdigit(s[i]) && s[i]!='.') {
      fprintf(stderr, "[%s:%d] Trying to convert nondigit string to number: %s\n", __func__, __LINE__, s);
      fflush(stderr);
      exit(1);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, %r14
movsbq (%r14), %r15
testq %r15, %r15
je 0x7ebc
callq 0x3410
incq %r14
cmpb $0x2e, %r15b
je 0x7e61
movq (%rax), %rax
movzwl (%rax,%r15,2), %eax
andl $0x800, %eax            # imm = 0x800
jne 0x7e61
movq 0x4b15a(%rip), %r14     # 0x52fe8
movq (%r14), %rdi
leaq 0x37af3(%rip), %rsi     # 0x3f98b
leaq 0x37f33(%rip), %rdx     # 0x3fdd2
pushq $0x3b
popq %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x37f0
movq (%r14), %rdi
callq 0x38c0
pushq $0x1
popq %rdi
callq 0x3170
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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)
leaq 0xd(%rsp), %r15
pushq $0x3
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x85bb
cmpb $0x74, (%r15)
jne 0x849b
cmpb $0x62, 0xe(%rsp)
jne 0x849b
cmpb $0x6b, 0xf(%rsp)
jne 0x849b
leaq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x85bb
leaq 0x2018(%rbx), %rsi
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x85bb
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x85bb
leaq 0x28(%rbx), %r15
movl $0x1fe9, %edx           # imm = 0x1FE9
movq %r14, %rdi
movq %r15, %rsi
callq 0x85bb
cmpq $0x0, (%rbx)
jne 0x8491
movq %r15, %rdi
callq 0x3380
cmpb $0x0, 0x2(%rax,%r15)
je 0x8491
leaq (%rax,%r15), %rdi
addq $0x2, %rdi
callq 0x3600
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r14), %rsi
leaq 0x36f27(%rip), %rdi     # 0x3f3cd
xorl %eax, %eax
callq 0x82b8
// File: /workspace/github_c_makefile_star2_O2/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 0x4aaab(%rip), %r15     # 0x52fe8
movq (%r15), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x379c9(%rip), %rdi     # 0x3ff1d
pushq $0x2c
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3780
movq (%r15), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x36e9e(%rip), %rdi     # 0x3f415
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rcx
leaq 0x379be(%rip), %rdi     # 0x3ff4a
pushq $0x39
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rcx
leaq 0x37243(%rip), %rdi     # 0x3f7e4
pushq $0x18
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rsi
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x3350
// File: /workspace/github_c_makefile_star2_O2/zhou-lab[P]tbmate/bundle.c
// Function: usage
static int usage() {
  fprintf(stderr, "\n");
  fprintf(stderr, "Usage: tbmate bundle [options] <out.tbk> <in1.tbk> <in2.tbk> ...\n");
  fprintf(stderr, "\n");
  fprintf(stderr, "Options:\n");
  fprintf(stderr, "    -h        This help\n");
  fprintf(stderr, "\n");
  fprintf(stderr, "Note, the first tbk maybe multiple tbk.\n");
  fprintf(stderr, "\n");

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x4a4c6(%rip), %r15     # 0x52fe8
movq (%r15), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x374b7(%rip), %rdi     # 0x3fff0
pushq $0x41
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x3780
movq (%r15), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x368b9(%rip), %rdi     # 0x3f415
pushq $0x9
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rcx
leaq 0x36c73(%rip), %rdi     # 0x3f7e4
pushq $0x18
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rsi
movl %ebx, %edi
callq 0x3350
movq (%r15), %rcx
leaq 0x374a2(%rip), %rdi     # 0x40032
pushq $0x28
popq %rsi
movq %r14, %rdx
callq 0x3780
movq (%r15), %rsi
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x3350
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movzbl (%rbx), %r12d
testl %r12d, %r12d
je 0xae6e
cmpl $0x2c, %r12d
je 0xae6e
cmpq $0x6, %r15
ja 0xae69
callq 0x36a0
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, 0x8(%rsp,%r15)
incq %r15
incq %rbx
jmp 0xae40
cmpq $0x1, %r12
sbbq $-0x1, %rbx
movb $0x0, 0x8(%rsp,%r15)
andl $0x0, 0x8(%r14)
cmpl $0x6d6173, 0x8(%rsp)    # imm = 0x6D6173
je 0xaed9
movw $0xffff, %r15w          # imm = 0xFFFF
pushq $0x2
popq %rbp
cmpl $0x6d6162, 0x8(%rsp)    # imm = 0x6D6162
je 0xaee8
leaq 0x35702(%rip), %rsi     # 0x405a6
leaq 0x8(%rsp), %rdi
pushq $0x5
popq %rdx
callq 0x3520
testl %eax, %eax
je 0xaef2
cmpl $0x666376, 0x8(%rsp)    # imm = 0x666376
je 0xaeff
cmpl $0x666362, 0x8(%rsp)    # imm = 0x666362
je 0xaf09
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsd 0x351bf(%rip), %xmm0    # 0x400a0
xorl %ebp, %ebp
xorl %r15d, %r15d
jmp 0xaf11
movsd 0x351c0(%rip), %xmm0    # 0x400b0
jmp 0xaf11
movsd 0x351c6(%rip), %xmm0    # 0x400c0
pushq $0x3
popq %rbp
jmp 0xaf11
movsd 0x351c9(%rip), %xmm0    # 0x400d0
jmp 0xaee1
movsd 0x351cf(%rip), %xmm0    # 0x400e0
movlps %xmm0, (%r14)
movl %ebp, 0xc(%r14)
movw %r15w, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xad80