LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/retrieve-tags.c
// Function: rt_del_args
void rt_del_args(uint8_t *buf, size_t len, bool term) {
	static uint32_t recordlen = 0;
	static bool field = true;
	if (!buf) {
		if (!recordlen) {
			opterror('d', catgets(catd, 7, 3, "invalid tag format"));
		}
		recordlen = oi32(recordlen);
		fwrite(&recordlen, 4, 1, dellist_len);
		uint8_t f = field;
		fwrite(&f, 1, 1, dellist_len);
		recordlen = 0;
		field = true;
		return;
	}
	dellist_len = dellist_len ? dellist_len : tmpfile();
	dellist_str = dellist_str ? dellist_str : tmpfile();
	
	recordlen += len;
	if (field && !test_tag_field(buf, len, true, &field, &upcase_applied)) {
		opterror('d', catgets(catd, 7, 3, "invalid tag format"));
	}
	fwrite(buf, 1, len, dellist_str);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x682f
movq %rsi, %rbx
movq %rdi, %r14
movq 0x15ec8(%rip), %rax     # 0x1c650
testq %rax, %rax
jne 0x6792
callq 0x2230
movq %rax, 0x15eb7(%rip)     # 0x1c650
movq 0x15ea0(%rip), %rax     # 0x1c640
testq %rax, %rax
jne 0x67aa
callq 0x2230
addl %ebx, 0x15eac(%rip)     # 0x1c65c
movq %rax, 0x15e89(%rip)     # 0x1c640
cmpb $0x1, 0x5ad2(%rip)      # 0xc290
jne 0x6811
leaq 0x5ac9(%rip), %rcx      # 0xc290
leaq 0x15e8a(%rip), %r8      # 0x1c658
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x5988
testb %al, %al
jne 0x6811
leaq 0x15e97(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x190f(%rip), %rcx      # 0x8102
movl $0x7, %esi
movl $0x3, %edx
callq 0x2440
movl $0x64, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movq 0x15e28(%rip), %rcx     # 0x1c640
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2460
cmpl $0x0, 0x15e26(%rip)     # 0x1c65c
jne 0x6867
leaq 0x15e41(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x18b9(%rip), %rcx      # 0x8102
movl $0x7, %esi
movl $0x3, %edx
callq 0x2440
movl $0x64, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
leaq 0x15dee(%rip), %rbx     # 0x1c65c
movl 0x15de8(%rip), %edi     # 0x1c65c
callq 0x6d2b
movl %eax, 0x15ddd(%rip)     # 0x1c65c
movq 0x15dca(%rip), %rcx     # 0x1c650
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2460
movzbl 0x59f1(%rip), %edi      # 0xc290
movq 0x15daa(%rip), %rsi     # 0x1c650
callq 0x21f0
movl $0x0, 0x15da7(%rip)     # 0x1c65c
movb $0x1, 0x59d4(%rip)      # 0xc290
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/select-codec.c
// Function: select_codec_by_name
bool select_codec_by_name(char const *name) {
	static locale_t clocale = (locale_t)0;
	if (!clocale) {
		clocale = newlocale(LC_ALL, "C", (locale_t)0);
		if (!clocale) {
			oserror();
		}
	}
	for (codec = set; codec->name != NULL && strcasecmp_l(name, codec->name, clocale) != 0; codec++) {}
	return !!codec->name;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x15d0a(%rip)     # 0x1c660
jne 0x697c
leaq 0x1b78(%rip), %rsi      # 0x84d7
movl $0x6, %edi
xorl %edx, %edx
callq 0x2160
movq %rax, 0x15cee(%rip)     # 0x1c660
testq %rax, %rax
jne 0x697c
callq 0x6f9b
leaq 0x592d(%rip), %rax      # 0xc2b0
leaq 0x15ce6(%rip), %r15     # 0x1c670
movq %rax, (%r15)
movq 0x592c(%rip), %rsi      # 0xc2c0
testq %rsi, %rsi
je 0x69cc
leaq 0x5950(%rip), %r12      # 0xc2f0
movq 0x15cb9(%rip), %r14     # 0x1c660
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2330
testl %eax, %eax
sete %al
je 0x69ce
movq %r12, (%r15)
movq 0x10(%r12), %rsi
addq $0x40, %r12
testq %rsi, %rsi
jne 0x69a7
jmp 0x69ce
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/select-codec.c
// Function: check_opus
static void check_opus(ogg_page *og) {
	if (og->body_len < 19) {
		opuserror(err_opus_bad_content);
	}
	if ((og->body[8] & 0xf0) != 0) {
		opuserror(err_opus_version);
	}
	if (O.gain_put) {
		if (O.gain_q78) {
			fprintf(stderr, "%d", (int16_t)oi16(*(int16_t*)(&og->body[16])));
		}
		else {
			fprintf(stderr, "%.8g", (int16_t)oi16(*(int16_t*)(&og->body[16])) / 256.0);
		}
	}
	if (O.gain_fix) {
		int16_t gi;
		if (O.gain_relative) {
			int gain = (int16_t)oi16(*(int16_t*)(&og->body[16]));
			gain += O.gain_val;
			if (gain > 32767) {
				gain = 32767;
			}
			else if (gain < -32768) {
				gain = -32768;
			}
			gi = gain;
		}
		else {
			gi = O.gain_val;
		}
		if (O.gain_not_zero && gi == 0) {
			gi = O.gain_val_sign ? -1 : 1;
		}
		
		*(int16_t*)(&og->body[16]) = oi16(gi);
		ogg_page_checksum_set(og);
		
		if (O.gain_put) {
			if (O.gain_q78) {
				fprintf(stderr, "\t%d", (int)gi);
			}
			else {
				fprintf(stderr, "\t%.8g", gi / 256.0);
			}
		}
	}
	if (O.gain_put) {
		fputc('\n', stderr);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x12, 0x18(%rdi)
jg 0x69f7
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x10, 0x8(%rax)
jb 0x6a0d
movl $0x6, %edi
xorl %eax, %eax
callq 0x6e10
leaq 0x15c74(%rip), %r15     # 0x1c688
cmpb $0x1, 0xd(%r15)
je 0x6ac9
cmpb $0x1, 0x4(%r15)
jne 0x6a99
cmpb $0x1, 0x5(%r15)
jne 0x6a5b
movq 0x10(%rbx), %rax
movzwl 0x10(%rax), %edi
callq 0x6d28
movswl %ax, %ecx
addl 0x8(%r15), %ecx
cmpl $0xffff8001, %ecx       # imm = 0xFFFF8001
movl $0xffff8000, %eax       # imm = 0xFFFF8000
cmovgel %ecx, %eax
movl $0x7fff, %ecx           # imm = 0x7FFF
cmpl %ecx, %eax
cmovgel %ecx, %eax
jmp 0x6a5f
movl 0x8(%r15), %eax
movzbl 0xc(%r15), %ebp
andl $0x1, %ebp
negl %ebp
orl $0x1, %ebp
testw %ax, %ax
cmovnel %eax, %ebp
cmpb $0x0, 0x6(%r15)
cmovel %eax, %ebp
movzwl %bp, %edi
callq 0x6d28
movq 0x10(%rbx), %rcx
movw %ax, 0x10(%rcx)
movq %rbx, %rdi
callq 0x2110
cmpb $0x1, 0xd(%r15)
je 0x6b03
cmpb $0x1, 0xd(%r15)
jne 0x6abe
movq 0x5551(%rip), %rax      # 0xbff8
movq (%rax), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb 0x7(%r15), %bpl
movq 0x5524(%rip), %rax      # 0xbff8
movq (%rax), %r14
movq 0x10(%rbx), %rax
movzwl 0x10(%rax), %edi
callq 0x6d28
cmpb $0x1, %bpl
jne 0x6b2a
movswl %ax, %edx
leaq 0x172a(%rip), %rsi      # 0x821e
movq %r14, %rdi
xorl %eax, %eax
callq 0x2260
jmp 0x6a1f
movq 0x54ee(%rip), %rax      # 0xbff8
movq (%rax), %rdi
cmpb $0x1, 0x7(%r15)
jne 0x6b4d
movswl %bp, %edx
leaq 0x16ff(%rip), %rsi      # 0x821d
xorl %eax, %eax
callq 0x2260
jmp 0x6a99
cwtl
cvtsi2sd %eax, %xmm0
mulsd 0x15e1(%rip), %xmm0     # 0x8118
leaq 0x16e4(%rip), %rsi      # 0x8222
movq %r14, %rdi
movb $0x1, %al
callq 0x2260
jmp 0x6a1f
movswl %bp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x15b9(%rip), %xmm0     # 0x8118
leaq 0x16bb(%rip), %rsi      # 0x8221
movb $0x1, %al
callq 0x2260
jmp 0x6a99
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/select-codec.c
// Function: check_theora
static void check_theora(ogg_page *og) {
	if (og->body_len != 42) {
		opuserror(err_opus_bad_content);
	}
	// major 3, minor 2
	if (og->body[7] != 3 || og->body[8] != 2) {
		opuserror(err_opus_version);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x2a, 0x18(%rdi)
je 0x6b89
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x3, 0x7(%rax)
jne 0x6b9b
cmpb $0x2, 0x8(%rax)
jne 0x6b9b
popq %rbx
retq
movl $0x6, %edi
xorl %eax, %eax
popq %rbx
jmp 0x6e10
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/select-codec.c
// Function: check_vorbis
static void check_vorbis(ogg_page *og) {
// 0-6 "\x1" "\x76\x6f\x72\x62\x69\x73" 
/*7-10   1) [vorbis_version] = read 32 bits as unsigned integer
11   2) [audio_channels] = read 8 bit integer as unsigned
12-15   3) [audio_sample_rate] = read 32 bits as unsigned integer
16   4) [bitrate_maximum] = read 32 bits as signed integer
20   5) [bitrate_nominal] = read 32 bits as signed integer
24   6) [bitrate_minimum] = read 32 bits as signed integer
28.0-3   7) [blocksize_0] = 2 exponent (read 4 bits as unsigned integer)
28.4-7   8) [blocksize_1] = 2 exponent (read 4 bits as unsigned integer)
29   9) [framing_flag] = read one bit
*/
	if (og->body_len != 30) opuserror(err_opus_bad_content);
	if (oi32(*(uint32_t*)&og->body[7]) != 0) opuserror(err_opus_version);
	if (!og->body[11]) opuserror(err_opus_bad_content);
	if (oi32(*(uint32_t*)&og->body[12]) == 0) opuserror(err_opus_bad_content);
	if (!og->body[29]) opuserror(err_opus_bad_content);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x1e, 0x18(%rdi)
je 0x6bbf
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
movl 0x7(%rax), %edi
callq 0x6d2b
testl %eax, %eax
je 0x6bdb
movl $0x6, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x0, 0xb(%rax)
jne 0x6bf1
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
movl 0xc(%rax), %edi
callq 0x6d2b
testl %eax, %eax
jne 0x6c0d
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x0, 0x1d(%rax)
je 0x6c19
popq %rbx
retq
movl $0xc, %edi
xorl %eax, %eax
popq %rbx
jmp 0x6e10
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/select-codec.c
// Function: check_vp8
static void check_vp8(ogg_page *og) {
	// https://people.freedesktop.org/~slomo/ogg-vp8/ogg-vp8.pdf
	// ヘッダ長、ヘッダ種類
	if (og->body_len < 26 || og->body[5] != 1) opuserror(err_opus_bad_content);
	// major 1
	if (og->body[6] != 1) opuserror(err_opus_version);
	// minor 0。0ならば必ずサイズは26
	if (og->body[7] == 0 && og->body_len != 26) opuserror(err_opus_bad_content);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x1a, 0x18(%rdi)
jl 0x6ce3
movq 0x10(%rbx), %rax
cmpb $0x1, 0x5(%rax)
je 0x6cef
movl $0xc, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x1, 0x6(%rax)
je 0x6d05
movl $0x6, %edi
xorl %eax, %eax
callq 0x6e10
movq 0x10(%rbx), %rax
cmpb $0x0, 0x7(%rax)
jne 0x6d16
cmpq $0x1a, 0x18(%rbx)
jne 0x6d18
popq %rbx
retq
movl $0xc, %edi
xorl %eax, %eax
popq %rbx
jmp 0x6e10
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/error.c
// Function: mainerror
noreturn void mainerror(int e, ...) {
	va_list ap;
	va_start(ap, e);
	errorprefix();
	char const *msg[] = {
#define LIST(I, E, S) S,
#include "errordef/main.tab"
#undef LIST
	};
	vfprintf(stderr, catgets(catd, 2, e, msg[e]), ap);
	fputc('\n', stderr);
	exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edi, %ebx
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 0x6d98
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, %r14
movq %rdi, 0x10(%r14)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
callq 0x24f0
movq 0x5234(%rip), %r12      # 0xbff8
movq (%r12), %r15
leaq 0x158b1(%rip), %rax     # 0x1c680
movq (%rax), %rdi
movslq %ebx, %rdx
leaq 0x4e44(%rip), %rax      # 0xbc20
movq (%rax,%rdx,8), %rcx
movl $0x2, %esi
callq 0x2440
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2400
movq (%r12), %rsi
movl $0xa, %edi
callq 0x21f0
movl $0x1, %edi
callq 0x2450
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/error.c
// Function: opuserror
noreturn void opuserror(int e, ...) {
	va_list ap;
	va_start(ap, e);
	errorprefix();
	
	struct {
		bool report_page;
		char const *default_message;
	} msg[] = {
#define LIST(I, B, E, S) {B, S},
#include "errordef/opus.tab"
#undef LIST
	};
	if (msg[e].report_page && codec->type != CODEC_FLAC) {
		fprintf(stderr, catgets(catd, 1, 4, "%s format error: page %u: "), codec->name, opus_idx);
	}
	else {
		fprintf(stderr, catgets(catd, 1, 8, "%s format error: "), codec->name);
	}
	vfprintf(stderr, catgets(catd, 3, e, msg[e].default_message), ap);
	fputc('\n', stderr);
	exit(2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edi, %ebx
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 0x6e74
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 %rdi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
callq 0x24f0
movslq %ebx, %rax
shlq $0x4, %rax
leaq 0x4df9(%rip), %rcx      # 0xbca0
leaq (%rcx,%rax), %r15
cmpb $0x1, (%rax,%rcx)
jne 0x6ec1
leaq 0x157b8(%rip), %r12     # 0x1c670
movq (%r12), %rax
cmpl $0x2, (%rax)
jne 0x6f08
movq 0x5130(%rip), %rax      # 0xbff8
movq (%rax), %r14
leaq 0x157ae(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x1618(%rip), %rcx      # 0x84f4
movl $0x1, %esi
movl $0x8, %edx
callq 0x2440
leaq 0x1577e(%rip), %rcx     # 0x1c670
movq (%rcx), %rcx
movq 0x10(%rcx), %rdx
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x2260
jmp 0x6f50
movq 0x50e9(%rip), %rax      # 0xbff8
movq (%rax), %r14
leaq 0x15767(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x15b6(%rip), %rcx      # 0x84d9
movl $0x1, %esi
movl $0x4, %edx
callq 0x2440
movq (%r12), %rcx
movq 0x10(%rcx), %rdx
leaq 0x1578f(%rip), %rcx     # 0x1c6d0
movl (%rcx), %ecx
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x2260
movq 0x50a1(%rip), %r12      # 0xbff8
movq (%r12), %r14
leaq 0x1571e(%rip), %rax     # 0x1c680
movq (%rax), %rdi
movq 0x8(%r15), %rcx
movl $0x3, %esi
movl %ebx, %edx
callq 0x2440
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2400
movq (%r12), %rsi
movl $0xa, %edi
callq 0x21f0
movl $0x2, %edi
callq 0x2450
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/error.c
// Function: oserror_fmt
noreturn void oserror_fmt(char const *e, ...) {
	va_list ap;
	va_start(ap, e);
	errorprefix();
	vfprintf(stderr, e, ap);
	fputc('\n', stderr);
	exit(3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
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 0x7018
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, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
callq 0x24f0
movq 0x4fb4(%rip), %r15      # 0xbff8
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2400
movq (%r15), %rsi
movl $0xa, %edi
callq 0x21f0
movl $0x3, %edi
callq 0x2450
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/error.c
// Function: fileerror
noreturn void fileerror(char const *file) {
	errorprefix();
	fprintf(stderr, catgets(catd, 1, 5, "%s: "), file);
	perror(NULL);
	exit(3);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x24f0
movq 0x4f7c(%rip), %rax      # 0xbff8
movq (%rax), %r14
leaq 0x155fa(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x1197(%rip), %rcx      # 0x8227
movl $0x1, %esi
movl $0x5, %edx
callq 0x2440
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2260
xorl %edi, %edi
callq 0x23d0
movl $0x3, %edi
callq 0x2450
// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/error.c
// Function: opterror
noreturn void opterror(int c, char const *e, ...) {
	va_list ap;
	va_start(ap, e);
	errorprefix();
	fprintf(stderr, catgets(catd, 1, 7, "-%c: "), c);
	vfprintf(stderr, e, ap);
	fputc('\n', stderr);
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x7124
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, %r14
movq %rsi, 0x10(%r14)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
callq 0x24f0
movq 0x4ea8(%rip), %r12      # 0xbff8
movq (%r12), %r15
leaq 0x15525(%rip), %rax     # 0x1c680
movq (%rax), %rdi
leaq 0x13a1(%rip), %rcx      # 0x8506
movl $0x1, %esi
movl $0x7, %edx
callq 0x2440
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2260
movq (%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2400
movq (%r12), %rsi
movl $0xa, %edi
callq 0x21f0
movl $0x1, %edi
callq 0x2450
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/thread_error.c
// Function: main
int main(void)
{
	pthread_t weirdo;
	/* join with an uninitialized value */
	int status = pthread_join(weirdo, NULL);

	if (status != 0)
		fprintf(stderr, "Error %d: %s\n", status, strerror(status));
	else
		fprintf(stderr, "Weird, no error\n");
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %esi, %esi
callq 0x1050
movl %eax, %ebx
movq 0x2e58(%rip), %rax      # 0x3ff8
movq (%rax), %r14
testl %ebx, %ebx
jne 0x11b1
movq %r14, %rdi
callq 0x1080
jmp 0x11ce
movl %ebx, %edi
callq 0x1060
leaq 0xe45(%rip), %rsi       # 0x2004
movq %r14, %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test4.c
// Function: main
void main()
{
    int i;
    int* p = malloc(5 * sizeof(int));
    for(i = 0; i < 5; i++){
        p[i] = i;
    }
    for(i = 0; i < 5; i++){
        printf("address: %p, value: %d\n", p + i, p[i]);
     }
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xea7(%rip), %rsi       # 0x2004
movl $0x14, %edi
movl $0x7, %edx
callq 0x11c4
movq %rax, %rbx
xorl %eax, %eax
movl %eax, (%rbx,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x1171
leaq 0xe88(%rip), %r14       # 0x200c
xorl %r15d, %r15d
leaq (%rbx,%r15), %rsi
movl (%rbx,%r15), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1030
addq $0x4, %r15
cmpq $0x14, %r15
jne 0x1187
leaq 0xe5a(%rip), %rsi       # 0x2004
movq %rbx, %rdi
movl $0xe, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1324
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: hold
void hold(int sig)
{
	if (sig == SIGHUP || sig == SIGINT || sig == SIGTERM)
		running = false;
	else if (sig == SIGUSR1)
		reload = true;
	else if (sig == SIGUSR2)
		toggle_grab = true;
	else if (sig == SIGALRM)
		bell = true;
}

// Assembly:
decl %edi
cmpl $0xe, %edi
ja 0xeb1b
leaq 0x353d(%rip), %rax      # 0x12040
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x0, 0x14972(%rip)     # 0x23485
retq
movb $0x1, 0x14967(%rip)     # 0x23482
retq
movb $0x1, 0x14961(%rip)     # 0x23484
retq
movb $0x1, 0x14958(%rip)     # 0x23483
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: setup
void setup(void)
{
	int screen_idx;
	dpy = xcb_connect(NULL, &screen_idx);
	if (xcb_connection_has_error(dpy))
		err("Can't open display.\n");
	xcb_screen_t *screen = NULL;
	xcb_screen_iterator_t screen_iter = xcb_setup_roots_iterator(xcb_get_setup(dpy));
	for (; screen_iter.rem; xcb_screen_next(&screen_iter), screen_idx--) {
		if (screen_idx == 0) {
			screen = screen_iter.data;
			break;
		}
	}
	if (screen == NULL)
		err("Can't acquire screen.\n");
	root = screen->root;
	if ((shell = getenv(SXHKD_SHELL_ENV)) == NULL && (shell = getenv(SHELL_ENV)) == NULL)
		err("The '%s' environment variable is not defined.\n", SHELL_ENV);
	symbols = xcb_key_symbols_alloc(dpy);
	hotkeys_head = hotkeys_tail = NULL;
	progress[0] = '\0';

	snprintf(sxhkd_pid, MAXLEN, "%i", getpid());
	setenv("SXHKD_PID", sxhkd_pid, 1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0xe100
movq %rax, 0x14932(%rip)     # 0x23478
movq %rax, %rdi
callq 0xe310
testl %eax, %eax
jne 0xec56
movq 0x1491b(%rip), %rdi     # 0x23478
callq 0xe350
movq %rax, %rdi
callq 0xe210
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
testl %edx, %edx
je 0xeb9c
leaq 0x8(%rsp), %rbx
xorl %r14d, %r14d
cmpl $0x0, 0x4(%rsp)
je 0xeba1
movq %rbx, %rdi
callq 0xe1b0
decl 0x4(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0xeb80
jmp 0xeba6
xorl %r14d, %r14d
jmp 0xeba6
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0xec5f
movl (%r14), %eax
movl %eax, 0x148e0(%rip)     # 0x23498
leaq 0x35ee(%rip), %rdi      # 0x121ad
callq 0xe030
movq %rax, 0x148d5(%rip)     # 0x234a0
testq %rax, %rax
jne 0xebec
leaq 0x35dc(%rip), %rdi      # 0x121b3
callq 0xe030
movq %rax, 0x148bd(%rip)     # 0x234a0
testq %rax, %rax
je 0xec6d
movq 0x14885(%rip), %rdi     # 0x23478
callq 0xe110
movq %rax, 0x14889(%rip)     # 0x23488
xorl %eax, %eax
movq %rax, 0x148a0(%rip)     # 0x234a8
movq %rax, 0x148a1(%rip)     # 0x234b0
movb $0x0, 0x148aa(%rip)     # 0x234c0
callq 0xe0c0
leaq 0x14b9e(%rip), %rbx     # 0x237c0
leaq 0x3473(%rip), %rdx      # 0x1209c
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe170
leaq 0x35a7(%rip), %rdi      # 0x121e8
movq %rbx, %rsi
movl $0x1, %edx
callq 0xe0b0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3524(%rip), %rdi      # 0x12181
jmp 0xec66
leaq 0x3530(%rip), %rdi      # 0x12196
xorl %eax, %eax
callq 0xf2b0
leaq 0x3545(%rip), %rdi      # 0x121b9
leaq 0x3538(%rip), %rsi      # 0x121b3
xorl %eax, %eax
callq 0xf2b0
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: key_button_event
void key_button_event(xcb_generic_event_t *evt, uint8_t event_type)
{
	xcb_keysym_t keysym = XCB_NO_SYMBOL;
	xcb_button_t button = XCB_NONE;
	bool replay_event = false;
	uint16_t modfield = 0;
	uint16_t lockfield = num_lock | caps_lock | scroll_lock;
	parse_event(evt, event_type, &keysym, &button, &modfield);
	modfield &= ~lockfield & MOD_STATE_FIELD;
	if (keysym != XCB_NO_SYMBOL || button != XCB_NONE) {
		hotkey_t *hk = find_hotkey(keysym, button, modfield, event_type, &replay_event);
		if (hk != NULL) {
			run(hk->command, hk->sync);
			put_status(COMMAND_PREFIX, hk->command);
		}
	}
	switch (event_type) {
		case XCB_BUTTON_PRESS:
		case XCB_BUTTON_RELEASE:
			if (replay_event)
				xcb_allow_events(dpy, XCB_ALLOW_REPLAY_POINTER, XCB_CURRENT_TIME);
			else
				xcb_allow_events(dpy, XCB_ALLOW_SYNC_POINTER, XCB_CURRENT_TIME);
			break;
		case XCB_KEY_PRESS:
		case XCB_KEY_RELEASE:
			if (replay_event)
				xcb_allow_events(dpy, XCB_ALLOW_REPLAY_KEYBOARD, XCB_CURRENT_TIME);
			else
				xcb_allow_events(dpy, XCB_ALLOW_SYNC_KEYBOARD, XCB_CURRENT_TIME);
			break;
	}
	xcb_flush(dpy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0xc(%rsp), %r14
movl $0x0, (%r14)
xorl %eax, %eax
leaq 0x9(%rsp), %r15
movb %al, (%r15)
movb %al, 0x8(%rsp)
leaq 0xa(%rsp), %r12
movw $0x0, (%r12)
movzbl 0x147d3(%rip), %eax     # 0x23490
movzbl 0x147ce(%rip), %ecx     # 0x23492
orl %eax, %ecx
movzbl 0x147c7(%rip), %ebp     # 0x23494
orl %ecx, %ebp
notl %ebp
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0xf93b
movzbl (%r12), %eax
andl %ebp, %eax
movw %ax, (%r12)
movl (%r14), %edi
testl %edi, %edi
setne %dl
movb (%r15), %cl
testb %cl, %cl
setne %sil
orb %dl, %sil
movzbl %bl, %ebx
cmpb $0x1, %sil
jne 0xed42
movzbl %cl, %esi
movzwl %ax, %edx
leaq 0x8(%rsp), %r8
movl %ebx, %ecx
callq 0x108c0
testq %rax, %rax
je 0xed42
movq %rax, %r14
addq $0x8, %r14
movzbl 0x208(%rax), %esi
movq %r14, %rdi
callq 0xf34a
movl $0x43, %edi
movq %r14, %rsi
callq 0xee73
leal -0x2(%rbx), %eax
cmpl $0x2, %eax
jb 0xed67
addl $-0x4, %ebx
cmpl $0x1, %ebx
ja 0xed8f
movq 0x1471f(%rip), %rdi     # 0x23478
cmpb $0x1, 0x8(%rsp)
jne 0xed7c
movl $0x2, %esi
jmp 0xed88
movq 0x1470a(%rip), %rdi     # 0x23478
cmpb $0x1, 0x8(%rsp)
jne 0xed83
movl $0x5, %esi
jmp 0xed88
movl $0x1, %esi
jmp 0xed88
movl $0x4, %esi
xorl %edx, %edx
callq 0xe120
movq 0x146e2(%rip), %rdi     # 0x23478
callq 0xe140
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: mapping_notify
void mapping_notify(xcb_generic_event_t *evt)
{
	if (!mapping_count)
		return;
	xcb_mapping_notify_event_t *e = (xcb_mapping_notify_event_t *) evt;
	PRINTF("mapping notify %u %u\n", e->request, e->count);
	if (e->request == XCB_MAPPING_POINTER)
		return;
	if (xcb_refresh_keyboard_mapping(symbols, e) == 1) {
		destroy_chord(abort_chord);
		get_lock_fields();
		reload_cmd();
		abort_chord = make_chord(abort_keysym, XCB_NONE, 0, XCB_KEY_PRESS, false, false);
		if (mapping_count > 0)
			mapping_count--;
	}
}

// Assembly:
cmpl $0x0, 0x145a1(%rip)     # 0x23350
je 0xee19
movq %rdi, %rsi
cmpb $0x2, 0x4(%rdi)
je 0xee19
pushq %rax
movq 0x146c6(%rip), %rdi     # 0x23488
callq 0xe050
cmpl $0x1, %eax
jne 0xee15
movq 0x1469d(%rip), %rdi     # 0x23470
callq 0x11179
callq 0x10788
callq 0xee1a
movl 0x14578(%rip), %edi     # 0x23360
xorl %esi, %esi
xorl %edx, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x10e11
movq %rax, 0x1466d(%rip)     # 0x23470
movl 0x14547(%rip), %eax     # 0x23350
testl %eax, %eax
jle 0xee15
decl %eax
movl %eax, 0x1453b(%rip)     # 0x23350
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: reload_cmd
void reload_cmd(void)
{
	PUTS("reload");
	cleanup();
	load_config(config_file);
	for (int i = 0; i < num_extra_confs; i++)
		load_config(extra_confs[i]);
	ungrab();
	grab();
}

// Assembly:
pushq %rbx
callq 0xeea4
leaq 0x14549(%rip), %rdi     # 0x23370
callq 0xf4bc
cmpl $0x0, 0x14531(%rip)     # 0x23364
jle 0xee56
xorl %ebx, %ebx
movq 0x1452a(%rip), %rax     # 0x23368
movq (%rax,%rbx,8), %rdi
callq 0xf4bc
incq %rbx
movslq 0x14513(%rip), %rax     # 0x23364
cmpq %rax, %rbx
jl 0xee37
callq 0xf25d
popq %rbx
jmp 0xeef8
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/sxhkd.c
// Function: cleanup
void cleanup(void)
{
	PUTS("cleanup");
	hotkey_t *hk = hotkeys_head;
	while (hk != NULL) {
		hotkey_t *next = hk->next;
		destroy_chain(hk->chain);
		free(hk->cycle);
		free(hk);
		hk = next;
	}
	hotkeys_head = hotkeys_tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x14601(%rip), %rbx     # 0x234b0
testq %rbx, %rbx
je 0xeedf
movq 0x218(%rbx), %r14
movq (%rbx), %rdi
callq 0x11147
movq 0x210(%rbx), %rdi
callq 0xe040
movq %rbx, %rdi
callq 0xe040
movq %r14, %rbx
testq %r14, %r14
jne 0xeeb4
xorl %eax, %eax
movq %rax, 0x145c0(%rip)     # 0x234a8
movq %rax, 0x145c1(%rip)     # 0x234b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/grab.c
// Function: grab
void grab(void)
{
	PUTS("grab");
	for (hotkey_t *hk = hotkeys_head; hk != NULL; hk = hk->next)
		grab_chord(hk->chain->head);
	xcb_flush(dpy);
	grabbed = true;
}

// Assembly:
pushq %rbx
leaq 0x145b0(%rip), %rax     # 0x234b0
movq (%rax), %rbx
testq %rbx, %rbx
je 0xef1c
movq (%rbx), %rax
movq (%rax), %rdi
callq 0xef37
movq 0x218(%rbx), %rbx
jmp 0xef03
leaq 0x14555(%rip), %rax     # 0x23478
movq (%rax), %rdi
callq 0xe140
leaq 0x14426(%rip), %rax     # 0x23358
movb $0x1, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/grab.c
// Function: grab_chord
void grab_chord(chord_t *chord)
{
	for (chord_t *c = chord; c != NULL; c = c->more) {
		if (c->button == XCB_NONE) {
			xcb_keycode_t *keycodes = keycodes_from_keysym(c->keysym);
			if (keycodes != NULL)
				for (xcb_keycode_t *kc = keycodes; *kc != XCB_NO_SYMBOL; kc++)
					if (c->keysym == xcb_key_symbols_get_keysym(symbols, *kc, 0))
						grab_key_button(*kc, c->button, c->modfield);
			free(keycodes);
		} else {
			grab_key_button(XCB_NONE, c->button, c->modfield);
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0xefea
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x14536(%rip), %r15     # 0x23488
movb 0x104(%rbx), %al
testb %al, %al
je 0xef6f
movzwl 0x106(%rbx), %edx
movzbl %al, %esi
xorl %edi, %edi
callq 0xefeb
jmp 0xefd2
movl 0x100(%rbx), %edi
callq 0x107c1
movq %rax, %r14
testq %rax, %rax
je 0xefca
movb (%r14), %al
testb %al, %al
je 0xefca
movq %r14, %r12
incq %r12
movl 0x100(%rbx), %ebp
movq (%r15), %rdi
movzbl %al, %esi
xorl %edx, %edx
callq 0xe250
cmpl %eax, %ebp
jne 0xefbf
movzbl -0x1(%r12), %edi
movzbl 0x104(%rbx), %esi
movzwl 0x106(%rbx), %edx
callq 0xefeb
movb (%r12), %al
incq %r12
testb %al, %al
jne 0xef8f
movq %r14, %rdi
callq 0xe040
movq 0x118(%rbx), %rbx
testq %rbx, %rbx
jne 0xef52
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/grab.c
// Function: grab_key_button
void grab_key_button(xcb_keycode_t keycode, xcb_button_t button, uint16_t modfield)
{
	grab_key_button_checked(keycode, button, modfield);
	if (modfield == XCB_MOD_MASK_ANY)
		return;
	if (num_lock != 0)
		grab_key_button_checked(keycode, button, modfield | num_lock);
	if (caps_lock != 0)
		grab_key_button_checked(keycode, button, modfield | caps_lock);
	if (scroll_lock != 0)
		grab_key_button_checked(keycode, button, modfield | scroll_lock);
	if (num_lock != 0 && caps_lock != 0)
		grab_key_button_checked(keycode, button, modfield | num_lock | caps_lock);
	if (caps_lock != 0 && scroll_lock != 0)
		grab_key_button_checked(keycode, button, modfield | caps_lock | scroll_lock);
	if (num_lock != 0 && scroll_lock != 0)
		grab_key_button_checked(keycode, button, modfield | num_lock | scroll_lock);
	if (num_lock != 0 && caps_lock != 0 && scroll_lock != 0)
		grab_key_button_checked(keycode, button, modfield | num_lock | caps_lock | scroll_lock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %ebp
callq 0xf164
cmpl $0x8000, %ebx           # imm = 0x8000
je 0xf155
leaq 0x1447b(%rip), %r15     # 0x23490
movzwl (%r15), %eax
movzbl %bpl, %ebp
movzbl %r14b, %r14d
testw %ax, %ax
je 0xf035
orl %ebx, %eax
movzwl %ax, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
leaq 0x14456(%rip), %r12     # 0x23492
movzwl (%r12), %eax
testw %ax, %ax
je 0xf055
orl %ebx, %eax
movzwl %ax, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
leaq 0x14438(%rip), %r13     # 0x23494
movzwl (%r13), %eax
testw %ax, %ax
je 0xf075
orl %ebx, %eax
movzwl %ax, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
movzwl (%r15), %eax
testw %ax, %ax
setne %dl
movzwl (%r12), %ecx
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xf0a5
orl %ebx, %eax
orl %eax, %ecx
movzwl %cx, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
movzwl (%r12), %eax
testw %ax, %ax
setne %dl
movzwl (%r13), %ecx
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xf0d6
orl %ebx, %eax
orl %eax, %ecx
movzwl %cx, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
movzwl (%r15), %eax
testw %ax, %ax
setne %dl
movzwl (%r13), %ecx
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xf106
orl %ebx, %eax
orl %eax, %ecx
movzwl %cx, %edx
movl %ebp, %edi
movl %r14d, %esi
callq 0xf164
movzwl (%r15), %eax
testw %ax, %ax
setne %dl
movzwl (%r12), %ecx
testw %cx, %cx
setne %sil
andb %dl, %sil
movzwl (%r13), %edx
testw %dx, %dx
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0xf155
orl %ebx, %eax
orl %ecx, %edx
orl %eax, %edx
movzwl %dx, %edx
movl %ebp, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf164
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/grab.c
// Function: grab_key_button_checked
void grab_key_button_checked(xcb_keycode_t keycode, xcb_button_t button, uint16_t modfield)
{
	xcb_generic_error_t *err;
	if (button == XCB_NONE)
		err = xcb_request_check(dpy, xcb_grab_key_checked(dpy, true, root, modfield, keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_SYNC));
	else
		err = xcb_request_check(dpy, xcb_grab_button_checked(dpy, true, root, XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, XCB_NONE, XCB_NONE, button, modfield));
	unsigned int value = (button == XCB_NONE ? keycode : button);
	char *type = (button == XCB_NONE ? "key" : "button");
	if (err != NULL) {
		warn("Could not grab %s %u with modfield %u: ", type, value, modfield);
		if (err->error_code == XCB_ACCESS)
			warn("the combination is already grabbed.\n");
		else
			warn("error %u encountered.\n", err->error_code);
		free(err);
	} else {
		PRINTF("grab %s %u %u\n", type, value, modfield);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %eax
leaq 0x14304(%rip), %rcx     # 0x23478
movq (%rcx), %r14
leaq 0x1431a(%rip), %rcx     # 0x23498
movl (%rcx), %edx
movzbl %sil, %r15d
movzwl %ax, %ebx
movzbl %dil, %ebp
testl %esi, %esi
je 0xf1b7
xorl %eax, %eax
movq %r14, %rdi
movl $0x1, %esi
movl $0xc, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rbx
pushq %r15
pushq %rax
pushq %rax
callq 0xe3b0
addq $0x20, %rsp
jmp 0xf1d9
subq $0x8, %rsp
movq %r14, %rdi
movl $0x1, %esi
movl %ebx, %ecx
movl %ebp, %r8d
movl $0x1, %r9d
pushq $0x0
callq 0xe0a0
addq $0x10, %rsp
movq %r14, %rdi
movl %eax, %esi
callq 0xe2a0
testq %rax, %rax
je 0xf232
movq %rax, %r14
testb %r15b, %r15b
leaq 0x314d(%rip), %rax      # 0x12342
leaq 0x306d(%rip), %rsi      # 0x12269
cmoveq %rax, %rsi
cmovnel %r15d, %ebp
movzbl %bpl, %edx
leaq 0x3061(%rip), %rdi      # 0x12270
movl %ebx, %ecx
xorl %eax, %eax
callq 0xe410
movzbl 0x1(%r14), %esi
cmpl $0xa, %esi
jne 0xf23d
leaq 0x306f(%rip), %rdi      # 0x12298
xorl %eax, %eax
callq 0xe410
jmp 0xf24b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3079(%rip), %rdi      # 0x122bd
xorl %eax, %eax
callq 0xe410
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe040
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/grab.c
// Function: ungrab
void ungrab(void)
{
	PUTS("ungrab");
	xcb_ungrab_key(dpy, XCB_GRAB_ANY, root, XCB_BUTTON_MASK_ANY);
	xcb_ungrab_button(dpy, XCB_BUTTON_INDEX_ANY, root, XCB_MOD_MASK_ANY);
	xcb_flush(dpy);
	grabbed = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x14210(%rip), %rbx     # 0x23478
movq (%rbx), %rdi
leaq 0x14226(%rip), %r14     # 0x23498
movl (%r14), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0xe390
movq (%rbx), %rdi
movl (%r14), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0xe2f0
movq (%rbx), %rdi
callq 0xe140
leaq 0x140b6(%rip), %rax     # 0x23358
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/helpers.c
// Function: spawn
void spawn(char *cmd[], bool sync)
{
	if (fork() == 0) {
		if (dpy != NULL)
			close(xcb_get_file_descriptor(dpy));
		if (sync) {
			execute(cmd);
		} else {
			if (fork() == 0) {
				execute(cmd);
			}
			exit(EXIT_SUCCESS);
		}
	}
	wait(NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xe3e0
testl %eax, %eax
je 0xf3a0
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe3c0
leaq 0x140d1(%rip), %rax     # 0x23478
movq (%rax), %rdi
testq %rdi, %rdi
je 0xf3bb
callq 0xe060
movl %eax, %edi
callq 0xe1d0
testb %bpl, %bpl
jne 0xf3c9
callq 0xe3e0
testl %eax, %eax
jne 0xf3d1
movq %rbx, %rdi
callq 0xf3d8
xorl %edi, %edi
callq 0xe3a0
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/helpers.c
// Function: execute
void execute(char *cmd[])
{
	setsid();
	if (redir_fd != -1) {
		dup2(redir_fd, STDOUT_FILENO);
		dup2(redir_fd, STDERR_FILENO);
	}
	execvp(cmd[0], cmd);
	err("Spawning failed.\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe1e0
leaq 0x13f71(%rip), %r14     # 0x2335c
movl (%r14), %edi
cmpl $-0x1, %edi
je 0xf40a
movl $0x1, %esi
callq 0xe150
movl (%r14), %edi
movl $0x2, %esi
callq 0xe150
movq (%rbx), %rdi
movq %rbx, %rsi
callq 0xe360
leaq 0x2ebb(%rip), %rdi      # 0x122d7
xorl %eax, %eax
callq 0xf2b0
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/helpers.c
// Function: lgraph
char *lgraph(char *s)
{
	size_t len = strlen(s);
	unsigned int i = 0;
	while (i < len && !isgraph(s[i]))
		i++;
	if (i < len)
		return (s + i);
	else
		return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe130
testq %rax, %rax
je 0xf45f
movq %rax, %r14
callq 0xe3f0
movq (%rax), %rcx
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movsbq (%rbx,%rsi), %rdi
cmpw $0x0, (%rcx,%rdi,2)
js 0xf463
movl %edx, %esi
incl %edx
cmpq %rsi, %r14
ja 0xf448
jmp 0xf469
xorl %eax, %eax
jmp 0xf469
addq %rsi, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: load_config
void load_config(const char *config_file)
{
	PRINTF("load configuration '%s'\n", config_file);
	FILE *cfg = fopen(config_file, "r");
	if (cfg == NULL)
		err("Can't open configuration file: '%s'.\n", config_file);

	char buf[3 * MAXLEN];
	char chain[MAXLEN] = {0};
	char command[2 * MAXLEN] = {0};
	int offset = 0;
	char first;

	while (fgets(buf, sizeof(buf), cfg) != NULL) {
		first = buf[0];
		if (strlen(buf) < 2 || first == START_COMMENT) {
			continue;
		} else {
			char *start = lgraph(buf);
			if (start == NULL)
				continue;
			char *end = rgraph(buf);
			*(end + 1) = '\0';

			if (isgraph(first))
				snprintf(chain + offset, sizeof(chain) - offset, "%s", start);
			else
				snprintf(command + offset, sizeof(command) - offset, "%s", start);

			if (*end == PARTIAL_LINE) {
				offset += end - start;
				continue;
			} else {
				offset = 0;
			}

			if (isspace(first) && strlen(chain) > 0 && strlen(command) > 0) {
				process_hotkey(chain, command);
				chain[0] = '\0';
				command[0] = '\0';
			}
		}
	}

	fclose(cfg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x628, %rsp            # imm = 0x628
movq %rdi, %r14
leaq 0x49ad(%rip), %rsi      # 0x13e84
callq 0xe330
testq %rax, %rax
je 0xf64f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0xe190
leaq 0x120(%rsp), %r15
movl $0x200, %edx            # imm = 0x200
movq %r15, %rdi
xorl %esi, %esi
callq 0xe190
leaq 0x320(%rsp), %r12
xorl %r13d, %r13d
movq %r12, %rdi
movl $0x300, %esi            # imm = 0x300
movq %rbx, %rdx
callq 0xe1f0
testq %rax, %rax
je 0xf635
movb 0x320(%rsp), %r14b
movq %r12, %rdi
callq 0xe130
cmpq $0x2, %rax
setb %al
cmpb $0x23, %r14b
sete %cl
orb %al, %cl
jne 0xf51b
movq %r12, %rdi
callq 0xf423
testq %rax, %rax
je 0xf51b
movq %rax, %rbp
movsbq %r14b, %r14
movq %r12, %rdi
callq 0xf471
movq %rax, 0x18(%rsp)
movb $0x0, 0x1(%rax)
callq 0xe3f0
movq %rax, 0x8(%rsp)
movq (%rax), %rax
xorl %esi, %esi
movq %r14, 0x10(%rsp)
cmpw $0x0, (%rax,%r14,2)
setns %sil
movslq %r13d, %rax
leaq 0x20(%rsp), %rdi
cmovnsq %r15, %rdi
shll $0x8, %esi
addq %rax, %rdi
subq %rax, %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x2b6b(%rip), %rdx      # 0x12127
movq %rbp, %rcx
xorl %eax, %eax
callq 0xe170
movq 0x18(%rsp), %r14
cmpb $0x5c, (%r14)
jne 0xf5dc
subl %ebp, %r14d
addl %r14d, %r13d
jmp 0xf51b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
movl $0x0, %r13d
je 0xf51b
cmpb $0x0, 0x20(%rsp)
je 0xf51b
cmpb $0x0, 0x120(%rsp)
je 0xf51b
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0xf660
xorl %r13d, %r13d
movb %r13b, 0x20(%rsp)
movb %r13b, 0x120(%rsp)
jmp 0xf51b
movq %rbx, %rdi
callq 0xe0f0
addq $0x628, %rsp            # imm = 0x628
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c95(%rip), %rdi      # 0x182eb
movq %r14, %rsi
xorl %eax, %eax
callq 0xf2b0
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: parse_event
void parse_event(xcb_generic_event_t *evt, uint8_t event_type, xcb_keysym_t *keysym, xcb_button_t *button, uint16_t *modfield)
{
	if (event_type == XCB_KEY_PRESS) {
		xcb_key_press_event_t *e = (xcb_key_press_event_t *) evt;
		xcb_keycode_t keycode = e->detail;
		*modfield = e->state;
		*keysym = xcb_key_symbols_get_keysym(symbols, keycode, 0);
		PRINTF("key press %u %u\n", keycode, *modfield);
	} else if (event_type == XCB_KEY_RELEASE) {
		xcb_key_release_event_t *e = (xcb_key_release_event_t *) evt;
		xcb_keycode_t keycode = e->detail;
		*modfield = e->state & ~modfield_from_keycode(keycode);
		*keysym = xcb_key_symbols_get_keysym(symbols, keycode, 0);
		PRINTF("key release %u %u\n", keycode, *modfield);
	} else if (event_type == XCB_BUTTON_PRESS) {
		xcb_button_press_event_t *e = (xcb_button_press_event_t *) evt;
		*button = e->detail;
		*modfield = e->state;
		PRINTF("button press %u %u\n", *button, *modfield);
	} else if (event_type == XCB_BUTTON_RELEASE) {
		xcb_button_release_event_t *e = (xcb_button_release_event_t *) evt;
		*button = e->detail;
		*modfield = e->state;
		PRINTF("button release %u %u\n", *button, *modfield);
	}
}

// Assembly:
addl $-0x2, %esi
cmpl $0x3, %esi
ja 0xf9c0
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %rbx
leaq 0x2995(%rip), %rax      # 0x122ec
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movb 0x1(%rdi), %al
movb %al, (%rcx)
movzwl 0x1c(%rdi), %eax
movw %ax, (%r14)
jmp 0xf9b6
movzbl 0x1(%rdi), %esi
movzwl 0x1c(%rdi), %eax
movw %ax, (%r14)
leaq 0x13b06(%rip), %rax     # 0x23488
movq (%rax), %rdi
jmp 0xf9ad
movzbl 0x1(%rdi), %ebp
movzwl 0x1c(%rdi), %r15d
movl %ebp, %edi
callq 0xf9c1
notl %eax
andw %r15w, %ax
movw %ax, (%r14)
leaq 0x13ae0(%rip), %rax     # 0x23488
movq (%rax), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xe250
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: modfield_from_keycode
int16_t modfield_from_keycode(xcb_keycode_t keycode)
{
	uint16_t modfield = 0;
	xcb_keycode_t *mod_keycodes = NULL;
	xcb_get_modifier_mapping_reply_t *reply = NULL;
	if ((reply = xcb_get_modifier_mapping_reply(dpy, xcb_get_modifier_mapping(dpy), NULL)) != NULL && reply->keycodes_per_modifier > 0) {
		if ((mod_keycodes = xcb_get_modifier_mapping_keycodes(reply)) != NULL) {
			unsigned int num_mod = xcb_get_modifier_mapping_keycodes_length(reply) / reply->keycodes_per_modifier;
			for (unsigned int i = 0; i < num_mod; i++) {
				for (unsigned int j = 0; j < reply->keycodes_per_modifier; j++) {
					xcb_keycode_t mkc = mod_keycodes[i * reply->keycodes_per_modifier + j];
					if (mkc == XCB_NO_SYMBOL)
						continue;
					if (keycode == mkc)
						modfield |= (1 << i);
				}
			}

		}
	}
	free(reply);
	return modfield;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x13aa3(%rip), %rax     # 0x23478
movq (%rax), %rbx
movq %rbx, %rdi
callq 0xe0d0
xorl %r14d, %r14d
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0xe3d0
movq %rax, %rbx
testq %rax, %rax
je 0xfa72
cmpb $0x0, 0x1(%rbx)
je 0xfa6f
movq %rbx, %rdi
callq 0xe080
testq %rax, %rax
je 0xfa6f
movq %rax, %r15
movq %rbx, %rdi
callq 0xe0e0
movzbl 0x1(%rbx), %esi
cltd
idivl %esi
xorl %edx, %edx
testl %eax, %eax
je 0xfa6f
cmpl $0x1, %esi
movl %esi, %edi
adcl $0x0, %edi
xorl %r14d, %r14d
xorl %ecx, %ecx
movl $0x1, %r8d
shll %cl, %r8d
movq %rdi, %r9
movl %edx, %r10d
movl %r10d, %r11d
movb (%r15,%r11), %r13b
xorl %r11d, %r11d
movl %r8d, %r12d
cmpb %bpl, %r13b
je 0xfa53
xorl %r12d, %r12d
testb %r13b, %r13b
cmovel %r11d, %r12d
orl %r12d, %r14d
incl %r10d
decq %r9
jne 0xfa3e
incl %ecx
addl %esi, %edx
cmpl %eax, %ecx
jne 0xfa2f
jmp 0xfa72
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0xe040
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: extract_chunks
chunk_t *extract_chunks(char *s)
{
	size_t len = strlen(s);
	unsigned int i = 0, j = 0;
	bool inhibit = false;
	int num_seq = 0;
	chunk_t *c = make_chunk();
	chunk_t *head = c;
	while (i < len) {
		if (inhibit) {
			c->text[j++] = s[i];
			inhibit = false;
		} else if (s[i] == MAGIC_INHIBIT) {
			inhibit = true;
			if ((s[i+1] != MAGIC_INHIBIT || c->sequence)
					&& s[i+1] != SEQ_BEGIN
					&& s[i+1] != SEQ_END)
				c->text[j++] = s[i];
		} else if (s[i] == SEQ_BEGIN) {
			if (j > 0) {
				c->text[j] = '\0';
				j = 0;
				chunk_t *next = make_chunk();
				c->next = next;
				c = next;
			}
			c->sequence = true;
		} else if (s[i] == SEQ_END) {
			if (c->sequence)
				num_seq++;
			if (j > 0) {
				c->text[j] = '\0';
				j = 0;
				chunk_t *next = make_chunk();
				c->next = next;
				c = next;
			}
			c->sequence = false;
		} else {
			c->text[j++] = s[i];
		}
		i++;
	}
	c->text[j] = '\0';
	return head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe130
movq %rax, %r15
movl $0x1, %edi
movl $0x418, %esi            # imm = 0x418
callq 0xe200
movb $0x0, 0x408(%rax)
xorl %esi, %esi
movq %rsi, 0x400(%rax)
movq %rsi, 0x410(%rax)
movw $0x1, 0x409(%rax)
movq %rax, %r13
testq %r15, %r15
je 0xfc1f
movl $0x1, %ebp
xorl %r14d, %r14d
movq %rax, %r13
xorl %eax, %eax
xorl %r12d, %r12d
movq %r13, (%rsp)
movb (%rbx,%r14), %cl
movl %ebp, %r14d
testb $0x1, %r12b
je 0xfb0f
movl %eax, %edx
incl %eax
movb %cl, (%r13,%rdx)
xorl %r12d, %r12d
jmp 0xfc0e
movzbl %cl, %edx
cmpl $0x7d, %edx
je 0xfbc0
cmpl $0x7b, %edx
je 0xfb72
cmpl $0x5c, %edx
jne 0xfb64
movzbl (%rbx,%r14), %edx
movb $0x1, %r12b
cmpl $0x7d, %edx
je 0xfc0e
cmpl $0x7b, %edx
je 0xfc0e
cmpl $0x5c, %edx
jne 0xfb64
cmpb $0x1, 0x408(%r13)
jne 0xfc0e
cmpl $0x7b, %edx
je 0xfc0e
cmpl $0x7d, %edx
je 0xfc0e
movl %eax, %edx
incl %eax
movb %cl, (%r13,%rdx)
jmp 0xfc0e
testl %eax, %eax
je 0xfbb6
movl %eax, %eax
movb %sil, (%r13,%rax)
movl $0x1, %edi
movl $0x418, %esi            # imm = 0x418
callq 0xe200
xorl %esi, %esi
movb %sil, 0x408(%rax)
movq %rsi, 0x400(%rax)
movq %rsi, 0x410(%rax)
movw $0x1, 0x409(%rax)
movq %rax, 0x410(%r13)
movq %rax, %r13
movb $0x1, 0x408(%r13)
jmp 0xfc0c
testl %eax, %eax
je 0xfc04
movl %eax, %eax
movb %sil, (%r13,%rax)
movl $0x1, %edi
movl $0x418, %esi            # imm = 0x418
callq 0xe200
xorl %esi, %esi
movb %sil, 0x408(%rax)
movq %rsi, 0x400(%rax)
movq %rsi, 0x410(%rax)
movw $0x1, 0x409(%rax)
movq %rax, 0x410(%r13)
movq %rax, %r13
movb $0x0, 0x408(%r13)
xorl %eax, %eax
incl %ebp
cmpq %r14, %r15
ja 0xfaf1
movl %eax, %esi
movq (%rsp), %rax
movb $0x0, (%r13,%rsi)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: destroy_chunks
void destroy_chunks(chunk_t *chunk)
{
	chunk_t *c = chunk;
	while (c != NULL) {
		chunk_t *next = c->next;
		free(c);
		c = next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0xfc4f
pushq %rbx
movq 0x410(%rdi), %rbx
callq 0xe040
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xfc3a
popq %rbx
retq