LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: update_freq
bool update_freq(struct chan* c, float* pos){
	float inc = c->freq_inc - *pos;
	c->freq_counter += inc;

	if(c->freq_counter > 1.0f){
		*pos = c->freq_inc - (c->freq_counter - 1.0f);
		c->freq_counter = 0.0f;
		return true;
	} else {
		*pos = c->freq_inc;
		return false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x18(%rbp), %rax
subss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
movq -0x10(%rbp), %rax
addss 0x10(%rax), %xmm0
movss %xmm0, 0x10(%rax)
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
movss 0x4e4e(%rip), %xmm1     # 0x10004
ucomiss %xmm1, %xmm0
jbe 0xb1f7
movq -0x10(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm1
movss 0x4e2f(%rip), %xmm2     # 0x10004
subss %xmm2, %xmm1
subss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xb20c
movq -0x10(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: update_sweep
void update_sweep(struct chan* c){
	c->sweep.counter += c->sweep.inc;

	while(c->sweep.counter > 1.0f){
		if(c->sweep.shift){
			uint16_t inc = (c->sweep.freq >> c->sweep.shift);
			if(!c->sweep.up) inc *= -1;

			c->freq = c->sweep.freq + inc;
			if(c->freq > 2047){
				c->enabled = 0;
			} else {
				set_note_freq(c, 4194304.0f / (float)((2048 - c->freq) << 5));
				c->sweep.freq = c->freq;
				c->freq_inc *= 8.0f;
			}
		} else if(c->sweep.rate){
			c->enabled = 0;
		}
		c->sweep.counter -= 1.0f;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movss 0x54(%rax), %xmm0
movq -0x8(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, 0x50(%rax)
movq -0x8(%rbp), %rax
movss 0x50(%rax), %xmm0
movss 0x4db0(%rip), %xmm1     # 0x10004
ucomiss %xmm1, %xmm0
jbe 0xb34b
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xb319
movq -0x8(%rbp), %rax
movzwl 0x40(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x4c(%rcx), %ecx
sarl %cl, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x48(%rax)
jne 0xb295
movzwl -0xa(%rbp), %eax
imull $-0x1, %eax, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x40(%rax), %eax
movzwl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
cmpl $0x7ff, %eax            # imm = 0x7FF
jle 0xb2c6
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
jmp 0xb317
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
movl $0x800, %eax            # imm = 0x800
subl %ecx, %eax
shll $0x5, %eax
cvtsi2ss %eax, %xmm1
movss 0x65a0(%rip), %xmm0     # 0x11888
divss %xmm1, %xmm0
callq 0xae20
movq -0x8(%rbp), %rax
movw 0xc(%rax), %cx
movq -0x8(%rbp), %rax
movw %cx, 0x40(%rax)
movq -0x8(%rbp), %rax
movss 0x6577(%rip), %xmm0     # 0x11884
mulss 0x14(%rax), %xmm0
movss %xmm0, 0x14(%rax)
jmp 0xb32c
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0xb32a
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
jmp 0xb32c
movq -0x8(%rbp), %rax
movss 0x50(%rax), %xmm0
movss 0x4cc7(%rip), %xmm1     # 0x10004
subss %xmm1, %xmm0
movss %xmm0, 0x50(%rax)
jmp 0xb243
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: wave_sample
static uint8_t wave_sample(int pos, int volume){
	uint8_t sample = mem[0xFF30 + pos / 2];
	if(pos & 1){
		sample &= 0xF;
	} else {
		sample >>= 4;
	}
	return volume ? (sample >> (volume-1)) : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0xb00f(%rip), %rax      # 0x16910
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
addl $0xff30, %ecx           # imm = 0xFF30
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb93f
movzbl -0x9(%rbp), %eax
andl $0xf, %eax
movb %al, -0x9(%rbp)
jmp 0xb949
movzbl -0x9(%rbp), %eax
sarl $0x4, %eax
movb %al, -0x9(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0xb960
movzbl -0x9(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
sarl %cl, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb967
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb967
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: audio_reset
void audio_reset(void){
	memset(chans, 0, sizeof(chans));
	memset(samples, 0, nsamples * sizeof(float));
	sample_ptr = samples;
	sample_end = samples + nsamples;
	chans[0].val = chans[1].val = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xad35(%rip), %rdi      # 0x16a80
xorl %esi, %esi
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x5080
movq 0xaef2(%rip), %rdi      # 0x16c50
movq 0xaedb(%rip), %rdx      # 0x16c40
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x5080
movq 0xaed9(%rip), %rax      # 0x16c50
movq %rax, 0xaee2(%rip)      # 0x16c60
movq 0xaecb(%rip), %rax      # 0x16c50
movq 0xaeb4(%rip), %rcx      # 0x16c40
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0xaece(%rip)      # 0x16c68
movl $0xffffffff, 0xad64(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0xacea(%rip) # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: audio_init
int audio_init(struct pollfd** fds, int nfds){
	pcm_period_size = audio_output_init(fds, &nfds, FREQ);

	logbase = log(1.059463094f);
	charge_factor = pow(0.999958, 4194304.0 / FREQ);

	audio_update_rate();

	return nfds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movss 0x5651(%rip), %xmm0     # 0x11880
callq 0xcfa0
movw %ax, 0xaa45(%rip)       # 0x16c80
movsd 0x568d(%rip), %xmm0     # 0x118d0
callq 0x5240
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xa820(%rip)     # 0x16a74
movsd 0x5664(%rip), %xmm0     # 0x118c0
movsd 0x5664(%rip), %xmm1     # 0x118c8
callq 0x55b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xa7fb(%rip)     # 0x16a70
callq 0xc290
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: audio_get_notes
void audio_get_notes(uint16_t notes[static 4]){
	for(int i = 0; i < 4; ++i){
		if(chan_muted(chans + i)){
			notes[i] = 0xffff;
		} else {
			notes[i] = chans[i].note;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0xc517
movslq -0xc(%rbp), %rax
leaq 0xa5bc(%rip), %rdi      # 0x16a80
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0xaeb0
testb $0x1, %al
jne 0xc4d6
jmp 0xc4e6
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0xffff, (%rax,%rcx,2)  # imm = 0xFFFF
jmp 0xc50a
movslq -0xc(%rbp), %rcx
leaq 0xa58f(%rip), %rax      # 0x16a80
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
jmp 0xc50c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xc4b3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio.c
// Function: chan_update_len
void chan_update_len(int i) {
	struct chan* c = chans + i;
	int len_max = i == 2 ? 256 : 64;
	c->len.inc = (256.0f / (float)(len_max - c->len.load)) / FREQ;
	c->len.counter = 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xa0ce(%rip), %rax      # 0x16a80
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edx
movl $0x40, %eax
movl $0x100, %ecx            # imm = 0x100
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0x20(%rcx), %eax
cvtsi2ss %eax, %xmm1
movss 0x4ecf(%rip), %xmm0     # 0x118b8
divss %xmm1, %xmm0
movss 0x4e8b(%rip), %xmm1     # 0x11880
divss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x2c(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio_output.c
// Function: alsa_init
static uint16_t alsa_init(struct audio_output* out, struct pollfd** fds, int* nfds, float freq) {
	struct audio_alsa* alsa = (struct audio_alsa*)out;

	snd_pcm_open(&alsa->pcm, "default", SND_PCM_STREAM_PLAYBACK, 0);
	snd_pcm_set_params(alsa->pcm, SND_PCM_FORMAT_FLOAT, SND_PCM_ACCESS_RW_INTERLEAVED, 2, freq, 1, 16667);
	snd_pcm_get_params(alsa->pcm, &alsa->pcm_buffer_size, &alsa->pcm_period_size);

	int count = snd_pcm_poll_descriptors_count(alsa->pcm);
	*fds = realloc(*fds, (*nfds + count) * sizeof(struct pollfd));
	snd_pcm_poll_descriptors(alsa->pcm, (*fds) + *nfds, count);

	*nfds += count;

	return alsa->pcm_period_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
leaq 0x4994(%rip), %rsi      # 0x11a44
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x5220
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
cvttss2si -0x1c(%rbp), %rax
movl %eax, %r8d
movl $0xe, %esi
movl $0x3, %edx
movl $0x2, %ecx
movl $0x1, %r9d
movl $0x411b, (%rsp)         # imm = 0x411B
callq 0x5380
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x38, %rsi
movq -0x28(%rbp), %rdx
addq $0x40, %rdx
callq 0x5230
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5550
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl -0x2c(%rbp), %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x5530
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movslq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
movl -0x2c(%rbp), %edx
callq 0x5470
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio_output.c
// Function: alsa_ready
static bool alsa_ready(struct audio_output* out, struct pollfd* fds, int nfds) {
	struct audio_alsa* alsa = (struct audio_alsa*)out;

	uint16_t ev;
	snd_pcm_poll_descriptors_revents(alsa->pcm, fds, nfds, &ev);

	return (ev & POLLOUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x22(%rbp), %rcx
callq 0x5450
movzwl -0x22(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio_output.c
// Function: alsa_write
static void alsa_write(struct audio_output* out, const float* samples, uint16_t period_size) {
	struct audio_alsa* alsa = (struct audio_alsa*)out;

	int err = snd_pcm_writei(alsa->pcm, samples, period_size);
	if(err < 0){
		snd_pcm_recover(alsa->pcm, err, 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movzwl -0x12(%rbp), %eax
movl %eax, %edx
callq 0x52f0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0xd254
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0x24(%rbp), %esi
movl $0x1, %edx
callq 0x5290
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/audio_output.c
// Function: wav_init
static uint16_t wav_init(struct audio_output* out, struct pollfd** fds, int* nfds, float freq) {
	struct audio_wav* wav = (struct audio_wav*)out;
	wav->writer = wav_write_begin(wav->output.filename, freq);
	if(!wav->writer) {
		fprintf(stderr, "Error opening .wav file\n");
		exit(1);
	}

	wav->eventfd = eventfd(1, 0);

	*fds = realloc(*fds, (*nfds + 1) * sizeof(struct pollfd));
	(*fds)[*nfds] = (struct pollfd){
		.fd = wav->eventfd,
		.events = POLLIN,
	};
	*nfds += 1;

	return freq / 60;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
cvttss2si -0x1c(%rbp), %rax
movl %eax, %esi
callq 0xd3f0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0xd2ce
movq 0x7d35(%rip), %rax      # 0x14fe8
movq (%rax), %rdi
leaq 0x478f(%rip), %rsi      # 0x11a4c
movb $0x0, %al
callq 0x5580
movl $0x1, %edi
callq 0x5140
movl $0x1, %edi
xorl %esi, %esi
callq 0x51f0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq (%rax), %rax
leaq 0x8(,%rax,8), %rsi
callq 0x5530
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq -0x28(%rbp), %rdx
movl 0x38(%rdx), %edx
movl %edx, -0x30(%rbp)
movw $0x1, -0x2c(%rbp)
movw $0x0, -0x2a(%rbp)
movq -0x30(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movss -0x1c(%rbp), %xmm0
movss 0x46f5(%rip), %xmm1     # 0x11a40
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/wav_write.c
// Function: wav_write_begin
struct wav_writer* wav_write_begin(const char* filename, uint32_t freq) {
	struct wav_writer* wav = calloc(1, sizeof(struct wav_writer));

	*wav = (struct wav_writer){
		.header = {
			.riff_magic = "RIFF",
			.wave_magic = "WAVE",
			.fmt_magic  = "fmt ",
			.fmt_size   = 16,
			.format     = 3,
			.nchannels  = 2,
			.sample_rate = freq,
			.byte_rate = freq * 2 * sizeof(float),
			.block_align = 2 * sizeof(float),
			.bits_per_sample = sizeof(float) * 8,
			.data_magic = "data",
		},
	};

	wav->file = fopen(filename, "w");
	if(!wav->file) {
		fprintf(stderr, "fopen(%s): %m\n", filename);
		return NULL;
	}

	fwrite(&wav->header, sizeof(wav->header), 1, wav->file);

	return wav;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x1, %edi
movl $0x40, %esi
callq 0x54a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl 0x4649(%rip), %eax      # 0x11a65
movl %eax, -0x60(%rbp)
movl $0x0, -0x5c(%rbp)
movl 0x463d(%rip), %eax      # 0x11a69
movl %eax, -0x58(%rbp)
movl 0x4638(%rip), %eax      # 0x11a6d
movl %eax, -0x54(%rbp)
movl $0x10, -0x50(%rbp)
movw $0x3, -0x4c(%rbp)
movw $0x2, -0x4a(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x14(%rbp), %eax
shll %eax
movl %eax, %eax
shlq $0x2, %rax
movl %eax, -0x44(%rbp)
movw $0x8, -0x40(%rbp)
movw $0x20, -0x3e(%rbp)
movl 0x4600(%rip), %eax      # 0x11a71
movl %eax, -0x3c(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
callq 0x55c0
movq -0x10(%rbp), %rdi
leaq 0x4bbe(%rip), %rsi      # 0x12061
callq 0x51c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0xd4e4
movq 0x7b23(%rip), %rax      # 0x14fe8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x45a2(%rip), %rsi      # 0x11a75
movb $0x0, %al
callq 0x5580
movq $0x0, -0x8(%rbp)
jmp 0xd507
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x5510
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/wav_write.c
// Function: wav_write_end
void wav_write_end(struct wav_writer* wav) {

	uint32_t size = 36 + wav->data_size;
	fseek(wav->file, 4, SEEK_SET);
	fwrite(&size, 4, 1, wav->file);

	fseek(wav->file, 40, SEEK_SET);
	fwrite(&wav->data_size, 4, 1, wav->file);

	fflush(wav->file);
	fclose(wav->file);

	free(wav);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
addl $0x24, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x5120
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
leaq -0xc(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x5510
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movl $0x28, %esi
xorl %edx, %edx
callq 0x5120
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5510
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x55e0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x54c0
movq -0x8(%rbp), %rdi
callq 0x5250
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_chart_set
void ui_chart_set(uint16_t notes[static 3]){
	if(++col >= &grid[0] + GRID_W){
		col = &grid[0];
	}

	memset(col, 0, sizeof(*col));

	for(int i = 0; i < 3; ++i){
		int n = notes[i] - 5;
		if(n < 0 || n >= GRID_H) continue;
		
		(*col)[n] |= (1 << i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x90dd(%rip), %rax      # 0x16720
addq $0x3c, %rax
movq %rax, 0x90d2(%rip)      # 0x16720
leaq 0x964b(%rip), %rcx      # 0x16ca0
addq $0xe10, %rcx            # imm = 0xE10
cmpq %rcx, %rax
jb 0xd66f
leaq 0x9638(%rip), %rax      # 0x16ca0
movq %rax, 0x90b1(%rip)      # 0x16720
movq 0x90aa(%rip), %rdi      # 0x16720
xorl %esi, %esi
movl $0x3c, %edx
callq 0x5080
movl $0x0, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jge 0xd6d8
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
subl $0x5, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0xd6ad
cmpl $0x3c, -0x10(%rbp)
jl 0xd6af
jmp 0xd6cd
movl -0xc(%rbp), %ecx
movl $0x1, %esi
shll %cl, %esi
movq 0x9060(%rip), %rax      # 0x16720
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd689
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_msg_set
void ui_msg_set(const char* fmt, ...){
	va_list va;
	va_start(va, fmt);

	vsnprintf(msg, sizeof(msg), fmt, va);

	msg_timer = 20;
	va_end(va);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0xd715
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rdx
leaq 0xa348(%rip), %rdi      # 0x17ab0
movl $0x80, %esi
leaq -0x20(%rbp), %rcx
callq 0x53f0
movl $0x14, 0xa3b0(%rip)     # 0x17b30
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_osc_draw
void ui_osc_draw(int chan, float* samples, size_t count){
	struct osc_chan* c = osc_chans + chan;

	count /= 2;

	if(count > OSC_SAMPLES){
		samples += 2 * (count - OSC_SAMPLES);
		count = OSC_SAMPLES;
	}

	size_t copy_count = OSC_SAMPLES - count;
	memmove(c->samples, c->samples + count, copy_count * sizeof(float));

	for(size_t i = 0; i < count; ++i){
		float s = ((samples[i*2] + samples[i*2+1]) / 2.0f);// * 1.2f * height;
		c->samples[copy_count + i] = s;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xa1d2(%rip), %rax      # 0x17c00
imulq $0x1900, %rcx, %rcx     # imm = 0x1900
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq %rax
movq %rax, -0x18(%rbp)
cmpq $0x640, -0x18(%rbp)     # imm = 0x640
jbe 0xda72
movq -0x18(%rbp), %rax
subq $0x640, %rax            # imm = 0x640
shlq %rax
shlq $0x2, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x640, -0x18(%rbp)     # imm = 0x640
movl $0x640, %eax            # imm = 0x640
subq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
shlq $0x2, %rdx
callq 0x53d0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xdb07
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
addss 0x4(%rax,%rcx,4), %xmm0
movss 0x253a(%rip), %xmm1     # 0x10014
divss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm0
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
addq -0x30(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xdaa7
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_redraw
void ui_redraw(struct GBSHeader* h){
	if(cfg.hide_ui) return;

	uint16_t notes[4] = {};
	audio_get_notes(notes);
	ui_chart_set(notes);

	if(cfg.ui_mode == UI_MODE_CHART){
		ui_chart_draw();
	} else {
		ui_info_draw(h);
		ui_regs_draw();

		if(cfg.ui_mode == UI_MODE_REGISTERS){
			ui_notes_draw(notes);
		} else {
			ui_volume_draw(notes);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x8df5(%rip), %rax      # 0x16918
testb $0x1, 0x5(%rax)
je 0xdb2b
jmp 0xdb92
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x5080
leaq -0x10(%rbp), %rdi
callq 0xc4a0
leaq -0x10(%rbp), %rdi
callq 0xd630
leaq 0x8dc4(%rip), %rax      # 0x16918
cmpl $0x2, 0x24(%rax)
jne 0xdb61
callq 0xdba0
jmp 0xdb92
movq -0x8(%rbp), %rdi
callq 0xddd0
callq 0xe0b0
leaq 0x8da2(%rip), %rax      # 0x16918
cmpl $0x0, 0x24(%rax)
jne 0xdb87
leaq -0x10(%rbp), %rdi
callq 0xe320
jmp 0xdb90
leaq -0x10(%rbp), %rdi
callq 0xe4f0
jmp 0xdb92
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_refresh
void ui_refresh(void){
	struct point {
		int16_t x, y;
	} points[OSC_W];

	for(size_t i = 0; i < OSC_W; ++i){
		points[i].x = i;
	}

	const int off_start = OSC_W / 2;
	const int off_end   = OSC_SAMPLES - off_start;
	const int height    = 120;

	x11_draw_begin();

	for(size_t i = 0; i < 4; ++i){
		struct osc_chan* c = osc_chans + i;

		const float y_mid = height / 2 + height * i;
		const ssize_t off = i == 3 ? OSC_SAMPLES - OSC_W : osc_find_transition(c->samples + off_start, c->samples + off_end);

		if(off != -1){
			for(size_t j = 0; j < OSC_W; ++j){
				points[j].y = y_mid + c->samples[j+off] * height;
			}
			x11_draw_lines((int16_t*)&points, OSC_W*2);
		}
	}

	x11_draw_end();
	if(cfg.hide_ui) return;

	ui_msg_draw();
	refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xdb0, %rsp            # imm = 0xDB0
movq $0x0, -0xd68(%rbp)
cmpq $0x356, -0xd68(%rbp) # imm = 0x356
jae 0xe8b0
movq -0xd68(%rbp), %rax
movw %ax, %cx
movq -0xd68(%rbp), %rax
movw %cx, -0xd60(%rbp,%rax,4)
movq -0xd68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd68(%rbp)
jmp 0xe876
movl $0x1ab, -0xd6c(%rbp)    # imm = 0x1AB
movl $0x495, -0xd70(%rbp)    # imm = 0x495
movl $0x78, -0xd74(%rbp)
callq 0xf850
movq $0x0, -0xd80(%rbp)
cmpq $0x4, -0xd80(%rbp)
jae 0xea60
movq -0xd80(%rbp), %rax
imulq $0x1900, %rax, %rcx     # imm = 0x1900
leaq 0x92ff(%rip), %rax      # 0x17c00
addq %rcx, %rax
movq %rax, -0xd88(%rbp)
movq -0xd80(%rbp), %rax
imulq $0x78, %rax, %rax
addq $0x3c, %rax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0xda8(%rbp)
movq %rax, %rcx
shrq %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
movss %xmm0, -0xda4(%rbp)
js 0xe953
movss -0xda8(%rbp), %xmm0
movss %xmm0, -0xda4(%rbp)
movss -0xda4(%rbp), %xmm0
movss %xmm0, -0xd8c(%rbp)
cmpq $0x3, -0xd80(%rbp)
jne 0xe97b
movl $0x2ea, %eax            # imm = 0x2EA
movq %rax, -0xdb0(%rbp)
jmp 0xe9a3
movq -0xd88(%rbp), %rdi
addq $0x6ac, %rdi            # imm = 0x6AC
movq -0xd88(%rbp), %rsi
addq $0x1254, %rsi           # imm = 0x1254
callq 0xeaa0
movq %rax, -0xdb0(%rbp)
movq -0xdb0(%rbp), %rax
movq %rax, -0xd98(%rbp)
cmpq $-0x1, -0xd98(%rbp)
je 0xea47
movq $0x0, -0xda0(%rbp)
cmpq $0x356, -0xda0(%rbp) # imm = 0x356
jae 0xea36
movss -0xd8c(%rbp), %xmm1
movq -0xd88(%rbp), %rax
movq -0xda0(%rbp), %rcx
movq -0xd98(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x3080(%rip), %xmm2     # 0x11a84
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0xda0(%rbp), %rax
movw %cx, -0xd5e(%rbp,%rax,4)
movq -0xda0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xda0(%rbp)
jmp 0xe9ca
leaq -0xd60(%rbp), %rdi
movl $0x6ac, %esi            # imm = 0x6AC
callq 0xf8b0
jmp 0xea49
movq -0xd80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd80(%rbp)
jmp 0xe8de
callq 0xf910
leaq 0x7eac(%rip), %rax      # 0x16918
testb $0x1, 0x5(%rax)
je 0xea74
jmp 0xea88
callq 0xec20
movq 0x6550(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x52c0
addq $0xdb0, %rsp            # imm = 0xDB0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: osc_find_transition
static ssize_t osc_find_transition(float* start, float* end){
	float* p = start+1;
	float* candidates[8];
	float** c = candidates;

	do {
		for(; p < end-1; ++p){
			if(*p > 0.01f){
				break;
			}
		}

		for(; p < end-1; ++p){
			if(*p < -0.01f){
				*c++ = p;
				break;
			}
		}
	} while(p < end-1 && c - candidates < countof(candidates));

	ssize_t off = -1;
	float max = FLT_MAX;
	for(float** f = candidates; f < c; ++f){
		float v = (*f)[0];
		if(v < max){
			max = v;
			off = *f - start;
		}
	}

	return off;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0xeac6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
jae 0xeafe
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss 0x2fa1(%rip), %xmm1     # 0x11a88
ucomiss %xmm1, %xmm0
jbe 0xeaee
jmp 0xeafe
jmp 0xeaf0
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0xeac6
jmp 0xeb00
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
jae 0xeb4a
movq -0x18(%rbp), %rax
movss 0x2f6f(%rip), %xmm0     # 0x11a8c
ucomiss (%rax), %xmm0
jbe 0xeb3a
movq -0x18(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
jmp 0xeb4a
jmp 0xeb3c
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0xeb00
jmp 0xeb4c
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rdx
addq $-0x4, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x85(%rbp)
jae 0xeb81
movq -0x68(%rbp), %rax
leaq -0x60(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x8, %rax
setb %al
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
testb $0x1, %al
jne 0xeac4
movq $-0x1, -0x70(%rbp)
movss 0x2ef1(%rip), %xmm0     # 0x11a90
movss %xmm0, -0x74(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0xec0e
movq -0x80(%rbp), %rax
movq (%rax), %rax
movss (%rax), %xmm0
movss %xmm0, -0x84(%rbp)
movss -0x84(%rbp), %xmm1
movss -0x74(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xebfe
movss -0x84(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movq %rax, -0x70(%rbp)
jmp 0xec00
movq -0x80(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x80(%rbp)
jmp 0xebac
movq -0x70(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_msg_draw
static void ui_msg_draw(void){
	if(msg_timer > 0){
		move(cfg.win_h-1, 0);

		if(--msg_timer == 0){
			clrtoeol();
		} else {
			if(msg_timer > 15) attron(A_BOLD);
			printw("%s\n", msg);
			if(msg_timer > 15) attroff(A_BOLD);
		}
	} else if(ui_in_cmd_mode) {
		move(cfg.win_h-1, 0);
		clrtoeol();
		attron(A_BOLD);
		printw("Goto track: %s", input);
		attroff(A_BOLD);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x8f05(%rip)      # 0x17b30
jle 0xeccf
movq 0x6398(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
leaq 0x7cd6(%rip), %rax      # 0x16918
movl 0x2c(%rax), %esi
subl $0x1, %esi
xorl %edx, %edx
callq 0x5200
movl 0x8edb(%rip), %eax      # 0x17b30
addl $-0x1, %eax
movl %eax, 0x8ed2(%rip)      # 0x17b30
cmpl $0x0, %eax
jne 0xec74
movq 0x6366(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x5210
jmp 0xeccd
cmpl $0xf, 0x8eb5(%rip)      # 0x17b30
jle 0xec95
movq 0x634c(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x52b0
leaq 0x1a8c(%rip), %rdi      # 0x10728
leaq 0x8e0d(%rip), %rsi      # 0x17ab0
movb $0x0, %al
callq 0x54e0
cmpl $0xf, 0x8e7f(%rip)      # 0x17b30
jle 0xeccb
movq 0x6316(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x55a0
jmp 0xeccd
jmp 0xed4c
testb $0x1, 0xf32a(%rip)      # 0x1e000
je 0xed4a
movq 0x62f1(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
leaq 0x7c2f(%rip), %rax      # 0x16918
movl 0x2c(%rax), %esi
subl $0x1, %esi
xorl %edx, %edx
callq 0x5200
movq 0x62d3(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x5210
movq 0x62c4(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x52b0
leaq 0x32d7(%rip), %rdi      # 0x11ffb
leaq 0xf2e5(%rip), %rsi      # 0x1e010
movb $0x0, %al
callq 0x54e0
movq 0x6297(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x55a0
jmp 0xed4c
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/ui.c
// Function: ui_cmd
int ui_cmd(int key){
	int result = -1;

	if(cfg.hide_ui)
		return result;

	switch(key){
		case '\n': {
			if(ui_in_cmd_mode && *input){
				result = atoi(input);
			}
			input_ptr = input;
			*input = 0;
			ui_in_cmd_mode = !ui_in_cmd_mode;
			move(cfg.win_h-1, 0);
			clrtoeol();
		} break;

		case KEY_BACKSPACE: {
			if(input_ptr != input){
				*--input_ptr = 0;
			}
		} break;

		default: {
			if(input_ptr - input < sizeof(input)){
				*input_ptr++ = key;
				*input_ptr = 0;
			}
		} break;
	}

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
leaq 0x7b5f(%rip), %rax      # 0x16918
testb $0x1, 0x5(%rax)
je 0xedca
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xeece
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
subl $0xa, %eax
je 0xede6
jmp 0xedd7
movl -0x10(%rbp), %eax
subl $0x107, %eax            # imm = 0x107
je 0xee5e
jmp 0xee89
testb $0x1, 0xf213(%rip)      # 0x1e000
je 0xee0a
movsbl 0xf21a(%rip), %eax      # 0x1e010
cmpl $0x0, %eax
je 0xee0a
leaq 0xf20e(%rip), %rdi      # 0x1e010
callq 0x53a0
movl %eax, -0xc(%rbp)
leaq 0xf1ff(%rip), %rax      # 0x1e010
movq %rax, 0x7910(%rip)      # 0x16728
movb $0x0, 0xf1f1(%rip)      # 0x1e010
movb 0xf1db(%rip), %al       # 0x1e000
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0xf1d1(%rip)       # 0x1e000
movq 0x619a(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
leaq 0x7ad8(%rip), %rax      # 0x16918
movl 0x2c(%rax), %esi
subl $0x1, %esi
xorl %edx, %edx
callq 0x5200
movq 0x617c(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x5210
jmp 0xeec8
leaq 0xf1ab(%rip), %rax      # 0x1e010
cmpq %rax, 0x78bc(%rip)      # 0x16728
je 0xee87
movq 0x78b3(%rip), %rax      # 0x16728
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x78a5(%rip)      # 0x16728
movb $0x0, -0x1(%rax)
jmp 0xeec8
movq 0x7898(%rip), %rax      # 0x16728
leaq 0xf179(%rip), %rcx      # 0x1e010
subq %rcx, %rax
cmpq $0x20, %rax
jae 0xeec6
movl -0x8(%rbp), %eax
movb %al, %cl
movq 0x787c(%rip), %rax      # 0x16728
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x786e(%rip)      # 0x16728
movb %cl, (%rax)
movq 0x7865(%rip), %rax      # 0x16728
movb $0x0, (%rax)
jmp 0xeec8
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/x11.c
// Function: x11_action
int x11_action(bool* have_more_events){
	if(!x11_win || !x11.pending(x11_dpy)){
		*have_more_events = false;
		return -1;
	}

	XEvent ev;
	x11.next_event(x11_dpy, &ev);

	if(ev.type == KeyPress){
		KeySym sym = x11.lookup_key(&ev.xkey, 0);

		switch(sym){
			case XK_Escape:
			case XK_q:
				return 'o';
			case XK_BackSpace:
				return KEY_BACKSPACE;
			case XK_Up:
				return KEY_UP;
			case XK_Down:
				return KEY_DOWN;
			case XK_Left:
				return KEY_LEFT;
			case XK_Right:
				return KEY_RIGHT;
			case XK_Return:
				return '\n';
			case XK_c:
				if(ev.xkey.state & ControlMask){
					return 'q';
				}
			default:
				return sym;
		}
	}

	if(ev.type == ClientMessage && ev.xclient.data.l[0] == x11_atom_wm_delete){
		x11.unmap_window(x11_dpy, x11_win);
		x11_visible = false;
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, 0xea59(%rip)      # 0x1e0e0
je 0xf69e
movq 0xea18(%rip), %rax      # 0x1e0a8
movq 0xea41(%rip), %rdi      # 0x1e0d8
callq *%rax
cmpl $0x0, %eax
jne 0xf6b1
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf83a
movq 0xe9f8(%rip), %rax      # 0x1e0b0
movq 0xea19(%rip), %rdi      # 0x1e0d8
leaq -0xd0(%rbp), %rsi
callq *%rax
cmpl $0x2, -0xd0(%rbp)
jne 0xf7fc
movq 0xe9dc(%rip), %rax      # 0x1e0b8
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
callq *%rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
subq $0x63, %rax
je 0xf7da
jmp 0xf708
movq -0xe0(%rbp), %rax
subq $0x71, %rax
je 0xf792
jmp 0xf717
movq -0xe0(%rbp), %rax
subq $0xff08, %rax           # imm = 0xFF08
je 0xf79e
jmp 0xf728
movq -0xe0(%rbp), %rax
subq $0xff0d, %rax           # imm = 0xFF0D
je 0xf7d1
jmp 0xf73d
movq -0xe0(%rbp), %rax
subq $0xff1b, %rax           # imm = 0xFF1B
je 0xf792
jmp 0xf74e
movq -0xe0(%rbp), %rax
subq $0xff51, %rax           # imm = 0xFF51
je 0xf7bf
jmp 0xf75f
movq -0xe0(%rbp), %rax
subq $0xff52, %rax           # imm = 0xFF52
je 0xf7aa
jmp 0xf770
movq -0xe0(%rbp), %rax
subq $0xff53, %rax           # imm = 0xFF53
je 0xf7c8
jmp 0xf781
movq -0xe0(%rbp), %rax
subq $0xff54, %rax           # imm = 0xFF54
je 0xf7b6
jmp 0xf7f0
movl $0x6f, -0x4(%rbp)
jmp 0xf83a
movl $0x107, -0x4(%rbp)      # imm = 0x107
jmp 0xf83a
movl $0x103, -0x4(%rbp)      # imm = 0x103
jmp 0xf83a
movl $0x102, -0x4(%rbp)      # imm = 0x102
jmp 0xf83a
movl $0x104, -0x4(%rbp)      # imm = 0x104
jmp 0xf83a
movl $0x105, -0x4(%rbp)      # imm = 0x105
jmp 0xf83a
movl $0xa, -0x4(%rbp)
jmp 0xf83a
movl -0x80(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xf7ee
movl $0x71, -0x4(%rbp)
jmp 0xf83a
jmp 0xf7f0
movq -0xd8(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0xf83a
cmpl $0x21, -0xd0(%rbp)
jne 0xf833
movq -0x98(%rbp), %rax
cmpq 0xe8f5(%rip), %rax      # 0x1e108
jne 0xf833
movq 0xe83c(%rip), %rax      # 0x1e058
movq 0xe8b5(%rip), %rdi      # 0x1e0d8
movq 0xe8b6(%rip), %rsi      # 0x1e0e0
callq *%rax
movb $0x0, 0xe8dd(%rip)      # 0x1e110
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/x11.c
// Function: x11_draw_end
void x11_draw_end(void){
	if(!x11_win || !x11_visible) return;

	struct present_pixmap_req* req = x11.get_request(x11_dpy, x11_present_op, sizeof(*req));
	memset(req->crap, 0, sizeof(req->crap));
	req->subtype = 1;
	req->window = x11_win;
	req->pixmap = x11_pix;

	if(x11_dpy->synchandler)
		x11_dpy->synchandler(x11_dpy);

	x11.flush(x11_dpy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0xe7c0(%rip)      # 0x1e0e0
je 0xf92b
testb $0x1, 0xe7e7(%rip)      # 0x1e110
jne 0xf930
jmp 0xf9c6
movq 0xe799(%rip), %rax      # 0x1e0d0
movq 0xe79a(%rip), %rdi      # 0x1e0d8
movl 0xe7a4(%rip), %ecx      # 0x1e0e8
movl $0x48, %edx
movzbl %cl, %esi
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0x5080
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
movq 0xe76b(%rip), %rax      # 0x1e0e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq 0xe76b(%rip), %rax      # 0x1e0f0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0xe743(%rip), %rax      # 0x1e0d8
cmpq $0x0, 0xd0(%rax)
je 0xf9b6
movq 0xe732(%rip), %rax      # 0x1e0d8
movq 0xd0(%rax), %rax
movq 0xe724(%rip), %rdi      # 0x1e0d8
callq *%rax
movq 0xe6db(%rip), %rax      # 0x1e098
movq 0xe714(%rip), %rdi      # 0x1e0d8
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baines[P]MiniGBS/x11.c
// Function: x11_toggle
void x11_toggle(void){
	if(!x11_win) return;

	if(x11_visible){
		x11.unmap_window(x11_dpy, x11_win);
	} else {
		x11.map_window(x11_dpy, x11_win);
	}

	x11_visible = !x11_visible;
	x11.flush(x11_dpy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0xe704(%rip)      # 0x1e0e0
jne 0xf9e0
jmp 0xfa39
testb $0x1, 0xe729(%rip)      # 0x1e110
je 0xfa02
movq 0xe668(%rip), %rax      # 0x1e058
movq 0xe6e1(%rip), %rdi      # 0x1e0d8
movq 0xe6e2(%rip), %rsi      # 0x1e0e0
callq *%rax
jmp 0xfa19
movq 0xe647(%rip), %rax      # 0x1e050
movq 0xe6c8(%rip), %rdi      # 0x1e0d8
movq 0xe6c9(%rip), %rsi      # 0x1e0e0
callq *%rax
movb 0xe6f1(%rip), %al       # 0x1e110
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0xe6e7(%rip)       # 0x1e110
movq 0xe668(%rip), %rax      # 0x1e098
movq 0xe6a1(%rip), %rdi      # 0x1e0d8
callq *%rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/if.c
// Function: main
int
main(int argc, char **argv)
{
	bool re;		/* return value of expr() */

	setmyerrexit(&ut_errexit);
	setmyname(argv[0]);
	setmypid(getpid());

	ifeuid = geteuid();

	/*
	 * Set-ID execution is not supported.
	 */
	if (ifeuid != getuid() || getegid() != getgid())
		err(FC_ERR, FMT2S, getmyname(), ERR_SETID);

	(void)sasignal(SIGCHLD, SIG_DFL);

	if (argc > 1) {
		ac = argc;
		av = argv;
		ap = 1;
		re = expr();
		if (re && ap < ac)
			doex(!FORKED);
	} else
		re = false;

	return re ? SH_TRUE : SH_FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1333(%rip), %rdi      # 0x2680
callq 0x2590
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x25b0
callq 0x10d0
movl %eax, %edi
callq 0x2660
callq 0x1140
movl %eax, 0x3dc3(%rip)      # 0x5138
movl 0x3dbd(%rip), %eax      # 0x5138
movl %eax, -0x18(%rbp)
callq 0x10f0
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jne 0x13a2
callq 0x11d0
movl %eax, -0x1c(%rbp)
callq 0x11b0
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
je 0x13c4
callq 0x2530
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x1d73(%rip), %rsi      # 0x3129
leaq 0x1d4a(%rip), %rcx      # 0x3107
movb $0x0, %al
callq 0x2230
movl $0x11, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x2d30
cmpl $0x1, -0x8(%rbp)
jle 0x141d
movl -0x8(%rbp), %eax
movl %eax, 0x3d5b(%rip)      # 0x513c
movq -0x10(%rbp), %rax
movq %rax, 0x3d54(%rip)      # 0x5140
movl $0x1, 0x3d52(%rip)      # 0x5148
callq 0x1440
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x141b
movl 0x3d3c(%rip), %eax      # 0x5148
cmpl 0x3d2a(%rip), %eax      # 0x513c
jge 0x141b
xorl %edi, %edi
callq 0x14c0
jmp 0x1421
movb $0x0, -0x11(%rbp)
movb -0x11(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/if.c
// Function: expr
static bool
expr(void)
{
	bool re;

	re = e1();
	if (equal(nxtarg(RETERR), "-o"))
		return re | expr();
	ap--;
	return re;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x16f0
andb $0x1, %al
movb %al, -0x2(%rbp)
movl $0x1, %edi
callq 0x17e0
movq %rax, %rdi
leaq 0x1cb9(%rip), %rsi      # 0x311f
callq 0x1770
testb $0x1, %al
jne 0x1471
jmp 0x149b
movb -0x2(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
callq 0x1440
movb %al, %cl
movl -0x8(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x14b2
movl 0x3ca7(%rip), %eax      # 0x5148
addl $-0x1, %eax
movl %eax, 0x3c9e(%rip)      # 0x5148
movb -0x2(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/if.c
// Function: e1
static bool
e1(void)
{
	bool re;

	re = e2();
	if (equal(nxtarg(RETERR), "-a"))
		return re & e1();
	ap--;
	return re;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x18d0
andb $0x1, %al
movb %al, -0x2(%rbp)
movl $0x1, %edi
callq 0x17e0
movq %rax, %rdi
leaq 0x1a0c(%rip), %rsi      # 0x3122
callq 0x1770
testb $0x1, %al
jne 0x1721
jmp 0x174b
movb -0x2(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
callq 0x16f0
movb %al, %cl
movl -0x8(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1762
movl 0x39f7(%rip), %eax      # 0x5148
addl $-0x1, %eax
movl %eax, 0x39ee(%rip)      # 0x5148
movb -0x2(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/if.c
// Function: nxtarg
static char *
nxtarg(bool reterr)
{
	char *nap;

	if (ap < 1 || ap > ac)	/* should never (but can) be true */
		err(FC_ERR, FMT2S, getmyname(), ERR_AVIINVAL);

	if (ap == ac) {
		if (reterr) {
			ap++;
			return NULL;
		}
		err(FC_ERR, FMT3S, getmyname(), av[ap - 1], ERR_ARGUMENT);
	}
	nap = av[ap];
	ap++;
	return nap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x9(%rbp)
cmpl $0x1, 0x3951(%rip)      # 0x5148
jl 0x1807
movl 0x3949(%rip), %eax      # 0x5148
cmpl 0x3937(%rip), %eax      # 0x513c
jle 0x1829
callq 0x2530
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x190e(%rip), %rsi      # 0x3129
leaq 0x19bf(%rip), %rcx      # 0x31e1
movb $0x0, %al
callq 0x2230
movl 0x3919(%rip), %eax      # 0x5148
cmpl 0x3907(%rip), %eax      # 0x513c
jne 0x188f
testb $0x1, -0x9(%rbp)
je 0x1856
movl 0x3905(%rip), %eax      # 0x5148
addl $0x1, %eax
movl %eax, 0x38fc(%rip)      # 0x5148
movq $0x0, -0x8(%rbp)
jmp 0x18bc
callq 0x2530
movq %rax, %rdx
movq 0x38db(%rip), %rax      # 0x5140
movl 0x38dd(%rip), %ecx      # 0x5148
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movl $0x7c, %edi
leaq 0x18a4(%rip), %rsi      # 0x3125
leaq 0x196c(%rip), %r8       # 0x31f4
movb $0x0, %al
callq 0x2230
movq 0x38aa(%rip), %rax      # 0x5140
movslq 0x38ab(%rip), %rcx      # 0x5148
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movl 0x389d(%rip), %eax      # 0x5148
addl $0x1, %eax
movl %eax, 0x3894(%rip)      # 0x5148
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/if.c
// Function: e2
static bool
e2(void)
{

	if (equal(nxtarg(RETERR), "!"))
		return !e3();
	ap--;
	return e3();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
callq 0x17e0
movq %rax, %rdi
leaq 0x19ba(%rip), %rsi      # 0x32a6
callq 0x1770
testb $0x1, %al
jne 0x18f7
jmp 0x1905
callq 0x1930
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x191e
movl 0x383d(%rip), %eax      # 0x5148
addl $-0x1, %eax
movl %eax, 0x3834(%rip)      # 0x5148
callq 0x1930
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/image.c
// Function: main
int main(int arcg, char *argv[]) {
    scg_config_t config = scg_config_new_default();
    config.video.title = "SCG Example: Image";

    scg_app_t app;
    scg_app_init(&app, config);

    scg_image_t *image = scg_image_new_from_bmp("assets/ball.bmp");
    if (image == NULL) {
        return -1;
    }

    while (scg_app_process_events(&app)) {
        draw(app.draw_target, image);

        scg_app_present(&app);
    }

    scg_image_free(image);
    scg_app_free(&app);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x49e0
leaq 0xe93(%rip), %rax       # 0x759c
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xa0(%rbp), %rdi
callq 0x4a30
leaq 0xe75(%rip), %rdi       # 0x75af
callq 0x2c10
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x6759
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67aa
jmp 0x675b
leaq -0xa0(%rbp), %rdi
callq 0x56b0
testb $0x1, %al
jne 0x676d
jmp 0x678b
movq -0x68(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x67c0
leaq -0xa0(%rbp), %rdi
callq 0x5800
jmp 0x675b
movq -0xa8(%rbp), %rdi
callq 0x4670
leaq -0xa0(%rbp), %rdi
callq 0x5cb0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/allocate.c
// Function: initialize_register_list
void initialize_register_list(){
	unsigned int i;

	register_list.num_allocated = 0;

	for(i = 0; i < NUM_REGISTERS; i++){
		register_list.registers[i] = i;
		register_list.positions[i] = i;
	}
}

// Assembly:
movl $0x0, 0xfff6(%rip)      # 0x112a0
movl $0x0, -0x4(%rsp)
cmpl $0x8, -0x4(%rsp)
jae 0x12f4
movl -0x4(%rsp), %eax
movb %al, %dl
movl -0x4(%rsp), %eax
movl %eax, %ecx
leaq 0xffd4(%rip), %rax      # 0x112a0
movb %dl, 0x4(%rax,%rcx)
movl -0x4(%rsp), %eax
movb %al, %dl
movl -0x4(%rsp), %eax
movl %eax, %ecx
leaq 0xffbd(%rip), %rax      # 0x112a0
movb %dl, 0xc(%rax,%rcx)
movl -0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rsp)
jmp 0x12b2
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/allocate.c
// Function: allocate
data_entry allocate(unsigned char force_stack){
	data_entry output;

	if(force_stack || register_list.num_allocated >= NUM_REGISTERS){
		output.type = data_stack;
		output.prev_stack_size = stack_size;
		output.stack_pos = stack_size;
		stack_size += 4;
	} else {
		output.type = data_register;
		output.reg = register_list.registers[register_list.num_allocated];
		register_list.num_allocated++;
	}

	if(stack_size > saved_stack_size){
		saved_stack_size = stack_size;
	}

	return output;
}

// Assembly:
movb %dil, %al
movb %al, -0xd(%rsp)
movzbl -0xd(%rsp), %eax
cmpl $0x0, %eax
jne 0x131a
cmpl $0x8, 0xff88(%rip)      # 0x112a0
jb 0x1347
movl $0x1, -0xc(%rsp)
movl 0xff6c(%rip), %eax      # 0x11294
movl %eax, -0x4(%rsp)
movl 0xff62(%rip), %eax      # 0x11294
movl %eax, -0x8(%rsp)
movl 0xff58(%rip), %eax      # 0x11294
addl $0x4, %eax
movl %eax, 0xff4f(%rip)      # 0x11294
jmp 0x1376
movl $0x0, -0xc(%rsp)
movl 0xff4b(%rip), %eax      # 0x112a0
movl %eax, %ecx
leaq 0xff42(%rip), %rax      # 0x112a0
movzbl 0x4(%rax,%rcx), %eax
movl %eax, -0x8(%rsp)
movl 0xff33(%rip), %eax      # 0x112a0
addl $0x1, %eax
movl %eax, 0xff2a(%rip)      # 0x112a0
movl 0xff18(%rip), %eax      # 0x11294
cmpl 0xff1a(%rip), %eax      # 0x1129c
jle 0x1390
movl 0xff0a(%rip), %eax      # 0x11294
movl %eax, 0xff0c(%rip)      # 0x1129c
movl -0x4(%rsp), %eax
movl %eax, -0x18(%rsp)
movq -0xc(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movl -0x18(%rsp), %edx
retq
nopl (%rax)