LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/zic.c
// Function: leapadd
static void
leapadd(t, positive, rolling, count)
const zic_t	t;
const int	positive;
const int	rolling;
int		count;
{
	register int	i, j;

	if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
		error(_("too many leap seconds"));
		exit(EXIT_FAILURE);
	}
	for (i = 0; i < leapcnt; ++i)
		if (t <= trans[i]) {
			if (t == trans[i]) {
				error(_("repeated leap second moment"));
				exit(EXIT_FAILURE);
			}
			break;
		}
	do {
		for (j = leapcnt; j > i; --j) {
			trans[j] = trans[j - 1];
			corr[j] = corr[j - 1];
			roll[j] = roll[j - 1];
		}
		trans[i] = t;
		corr[i] = positive ? 1L : eitol(-count);
		roll[i] = rolling;
		++leapcnt;
	} while (positive && --count != 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x7a0b(%rip), %r9d      # 0xe3bc
testl %esi, %esi
movl $0x1, %eax
cmovnel %ecx, %eax
addl %r9d, %eax
cmpl $0x32, %eax
jg 0x6a8b
leaq 0x79f2(%rip), %rax      # 0xe3c0
xorl %r8d, %r8d
testl %r9d, %r9d
jle 0x69f5
movq %rax, %r10
cmpq %rdi, (%r10)
jge 0x69ef
incq %r8
addq $0x8, %r10
cmpq %r8, %r9
jne 0x69d9
movl %r9d, %r8d
jmp 0x69f5
je 0x6a90
movl %r8d, %r10d
movslq %r9d, %r9
movslq %r8d, %r14
cmpl $0x1, %ecx
sete %bpl
leaq 0x7b44(%rip), %r11      # 0xe550
leaq 0x7ccd(%rip), %rbx      # 0xe6e0
cmpl %r9d, %r8d
jge 0x6a42
movq %r9, %r15
movq -0x8(%rax,%r15,8), %r12
movq %r12, (%rax,%r15,8)
movq -0x8(%r11,%r15,8), %r12
movq %r12, (%r11,%r15,8)
movb -0x1(%r15,%rbx), %r12b
movb %r12b, (%r15,%rbx)
leaq -0x1(%r15), %r12
movq %r12, %r15
cmpq %r14, %r12
jg 0x6a1b
movq %rdi, (%rax,%r10,8)
testl %esi, %esi
je 0x6a6b
movq $0x1, (%r11,%r10,8)
movb %dl, (%r10,%rbx)
incq %r9
movl %r9d, 0x795c(%rip)      # 0xe3bc
testb $0x1, %bpl
movb $0x1, %bpl
je 0x6a13
jmp 0x6a82
negl %ecx
movslq %ecx, %rax
movq %rax, (%r11,%r10,8)
movb %dl, (%r10,%rbx)
leal 0x1(%r9), %eax
movl %eax, 0x793a(%rip)      # 0xe3bc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x275a
callq 0x2745
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/zic.c
// Function: doabbr
static void
doabbr(abbr, format, letters, isdst, doquotes)
char * const		abbr;
const char * const	format;
const char * const	letters;
const int		isdst;
const int		doquotes;
{
	register char *	cp;
	register char *	slashp;
	register int	len;

	slashp = strchr(format, '/');
	if (slashp == NULL) {
		if (letters == NULL)
			(void) strcpy(abbr, format);
		else	(void) sprintf(abbr, format, letters);
	} else if (isdst) {
		(void) strcpy(abbr, slashp + 1);
	} else {
		if (slashp > format)
			(void) strncpy(abbr, format,
				(unsigned) (slashp - format));
		abbr[slashp - format] = '\0';
	}
	if (!doquotes)
		return;
	for (cp = abbr; *cp != '\0'; ++cp)
		if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", *cp) == NULL &&
			strchr("abcdefghijklmnopqrstuvwxyz", *cp) == NULL)
				break;
	len = strlen(abbr);
	if (len > 0 && *cp == '\0')
		return;
	abbr[len + 2] = '\0';
	abbr[len + 1] = '>';
	for ( ; len > 0; --len)
		abbr[len] = abbr[len - 1];
	abbr[0] = '<';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
callq 0x2100
testq %rax, %rax
je 0x6ad4
movq %rax, %r15
testl %r13d, %r13d
je 0x6af2
incq %r15
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x6aeb
movq %rbx, %rdi
movq %r14, %rsi
testq %r12, %r12
je 0x6aeb
movq %r12, %rdx
xorl %eax, %eax
callq 0x2290
jmp 0x6b0a
callq 0x2080
jmp 0x6b0a
subq %r14, %r15
jbe 0x6b05
movl %r15d, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2060
movb $0x0, (%rbx,%r15)
testl %ebp, %ebp
je 0x6bc4
movb (%rbx), %al
testb %al, %al
je 0x6b60
leaq 0x1(%rbx), %r12
leaq 0x4037(%rip), %r14      # 0xab5a
leaq 0x404b(%rip), %r15      # 0xab75
movsbl %al, %ebp
movl $0x1b, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x2160
testq %rax, %rax
jne 0x6b55
movl $0x1b, %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0x2160
testq %rax, %rax
je 0x6b6e
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x6b2a
movq %rbx, %rdi
callq 0x20e0
testl %eax, %eax
jg 0x6bc4
jmp 0x6b76
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rcx
shlq $0x20, %rcx
movabsq $0x200000000, %rdx      # imm = 0x200000000
addq %rcx, %rdx
sarq $0x20, %rdx
movb $0x0, (%rbx,%rdx)
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rcx, %rdx
sarq $0x20, %rdx
movb $0x3e, (%rbx,%rdx)
testl %eax, %eax
jle 0x6bc1
movl %eax, %eax
incq %rax
movb -0x2(%rbx,%rax), %cl
movb %cl, -0x1(%rbx,%rax)
decq %rax
cmpq $0x1, %rax
ja 0x6bb0
movb $0x3c, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/zic.c
// Function: addtt
static void
addtt(starttime, type)
const zic_t	starttime;
int		type;
{
	if (starttime <= min_time ||
		(timecnt == 1 && attypes[0].at < min_time)) {
		gmtoffs[0] = gmtoffs[type];
		isdsts[0] = isdsts[type];
		ttisstds[0] = ttisstds[type];
		ttisgmts[0] = ttisgmts[type];
		if (abbrinds[type] != 0)
			(void) strcpy(chars, &chars[abbrinds[type]]);
		abbrinds[0] = 0;
		charcnt = strlen(chars) + 1;
		typecnt = 1;
		timecnt = 0;
		type = 0;
	}
	if (timecnt >= TZ_MAX_TIMES) {
		error(_("too many transitions?!"));
		exit(EXIT_FAILURE);
	}
	attypes[timecnt].at = starttime;
	attypes[timecnt].type = type;
	++timecnt;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x7309(%rip), %ecx      # 0xe248
shlq $0x3f, %rcx
cmpq %rdi, %rcx
jge 0x6f64
movl 0x77c6(%rip), %eax      # 0xe714
cmpl $0x1, %eax
jne 0x6ff3
cmpq %rcx, 0x8412(%rip)      # 0xf370
jge 0x6ff3
movslq %esi, %rax
leaq 0x77c2(%rip), %rcx      # 0xe730
movq (%rcx,%rax,8), %rcx
movq %rcx, 0x77b7(%rip)      # 0xe730
leaq 0x7fb0(%rip), %rcx      # 0xef30
movb (%rax,%rcx), %cl
movb %cl, 0x7fa7(%rip)       # 0xef30
leaq 0x81e0(%rip), %rcx      # 0xf170
movb (%rax,%rcx), %cl
movb %cl, 0x81d7(%rip)       # 0xf170
leaq 0x82d0(%rip), %rcx      # 0xf270
movb (%rax,%rcx), %cl
movb %cl, 0x82c7(%rip)       # 0xf270
leaq 0x80c0(%rip), %rcx      # 0xf070
movzbl (%rax,%rcx), %esi
testq %rsi, %rsi
je 0x6fc8
leaq 0x8070(%rip), %rdi      # 0xf030
addq %rdi, %rsi
callq 0x2080
movb $0x0, 0x80a1(%rip)      # 0xf070
leaq 0x805a(%rip), %rdi      # 0xf030
callq 0x20e0
incl %eax
movl %eax, 0x7739(%rip)      # 0xe71c
movl $0x1, 0x772b(%rip)      # 0xe718
xorl %esi, %esi
xorl %eax, %eax
jmp 0x6ffa
cmpl $0x4b0, %eax            # imm = 0x4B0
jge 0x701d
cltq
movq %rax, %rcx
shlq $0x4, %rcx
leaq 0x8366(%rip), %rdx      # 0xf370
movq %rbx, (%rcx,%rdx)
movb %sil, 0x8(%rcx,%rdx)
incl %eax
movl %eax, 0x76f9(%rip)      # 0xe714
popq %rbx
retq
callq 0x27ed
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/zic.c
// Function: stringoffset
static int
stringoffset(result, offset)
char *	result;
long	offset;
{
	register int	hours;
	register int	minutes;
	register int	seconds;

	result[0] = '\0';
	if (offset < 0) {
		(void) strcpy(result, "-");
		offset = -offset;
	}
	seconds = offset % SECSPERMIN;
	offset /= SECSPERMIN;
	minutes = offset % MINSPERHOUR;
	offset /= MINSPERHOUR;
	hours = offset;
	if (hours >= HOURSPERDAY) {
		result[0] = '\0';
		return -1;
	}
	(void) sprintf(end(result), "%d", hours);
	if (minutes != 0 || seconds != 0) {
		(void) sprintf(end(result), ":%02d", minutes);
		if (seconds != 0)
			(void) sprintf(end(result), ":%02d", seconds);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, (%rdi)
testq %rsi, %rsi
jns 0x7041
movw $0x2d, (%r14)
negq %rbx
movabsq $-0x7777777777777777, %rcx # imm = 0x8888888888888889
movq %rbx, %rax
mulq %rcx
movq %rdx, %r15
shrq $0x5, %r15
movabsq $0x888888888888889, %rcx # imm = 0x888888888888889
movq %r15, %rax
mulq %rcx
movq %rdx, %rcx
movq %rbx, %rax
shrq $0x4, %rax
movabsq $0x91a2b3c4d5e6f81, %rdx # imm = 0x91A2B3C4D5E6F81
mulq %rdx
movq %rdx, %r12
shrq $0x3, %r12
cmpl $0x18, %r12d
jl 0x7097
movb $0x0, (%r14)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x7113
imulq $0x3c, %r15, %rax
subq %rax, %rbx
shrq %rcx
imulq $0x3c, %rcx, %rax
subq %rax, %r15
movq %r14, %rdi
callq 0x20e0
leaq (%rax,%r14), %rdi
leaq 0x3a9c(%rip), %rsi      # 0xab57
xorl %ebp, %ebp
movl %r12d, %edx
xorl %eax, %eax
callq 0x2290
movq %r15, %rax
orq %rbx, %rax
je 0x7113
movq %r14, %rdi
callq 0x20e0
leaq (%rax,%r14), %rdi
leaq 0x3a64(%rip), %rsi      # 0xab46
xorl %ebp, %ebp
movl %r15d, %edx
xorl %eax, %eax
callq 0x2290
testq %rbx, %rbx
je 0x7113
movq %r14, %rdi
callq 0x20e0
addq %rax, %r14
leaq 0x3a41(%rip), %rsi      # 0xab46
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2290
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aegis256/aesni/encrypt.c
// Function: aegis256_tag_generation
void aegis256_tag_generation(unsigned long long msglen, unsigned long long adlen, unsigned char maclen, unsigned char *mac, __m128i *state)
{
       int i;

        __m128i  tmp;
        __m128i  msgtmp;
        unsigned char t[16], tt[16];

        for (i = 0; i < 16; i++) tt[i] = 0;
	((unsigned long long*)tt)[0] = adlen  << 3;
	((unsigned long long*)tt)[1] = msglen << 3;
	msgtmp = _mm_load_si128((__m128i*)tt);

        msgtmp = _mm_xor_si128(msgtmp, state[3]);

        for (i = 0; i < 7; i++) {  
             //state update function
             tmp = state[5];
             state[5] = _mm_aesenc_si128(state[4],state[5]);
             state[4] = _mm_aesenc_si128(state[3],state[4]);
             state[3] = _mm_aesenc_si128(state[2],state[3]);
             state[2] = _mm_aesenc_si128(state[1],state[2]);
             state[1] = _mm_aesenc_si128(state[0],state[1]);
             state[0] = _mm_aesenc_si128(tmp,state[0]);

            //xor "msg" with state[0]
             state[0] = _mm_xor_si128(state[0], msgtmp);
        }

        state[5] = _mm_xor_si128(state[5], state[4]);
        state[5] = _mm_xor_si128(state[5], state[3]);
        state[5] = _mm_xor_si128(state[5], state[2]);
        state[5] = _mm_xor_si128(state[5], state[1]);
        state[5] = _mm_xor_si128(state[5], state[0]);

        _mm_store_si128((__m128i*)t, state[5]);
        //in this program, the mac length is assumed to be multiple of bytes
        memcpy(mac,t,maclen);
}

// Assembly:
vmovq %rdi, %xmm0
vmovq %rsi, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm3 # xmm3 = xmm1[0],xmm0[0]
vmovdqa (%r8), %xmm1
vmovdqa 0x10(%r8), %xmm0
vmovdqa 0x20(%r8), %xmm2
vmovdqa 0x30(%r8), %xmm5
vpsllq $0x3, %xmm3, %xmm6
vmovdqa 0x50(%r8), %xmm7
vmovdqa 0x40(%r8), %xmm3
movl $0x7, %eax
vmovdqa %xmm5, %xmm4
vaesenc %xmm7, %xmm3, %xmm8
vaesenc %xmm3, %xmm4, %xmm3
vaesenc %xmm4, %xmm2, %xmm4
vaesenc %xmm2, %xmm0, %xmm2
vaesenc %xmm0, %xmm1, %xmm0
vaesenc %xmm1, %xmm7, %xmm1
vpternlogq $0x96, %xmm5, %xmm6, %xmm1
vmovdqa %xmm8, %xmm7
decl %eax
jne 0x1248
subq $0x18, %rsp
vmovdqa %xmm3, 0x40(%r8)
vmovdqa %xmm4, 0x30(%r8)
vmovdqa %xmm2, 0x20(%r8)
vmovdqa %xmm0, 0x10(%r8)
vmovdqa %xmm1, (%r8)
vpxor %xmm3, %xmm8, %xmm3
vpternlogq $0x96, %xmm3, %xmm4, %xmm2
vpternlogq $0x96, %xmm2, %xmm1, %xmm0
vmovdqa %xmm0, 0x50(%r8)
movq %rsp, %rsi
vmovdqa %xmm0, (%rsi)
movzbl %dl, %edx
movq %rcx, %rdi
callq 0x1070
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/timocramer[P]thinklight-fun/tl-morsestrobo.c
// Function: main
int main(int argc, char **argv) {
	if(tl_init()) {
		fputs("Light Interface cannot be opened!\n", stderr);
		return 1;
	}
	if(tl_status() == TL_ON)
		initial_status = TL_ON;
	
	if(lock()) {
		if(errno != EEXIST)
			perror("open " LOCKFILE);
		else
			fputs("Thinklight is in use!\n", stderr);
		return 1;
	}
	
	install_signal_handler();
	
#ifdef MORSE
	if(argc < 2) {
		fputs(argv[0], stderr);
		fputs(": No arguments!\n", stderr);
		goto finish;
	}
	
	/* morse the arguments */
	int i = 1;
	while(1) {
		morse_string(argv[i]);
		
		++i;
		
		if(i >= argc) /* is it the last argument? */
			break;
		morse_char(' ');
	}
	
	/* save the initial status */
	if(initial_status == TL_ON)
		tl_on();
	else
		tl_off();
	
	finish:
	tl_deinit();
	unlock();
#elif defined STROBO
	/* use argc and argv so the compiler doesn't complain */
	(void) argc;
	(void) argv;
	
	while(1) {
		tl_toggle();
		usleep(DELAY);
	}
	/* deinit and unlock happens in the signal handler */
#endif
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movl %edi, %r14d
callq 0x14b8
testl %eax, %eax
jne 0x13a8
callq 0x1554
cmpl $0x1, %eax
jne 0x129e
movb $0x1, 0x2dfa(%rip)      # 0x4098
leaq 0xea8(%rip), %rdi       # 0x214d
movl $0xc1, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x10c0
testl %eax, %eax
js 0x13af
movl %eax, %edi
callq 0x1090
leaq 0x1c3(%rip), %rax       # 0x148f
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x0, 0x80(%rdi)
callq 0x10b0
movq %rsp, %rsi
movl $0x2, %edi
xorl %edx, %edx
callq 0x1050
cmpl $-0x1, %eax
je 0x139e
movq %rsp, %rsi
movl $0xf, %edi
xorl %edx, %edx
callq 0x1050
cmpl $-0x1, %eax
je 0x139e
cmpl $0x2, %r14d
jl 0x13c0
decl %r14d
movl $0x1, %r15d
movq (%rbx,%r15,8), %r12
movb (%r12), %al
testb %al, %al
je 0x135a
incq %r12
movsbl %al, %edi
callq 0x13dd
cmpb $0x0, (%r12)
je 0x135a
movl $0x53020, %edi          # imm = 0x53020
callq 0x10f0
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x1336
cmpq %r14, %r15
je 0x136e
incq %r15
movl $0x20, %edi
callq 0x13dd
jmp 0x1327
cmpb $0x1, 0x2d23(%rip)      # 0x4098
jne 0x137e
callq 0x14f4
jmp 0x1383
callq 0x1524
callq 0x14d8
callq 0x146e
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1126
jmp 0x1314
callq 0x1110
jmp 0x13d6
callq 0x1030
cmpl $0x11, (%rax)
jne 0x13ca
callq 0x1166
jmp 0x13d6
movq %rbx, %rdi
callq 0x1142
jmp 0x1383
leaq 0xc56(%rip), %rdi       # 0x2027
callq 0x10d0
movl $0x1, %eax
jmp 0x138f
// File: /workspace/github_c_makefile_star2_O3/timocramer[P]thinklight-fun/tl-morsestrobo.c
// Function: morse_char
static void morse_char(char c) {
	const char *p = morse_code(c);
	
	if(p != NULL) {
		while(*p != 0) {
			tl_toggle();
			if(*p == '.')
				usleep(DIT);
			else
				usleep(DAH);
			
			tl_toggle();
			usleep(AFTER_SYMBOL);
			
			++p;
		}
	}
	else if(c == ' ')
		usleep(AFTER_WORD);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leal -0x61(%rdi), %eax
movl %edi, %ecx
andb $0x5f, %cl
cmpb $0x1a, %al
movzbl %cl, %eax
cmovael %edi, %eax
addb $-0x27, %al
cmpb $0x38, %al
ja 0x1451
movzbl %al, %eax
movabsq $0x10fffffff5ffff7, %rcx # imm = 0x10FFFFFFF5FFFF7
btq %rax, %rcx
jae 0x1451
leaq 0x2818(%rip), %rcx      # 0x3c28
movq (%rcx,%rax,8), %rbx
cmpb $0x0, (%rbx)
je 0x1467
incq %rbx
movl $0x29810, %ebp          # imm = 0x29810
callq 0x15a0
cmpb $0x2e, -0x1(%rbx)
movl $0x7c830, %edi          # imm = 0x7C830
cmovel %ebp, %edi
callq 0x10f0
callq 0x15a0
movl $0x29810, %edi          # imm = 0x29810
callq 0x10f0
cmpb $0x0, (%rbx)
leaq 0x1(%rbx), %rbx
jne 0x1421
jmp 0x1467
cmpb $0x20, %dil
jne 0x1467
movl $0xa6040, %edi          # imm = 0xA6040
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10f0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/timocramer[P]thinklight-fun/tl-morsestrobo.c
// Function: restore_status_and_exit
static void restore_status_and_exit(int s) {
	(void) s;
	
	if(initial_status == TL_ON)
		tl_on();
	else
		tl_off();
	
	tl_deinit();
	unlock();
	exit(0);
}

// Assembly:
pushq %rax
cmpb $0x1, 0x2c01(%rip)      # 0x4098
jne 0x14a0
callq 0x14f4
jmp 0x14a5
callq 0x1524
callq 0x14d8
callq 0x146e
xorl %edi, %edi
callq 0x10e0
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/spipe/main.c
// Function: callback_graceful_shutdown
static int
callback_graceful_shutdown(void * cookie)
{
	struct events_threads * ET = cookie;
	int rc;
	int i;

	/* Cancel the threads. */
	for (i = 0; i < 2; i++) {
		if ((rc = pthread_cancel(ET->threads[i])) != 0) {
			/*
			 * According to the POSIX standard, a Thread ID should
			 * still be valid after pthread_exit has been invoked
			 * by the thread if pthread_join() has not yet been
			 * called.  However, many platforms return ESRCH in
			 * this situation.
			 */
			if (rc != ESRCH) {
				warn0("pthread_cancel: %s", strerror(rc));
				goto err0;
			}
		}
	}

	/* Wait for the threads to finish. */
	for (i = 0; i < 2; i++) {
		if ((rc = pthread_join(ET->threads[i], NULL)) != 0) {
			warn0("pthread_join: %s", strerror(rc));
			goto err0;
		}
	}

	/* We've stopped the threads. */
	ET->stopped = 1;

	/* Shut down the main event loop. */
	ET->conndone = 1;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, %bpl
xorl %eax, %eax
movq (%rbx,%rax,8), %rdi
callq 0x3390
testl %eax, %eax
je 0x477c
cmpl $0x3, %eax
jne 0x47bf
movl $0x1, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x476a
movb $0x1, %bpl
xorl %ecx, %ecx
movq (%rbx,%rcx,8), %rdi
xorl %esi, %esi
callq 0x3030
testl %eax, %eax
jne 0x47cf
movl $0x1, %ecx
xorl %eax, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x4791
movl $0x1, %ecx
movl %ecx, 0x18(%rbx)
movl %ecx, 0x10(%rbx)
jmp 0x47f7
movl %eax, %edi
callq 0x32e0
leaq 0xb9ec(%rip), %rdi      # 0x101b9
jmp 0x47dd
movl %eax, %edi
callq 0x32e0
leaq 0xb9cb(%rip), %rdi      # 0x101a8
movq %rax, %rsi
xorl %eax, %eax
callq 0x7973
callq 0x3400
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/packet_main.c
// Function: print_raw_packet
void print_raw_packet(APRSPacket *packet){

	unsigned short length = packet->data.len;

	fputc((length>>8) & 0xFF, stdout);
	fputc( length     & 0xFF, stdout);

	fwrite(packet->data.data, sizeof(char), packet->data.len, stdout);
	fflush(stdout);

	fprintf(stderr, "packet: Packet Length: %d\n", packet->data.len);

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl (%rdi), %ebp
movl %ebp, %edi
shrl $0x8, %edi
movq 0x3e2a(%rip), %r14      # 0x4fd0
movq (%r14), %rsi
callq 0x10c0
movzbl %bpl, %edi
movq (%r14), %rsi
callq 0x10c0
movq 0x8(%rbx), %rdi
movzwl (%rbx), %edx
movq (%r14), %rcx
pushq $0x1
popq %rsi
callq 0x1150
movq (%r14), %rdi
callq 0x1110
movq 0x3e1d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movzwl (%rbx), %edx
leaq 0x1ec6(%rip), %rsi      # 0x30ae
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/char_array_expandable.c
// Function: char_array_expandable_put
void char_array_expandable_put(char_array_expandable *self, int8_t c){

	if(self->length == self->capacity){

		uint16_t old_capacity = self->capacity;

		self->capacity += self->capacity/5;

		int8_t *new_data = (int8_t*) malloc(sizeof(int8_t) * self->capacity);
		int8_t *old_data = self->data;

		uint16_t i;
		for(i = 0; i < old_capacity; i++)
			new_data[i] = old_data[i];

		free(old_data);

		self->data = new_data;

	}

	self->data[self->length] =  c;

	self->length++;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movzwl 0x2(%rdi), %r12d
cmpw (%rdi), %r12w
jne 0x1388
movzwl %r12w, %r15d
imull $0xcccd, %r15d, %eax    # imm = 0xCCCD
shrl $0x12, %eax
addl %r12d, %eax
movw %ax, (%rbx)
movzwl %ax, %edi
callq 0x1100
movq %rax, %r14
movq 0x8(%rbx), %rdi
testw %r12w, %r12w
je 0x1378
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq %rax, %r15
jne 0x1369
callq 0x1030
movq %r14, 0x8(%rbx)
movzwl 0x2(%rbx), %r12d
jmp 0x138c
movq 0x8(%rbx), %r14
movzwl %r12w, %eax
movb %bpl, (%r14,%rax)
incw 0x2(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/APRSPacket.c
// Function: APRSPacket_from_data
void APRSPacket_from_data(APRSPacket *packet, char_array *data){

	int i;

	packet->data.len = data->len;
	packet->data.data = data->data;

	for(i = 0; i < 7; i++) packet->destination_address[i] = (signed char)((unsigned char)(data->data[i])>>1);
	packet->destination_address[7] = '\0';

	for(i = 7; i < 14; i++) packet->source_address[i-7] = (signed char)((unsigned char)(data->data[i])>>1);
	packet->source_address[7] = '\0';

	packet->repeaters = 0;
	packet->repeater_addresses = (signed char**) malloc(sizeof(void*)*8);

	int n = 14;
	while(true){

		if(n+1 >= data->len) break;

		// Check for 0 bit set on end of last address character indicating that there are no more repeater addresses
		if((data->data[n-1] & 0x01) != 0) break;

		if(packet->repeaters > 7) break;

		if(n+7 >= data->len) break;

		signed char* new_address = (signed char*) malloc(sizeof(char)*8);
		for(i = n; i < n+7; i++) new_address[i-n] = (signed char)((unsigned char)(data->data[i])>>1);
		new_address[7] = '\0';
		n+=7;

		packet->repeater_addresses[packet->repeaters] = new_address;
		packet->repeaters++;

	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl (%rsi), %eax
movw %ax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movb (%rcx,%rax), %cl
shrb %cl
movb %cl, 0x10(%r14,%rax)
incq %rax
cmpq $0x7, %rax
jne 0x152d
movb $0x0, 0x17(%r14)
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movb 0x7(%rcx,%rax), %cl
shrb %cl
movb %cl, 0x18(%r14,%rax)
incq %rax
cmpq $0x7, %rax
jne 0x154b
movw $0x0, 0x1f(%r14)
movl $0x40, %edi
callq 0x1100
movq %rax, 0x28(%r14)
movzwl (%rbx), %eax
cmpq $0x10, %rax
jb 0x15f1
movl $0xe, %r13d
xorl %r12d, %r12d
movq %rax, (%rsp)
movq 0x8(%rbx), %r15
testb $0x1, -0x1(%r15,%r13)
jne 0x15f1
cmpb $0x7, %r12b
ja 0x15f1
leaq 0x7(%r13), %rbp
cmpq %rax, %rbp
jae 0x15f1
movl $0x8, %edi
callq 0x1100
addq %r13, %r15
xorl %ecx, %ecx
movb (%r15,%rcx), %dl
shrb %dl
movb %dl, (%rax,%rcx)
incq %rcx
cmpq $0x7, %rcx
jne 0x15b8
movb $0x0, 0x7(%rax)
movq 0x28(%r14), %rcx
movzbl %r12b, %edx
movq %rax, (%rcx,%rdx,8)
incb %r12b
movb %r12b, 0x20(%r14)
addq $0x8, %r13
movq (%rsp), %rax
cmpq %rax, %r13
movq %rbp, %r13
jb 0x158e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/APRSPacket.c
// Function: APRSPacket_destroy
void APRSPacket_destroy(APRSPacket *packet){

	int i;
	for(i = 0; i < packet->repeaters; i++)
		free(packet->repeater_addresses[i]);
	free(packet->repeater_addresses);

	free(packet->data.data);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x20(%rdi)
je 0x1642
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
movzbl 0x20(%rbx), %eax
cmpq %rax, %r14
jb 0x1629
movq 0x28(%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
nop
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/AFSK_Demodulator.c
// Function: AFSK_Demodulator_reset
void AFSK_Demodulator_reset(AFSK_Demodulator *self){

	self->count_last = 0;

	self->window = (int)(self->sample_rate/self->bit_rate+0.5);

	self->bitwidth = self->sample_rate/self->bit_rate;

	/*
	 * Calculate Goertzel coefficents for calculating frequency magnitudes
	 */
	float k0 = ((float)self->window*self->frequency_0/self->sample_rate);
	float k1 = ((float)self->window*self->frequency_1/self->sample_rate);
	float w0 = (2*PI/self->window)*k0;
	float w1 = (2*PI/self->window)*k1;

	self->coeff0 = 2*cos(w0);
	self->coeff1 = 2*cos(w1);

	self->last_bit = 0;

	self->bit_stuffing = false;

	if(self->input_buffer.size != 0)
		char_ring_buffer_destory(&self->input_buffer);
	char_ring_buffer_init(&self->input_buffer, self->window+2);

	if(self->fcd_buffer.size != 0)
		float_ring_buffer_destory(&self->fcd_buffer);
	float_ring_buffer_init(&self->fcd_buffer, self->window+2);

	char_array_expandable_clear(&self->byte_sequence);
	char_ring_buffer_clear(&self->bit_sequence);

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %ebp, %ebp
movw %bp, 0x3c(%rdi)
movl 0x20(%rdi), %ecx
movzwl 0x24(%rdi), %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
cvtsi2sd %rax, %xmm0
addsd 0x1981(%rip), %xmm0     # 0x3008
cvttsd2si %xmm0, %edx
movb %dl, 0x26(%rdi)
movb %al, 0x3e(%rdi)
movzbl %dl, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movzwl 0x28(%rdi), %edx
cvtsi2ss %edx, %xmm1
mulss %xmm0, %xmm1
cvtsi2ss %rcx, %xmm2
movzwl 0x2a(%rdi), %ecx
cvtsi2ss %ecx, %xmm3
divss %xmm2, %xmm1
mulss %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divss %xmm2, %xmm3
movsd 0x1941(%rip), %xmm2     # 0x3010
divsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm3, %xmm1
mulsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0xc(%rsp)
cvtss2sd %xmm0, %xmm0
callq 0x10b0
addsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x2c(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
callq 0x10b0
addsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x30(%rbx)
movw %bp, 0x58(%rbx)
cmpw %bp, 0xc(%rbx)
je 0x173a
movq %rbx, %rdi
callq 0x1504
movzbl 0x26(%rbx), %esi
addl $0x2, %esi
movq %rbx, %rdi
callq 0x1464
leaq 0x10(%rbx), %r14
cmpw $0x0, 0x1c(%rbx)
je 0x175c
movq %r14, %rdi
callq 0x145c
movzbl 0x26(%rbx), %esi
addl $0x2, %esi
movq %r14, %rdi
callq 0x13b8
leaq 0x60(%rbx), %rdi
callq 0x13a6
addq $0x40, %rbx
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x14e8
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/AFSK_Demodulator.c
// Function: AFSK_Demodulator_destroy
void AFSK_Demodulator_destroy(AFSK_Demodulator *self){

	if(self->input_buffer.size != 0)
		char_ring_buffer_destory(&self->input_buffer);
	if(self->fcd_buffer.size != 0)
		float_ring_buffer_destory(&self->fcd_buffer);

	if(self->bit_sequence.size != 0)
		char_ring_buffer_destory(&self->bit_sequence);

	if(self->byte_sequence.capacity != 0)
		char_array_expandable_destroy(&self->byte_sequence);

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0xc(%rdi)
je 0x17f0
movq %rbx, %rdi
callq 0x1504
cmpw $0x0, 0x1c(%rbx)
je 0x1800
leaq 0x10(%rbx), %rdi
callq 0x145c
cmpw $0x0, 0x4c(%rbx)
je 0x1810
leaq 0x40(%rbx), %rdi
callq 0x1504
cmpw $0x0, 0x60(%rbx)
je 0x1824
addq $0x60, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x13ad
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/packet_main.c
// Function: print_detailed_packet
void print_detailed_packet(APRSPacket *packet, unsigned short calculated_checksum, unsigned short checksum){

	int i;

	printf("Packet Received\n");

	if(calculated_checksum != checksum)
		printf("Checksum Error!\nCaluclated checksum is: %04X\n", calculated_checksum);

	printf("Size: %d\n", packet->data.len);
	printf("Destination Address: %s\n", packet->destination_address);
	printf("Source Address: %s\n", packet->source_address);
	for(i = 0; i < packet->repeaters; i++)
		printf("Repeater-%d: %s\n", i+1, packet->repeater_addresses[i]);

	printf("\nData: \n");

	i = 0;
	while(i < packet->data.len){
		int j;
		for(j = 0; j < 20; j++){
			if(i < packet->data.len){
				if(isprint(packet->data.data[i])) putchar(packet->data.data[i]);
				else printf(".");
			} else putchar(' ');
			i++;
		}
		i -= 20;
		printf("  |  ");
		for(j = 0; j < 20; j++){
			if(i < packet->data.len){
				unsigned char val = packet->data.data[i];
				printf(" %02X", (int)val);
				i++;
			}
		}
		putchar('\n');
	}

	printf("\nChecksum: %04X\n", checksum);
	fflush(stdout);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x177b(%rip), %rdi      # 0x335c
callq 0x1060
movl %ebx, 0x4(%rsp)
cmpw %bx, %bp
je 0x1c00
movzwl %bp, %esi
leaq 0x14d0(%rip), %rdi      # 0x30c9
xorl %eax, %eax
callq 0x10a0
movzwl (%r14), %esi
leaq 0x14ec(%rip), %rdi      # 0x30f7
xorl %eax, %eax
callq 0x10a0
leaq 0x10(%r14), %rsi
leaq 0x14e4(%rip), %rdi      # 0x3101
xorl %eax, %eax
callq 0x10a0
leaq 0x18(%r14), %rsi
leaq 0x14eb(%rip), %rdi      # 0x311a
xorl %eax, %eax
callq 0x10a0
cmpb $0x0, 0x20(%r14)
je 0x1c69
leaq 0x14ea(%rip), %r15      # 0x312e
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdx
incq %r12
movq %r15, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x10a0
movzbl 0x20(%r14), %eax
cmpq %rax, %r12
jb 0x1c47
leaq 0x16fc(%rip), %rdi      # 0x336c
callq 0x1060
cmpw $0x0, (%r14)
je 0x1d20
leaq 0x14b8(%rip), %r15      # 0x313f
leaq 0x14b7(%rip), %r12      # 0x3145
xorl %ebp, %ebp
movslq %ebp, %rbx
movl $0x14, %r13d
movzwl (%r14), %eax
cmpq %rax, %rbx
jge 0x1cc1
callq 0x1170
movq (%rax), %rax
movq 0x8(%r14), %rcx
movsbq (%rcx,%rbx), %rdi
testb $0x40, 0x1(%rax,%rdi,2)
jne 0x1cc8
movl $0x2e, %edi
jmp 0x1cc8
movl $0x20, %edi
jmp 0x1cc8
callq 0x1040
incq %rbx
decl %r13d
jne 0x1c99
subl %r13d, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x10a0
movl $0x14, %ebx
movzwl (%r14), %eax
cmpl %eax, %ebp
jge 0x1d06
movq 0x8(%r14), %rax
movslq %ebp, %rcx
movzbl (%rax,%rcx), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x10a0
incl %ebp
decl %ebx
jne 0x1ce7
movl $0xa, %edi
callq 0x1040
movzwl (%r14), %eax
cmpl %eax, %ebp
jl 0x1c90
movzwl 0x4(%rsp), %esi
leaq 0x141f(%rip), %rdi      # 0x314b
xorl %eax, %eax
callq 0x10a0
movq 0x3296(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1110
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/packet_main.c
// Function: print_packet
void print_packet(APRSPacket *packet, bool show_errors_bool, bool raw){

	uint16_t fsc = APRSPacket_crc(packet);

	/* CRC is added to packet with bytes reversed
	 */
	uint16_t fsc2 = packet->data.data[packet->data.len-1];
	fsc2 <<= 8;
	fsc2 |= packet->data.data[packet->data.len-2] & 0xFF;

	if(fsc != fsc2 && !show_errors_bool) return;

	if(raw)
		print_raw_packet(packet);

	else
		print_detailed_packet(packet, fsc, fsc2);

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
xorb $0x1, %r14b
callq 0x1600
movq 0x8(%rbx), %rcx
movzwl (%rbx), %edx
movzwl -0x2(%rcx,%rdx), %ecx
cmpw %cx, %ax
setne %dl
testb %r14b, %dl
jne 0x1d93
testb %bpl, %bpl
jne 0x1d98
movzwl %ax, %esi
movzwl %cx, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1bc8
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/packet/packet_main.c
// Function: parse_opt
static error_t parse_opt(int key, char *arg, struct argp_state *state){

	// remove cast in full C
	struct arguments *arguments = ((struct arguments*)(state->input));

	switch(key){
		case 'i':
			arguments->filename = arg;
			break;
		case 's':
			arguments->sample_rate = atoi(arg);
			break;
		case 'b':
			arguments->bit_rate = atoi(arg);
			break;
		case 'e':
			arguments->show_errors = true;
			break;
		case 'r':
			arguments->raw = true;
			break;
		case 'n':
			arguments->noise_floor = atoi(arg);
			break;
		case 'o':
			arguments->offset = atof(arg);
			break;
		case -1:
			arguments->frequency_0 = atoi(arg);
			break;
		case -2:
			arguments->frequency_1 = atoi(arg);
			break;
		default:
			return ARGP_ERR_UNKNOWN;
	}
	return 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdx), %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x64, %edi
jle 0x1f29
addl $-0x65, %edi
cmpl $0xe, %edi
ja 0x1f97
leaq 0x1136(%rip), %rcx      # 0x3050
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movb $0x1, 0x18(%rbx)
jmp 0x1f95
cmpl $-0x2, %edi
je 0x1f7d
cmpl $-0x1, %edi
je 0x1f8a
cmpl $0x62, %edi
jne 0x1f97
movq %rsi, %rdi
callq 0x1140
movl %eax, 0x14(%rbx)
jmp 0x1f95
movb $0x1, 0x19(%rbx)
jmp 0x1f95
movq %rsi, %rdi
callq 0x1140
movl %eax, 0x1c(%rbx)
jmp 0x1f95
movq %rsi, %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rbx)
jmp 0x1f95
movq %rsi, (%rbx)
jmp 0x1f95
movq %rsi, %rdi
callq 0x1140
movl %eax, 0x10(%rbx)
jmp 0x1f95
movq %rsi, %rdi
callq 0x1140
movl %eax, 0xc(%rbx)
jmp 0x1f95
movq %rsi, %rdi
callq 0x1140
movl %eax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/crc/crcccitt.c
// Function: CRCCCITT
uint16_t CRCCCITT(uint8_t *data, uint16_t len, uint16_t polynomial){

	uint16_t crc = 0xFFFF;
	uint8_t i;

	while(len--){

		crc ^= *data++;

		for(i = 0; i < 8; i++){
			if(crc & 0x0001)
				crc = (crc >> 1) ^ polynomial;
			else
				crc >>= 1;
		}

	}

	crc ^= 0xFFFF;

	return crc;

}

// Assembly:
testl %esi, %esi
je 0x1fd1
movw $0xffff, %ax            # imm = 0xFFFF
decl %esi
movzbl (%rdi), %ecx
xorl %ecx, %eax
movb $0x8, %cl
movl %eax, %r8d
andl $0x1, %r8d
negl %r8d
andl %edx, %r8d
movzwl %ax, %eax
shrl %eax
xorl %r8d, %eax
decb %cl
jne 0x1fad
incq %rdi
testw %si, %si
jne 0x1fa4
notl %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/util/argp.c
// Function: argp_parse
error_t argp_parse(struct argp *argp, int argc, char **argv, unsigned flags, int *arg_index,  void *input){

	struct argp_state state;

	state.input = input;

	int i;

	for(i = 1; i < argc; i++){

		if(argv[i][0] == '-'){

			if(argv[i][1] == '-'){

				struct argp_option *op = argp->options;

				int c = -1;

				while(*(uint8_t*)op != 0){

					c = argp_parse_argument(op->name, argv[i]);

					// If we found the option match the parameter
					if(c >= 0)
						break;

					op++;

				}

				if(c >= 0)
					argp->parser(op->key, &argv[i][c+3], &state);

				else {
					// Check if it is help
					c = argp_parse_argument("help", argv[i]);
					if(c >= 0){
						argp_print_help(argv[0], argp->options);
						return ARGP_ERR_HELP;
					} else {
						// Invalid Option
						fprintf(stderr, "%s: unrecognized option '%s'\nTry '%s --help' for more information.\n", argv[0], argv[i], argv[0]);
						return ARGP_ERR_UNKNOWN;
					}
				}

			} else {

				// single character option
				struct argp_option *op = argp->options;

				while(op->arg[0] != 0){

					if(op->key == argv[i][1] && argv[i][2] == '\0'){
						argp->parser(op->key, NULL, &state);
						break;
					}

					op++;

				}

			}

		}

		// Invalid Option
		else {
			return -1;
		}

	}

	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x40(%rsp)
cmpl $0x2, %esi
jl 0x20c2
movq %rdx, %r13
movq %rdi, %rcx
movl %esi, %r14d
movl $0x1, %r15d
movq %rdi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq (%r13,%r15,8), %r12
cmpb $0x2d, (%r12)
jne 0x20ee
movsbl 0x1(%r12), %edi
movq (%rcx), %rbx
cmpl $0x2d, %edi
jne 0x2055
cmpb $0x0, (%rbx)
je 0x20c6
movq %rbx, %r13
movq (%r13), %rdi
movq %r12, %rsi
callq 0x2127
testl %eax, %eax
jns 0x207d
cmpb $0x0, 0x30(%r13)
leaq 0x30(%r13), %r13
jne 0x2038
jmp 0x20c6
movq 0x10(%rbx), %rax
cmpb $0x0, (%rax)
je 0x20b6
addq $0x40, %rbx
cmpl %edi, -0x38(%rbx)
jne 0x206f
cmpb $0x0, 0x2(%r12)
je 0x20a2
movq (%rbx), %rax
addq $0x30, %rbx
cmpb $0x0, (%rax)
jne 0x2062
jmp 0x20b6
movl 0x8(%r13), %edi
movl %eax, %eax
leaq (%r12,%rax), %rsi
addq $0x3, %rsi
leaq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rbx
callq *0x8(%rbx)
movq %rbx, %rcx
movq 0x10(%rsp), %r13
jmp 0x20b6
xorl %esi, %esi
leaq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rcx
incq %r15
cmpq %r14, %r15
jne 0x200e
xorl %ebp, %ebp
jmp 0x20ee
leaq 0x12a7(%rip), %rdi      # 0x3374
movq %r12, %rsi
callq 0x2127
testl %eax, %eax
js 0x20ff
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2171
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2ef2(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
leaq 0x1261(%rip), %rsi      # 0x3379
movq %r12, %rcx
movq %rdx, %r8
xorl %eax, %eax
callq 0x10d0
jmp 0x20ee
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/util/argp.c
// Function: argp_parse_argument
static int argp_parse_argument(const char *name, const char *arg){

	int c = 0;

	while(true){

		// They are equal!
		if(name[c] == '\0' && (arg[c+2] == '\0' || arg[c+2] == '='))
			return c;

		// Finish if one string is a different length or if they have different values
		else if(name[c] == '\0' || arg[c+2] == '\0' || arg[c+2] == '=' || name[c] != arg[c+2])
			return -1;

		c++;

	}

	return -1;

}

// Assembly:
movb (%rdi), %dl
testb %dl, %dl
je 0x2159
xorl %ecx, %ecx
movzbl 0x2(%rsi,%rcx), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r8d, %r8d
je 0x2170
cmpl $0x3d, %r8d
je 0x2170
cmpb %r8b, %dl
jne 0x2170
movb 0x1(%rdi,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x212f
movl %ecx, %eax
jmp 0x215d
xorl %eax, %eax
xorl %ecx, %ecx
movzbl 0x2(%rsi,%rcx), %ecx
testl %ecx, %ecx
je 0x2170
cmpl $0x3d, %ecx
je 0x2170
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/test/testBitBuffer.C
// Function: main
int main(int argc, char** argv) {
  BitBuffer* b = new BitBuffer(1);
  unsigned char t = 0;
  while (t < 255) {
    b->putBit(t);
    int d = b->getBit();
    printf("%d\n", d);
    t++;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xa8, %edi
callq 0x1070
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
callq 0x124a
leaq 0xe03(%rip), %r14       # 0x2004
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1316
movq %rbx, %rdi
callq 0x12a8
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
incl %ebp
cmpl $0xff, %ebp
jne 0x1203
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0xa8, %esi
movq %rbx, %rdi
callq 0x1080
movq %r14, %rdi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/test/./../slow/src/BitBuffer.h
// Function: BitBuffer::BitBuffer(int)
BitBuffer(int capacity) {
    this->capacity = capacity;
    this->capacityMask = capacity - 1;
    head = 0;
    tail = 0;
    waitingfornotfull = false;
    waitingfornotempty = false;
    buf = new int[capacity];
    pthread_mutex_init(&bufferlock, NULL);
    pthread_cond_init(&notempty, NULL);
    pthread_cond_init(&notfull, NULL);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
leal -0x1(%rsi), %eax
movl %eax, 0x4(%rdi)
movq $0x0, 0x8(%rdi)
movw $0x0, 0x40(%rdi)
movl %esi, %eax
shlq $0x2, %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x1040
movq %rax, 0x10(%rbx)
leaq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x10b0
leaq 0x48(%rbx), %rdi
xorl %esi, %esi
callq 0x1090
addq $0x78, %rbx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x1090
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/slow/src/BitBuffer.C
// Function: BitBuffer::getBit()
int BitBuffer::getBit() {
  int c;
  pthread_mutex_lock(&bufferlock);
  while (head - tail == 0) {
    pthread_cond_wait(&notempty, &bufferlock);
  }

  c = buf[tail++ & capacityMask];

  pthread_cond_signal(&notfull);

  pthread_mutex_unlock(&bufferlock);
  return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x10a0
movl 0xc(%r14), %eax
cmpl %eax, 0x8(%r14)
jne 0x12e1
leaq 0x48(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10c0
movl 0xc(%r14), %eax
cmpl %eax, 0x8(%r14)
je 0x12cc
movq 0x10(%r14), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xc(%r14)
andl 0x4(%r14), %eax
cltq
movl (%rcx,%rax,4), %ebp
addq $0x78, %r14
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1060
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_create_default
obdeque * obdeque_create_default(void){

  static const char classname[] = "obdeque";
  obdeque *new_instance = malloc(sizeof(obdeque));
  assert(new_instance != NULL);

  /* initialize base class data */
  ob_init_base((obj *)new_instance, &obdeque_destroy, &obdeque_hash,
               &obdeque_compare, &obdeque_display, classname);

  new_instance->head = NULL;
  new_instance->tail = NULL;
  new_instance->length = 0;

  return new_instance;
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x10b0
testq %rax, %rax
je 0x1e53
movq %rax, %rbx
leaq 0xed9(%rip), %rsi       # 0x2cf4
leaq 0xf67(%rip), %rdx       # 0x2d89
leaq 0x1097(%rip), %rcx      # 0x2ec0
leaq 0x1238(%rip), %r8       # 0x3068
leaq 0x2fba(%rip), %r9       # 0x4df1
movq %rax, %rdi
callq 0x32f0
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x2ca8(%rip), %rdi      # 0x4b02
leaq 0x27b7(%rip), %rsi      # 0x4618
leaq 0x2dac(%rip), %rcx      # 0x4c14
movl $0x200, %edx            # imm = 0x200
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_copy
obdeque * obdeque_copy(const obdeque *to_copy){

  obj *element;
  obdeque_iterator *iter;
  obdeque *copy;

  assert(to_copy);

  copy = obdeque_create_default();

  iter = obdeque_head_iterator(to_copy);

  if(!iter) return copy; /* if the list is empty, return empty copy */

  /* while there are elements in the deque to copy add to the tail of the
   * deque */
  do{
    element = obdeque_obj_at_iterator(to_copy, iter);
    obdeque_add_at_tail(copy, element);
  } while(obdeque_iterate_next(to_copy, iter));

  ob_release((obj *)iter);

  return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1ef9
movq %rdi, %rbx
callq 0x1e01
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0x213c
testq %rax, %rax
je 0x1ed1
movq %rax, %r15
cmpq %rbx, 0x8(%r15)
jne 0x1eda
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1eb0
movq 0x8(%rax), %rsi
jmp 0x1eb2
xorl %esi, %esi
movq %r14, %rdi
callq 0x1fc7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x203f
testb %al, %al
jne 0x1e9b
movq %r15, %rdi
callq 0x349e
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x287e(%rip), %rdi      # 0x475f
leaq 0x2730(%rip), %rsi      # 0x4618
leaq 0x2adc(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
leaq 0x2710(%rip), %rdi      # 0x4610
leaq 0x2711(%rip), %rsi      # 0x4618
leaq 0x2720(%rip), %rcx      # 0x462e
movl $0x18, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_obj_at_iterator
obj * obdeque_obj_at_iterator(const obdeque *deque, const obdeque_iterator *it){

  assert(deque);
  assert(it);
  assert(it->deque == deque); /* assert that iterator belongs to provided
                                 deque */
  if(!it->node) return NULL; /* if the iterator is empty return NULL */
  return it->node->stored;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1f6a
testq %rsi, %rsi
je 0x1f89
cmpq %rdi, 0x8(%rsi)
jne 0x1fa8
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x1f66
movq 0x8(%rax), %rax
jmp 0x1f68
xorl %eax, %eax
popq %rcx
retq
leaq 0x27fb(%rip), %rdi      # 0x476c
leaq 0x26a0(%rip), %rsi      # 0x4618
leaq 0x2a4c(%rip), %rcx      # 0x49cb
movl $0x128, %edx            # imm = 0x128
callq 0x1050
leaq 0x27cc(%rip), %rdi      # 0x475c
leaq 0x2681(%rip), %rsi      # 0x4618
leaq 0x2a2d(%rip), %rcx      # 0x49cb
movl $0x129, %edx            # imm = 0x129
callq 0x1050
leaq 0x27b0(%rip), %rdi      # 0x475f
leaq 0x2662(%rip), %rsi      # 0x4618
leaq 0x2a0e(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_add_at_tail
void obdeque_add_at_tail(obdeque *deque, obj *to_add){

  obdeque_node *new_node;

  assert(deque);
  assert(to_add);

  /* creating deque node with to_add ob_retains to account for the deque's
   * reference */
  new_node = obdeque_new_node(to_add);

  /* set node data */
  new_node->prev = deque->tail;

  /* update deque data */
  /* if a tail aleady exists update tail next */
  if(deque->tail) deque->tail->next = new_node;
  else deque->head = new_node; /* else set head, which should not be NULL
                                 anymore */
  deque->tail = new_node;
  deque->length++;

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2001
testq %rsi, %rsi
je 0x2020
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2313
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
leaq 0x8(%rbx), %rdx
leaq 0x10(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq %rax, (%rsi)
movq %rax, 0x10(%rbx)
incq 0x18(%rbx)
popq %rbx
retq
leaq 0x2764(%rip), %rdi      # 0x476c
leaq 0x2609(%rip), %rsi      # 0x4618
leaq 0x27d0(%rip), %rcx      # 0x47e6
movl $0x92, %edx
callq 0x1050
leaq 0x27b8(%rip), %rdi      # 0x47df
leaq 0x25ea(%rip), %rsi      # 0x4618
leaq 0x27b1(%rip), %rcx      # 0x47e6
movl $0x93, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_iterate_next
uint8_t obdeque_iterate_next(const obdeque *deque, obdeque_iterator *it){

  assert(deque);
  assert(it);
  assert(it->deque == deque);

  if(!it->node) return 0;

  /* update the iterator if the next node exists, and return 1 */
  if(it->node->next){
    ob_retain((obj *)it->node->next);
    ob_release((obj *)it->node);
    it->node = it->node->next;
    return 1;
  }

  /* else the iterator is at the end of the list, return 0 */
  return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2087
movq %rsi, %rbx
testq %rsi, %rsi
je 0x20a6
cmpq %rdi, 0x8(%rbx)
jne 0x20c5
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x2083
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x2083
callq 0x34d3
movq 0x10(%rbx), %rdi
callq 0x349e
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rbx)
movb $0x1, %al
jmp 0x2085
xorl %eax, %eax
popq %rbx
retq
leaq 0x26de(%rip), %rdi      # 0x476c
leaq 0x2583(%rip), %rsi      # 0x4618
leaq 0x267e(%rip), %rcx      # 0x471a
movl $0x4c, %edx
callq 0x1050
leaq 0x26af(%rip), %rdi      # 0x475c
leaq 0x2564(%rip), %rsi      # 0x4618
leaq 0x265f(%rip), %rcx      # 0x471a
movl $0x4d, %edx
callq 0x1050
leaq 0x2693(%rip), %rdi      # 0x475f
leaq 0x2545(%rip), %rsi      # 0x4618
leaq 0x2640(%rip), %rcx      # 0x471a
movl $0x4e, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_new_iterator
obdeque_iterator * obdeque_new_iterator(const obdeque *deque, obdeque_node *node){

  static const char classname[] = "obdeque_iterator";
  obdeque_iterator *new_instance;

  if(!node) return NULL; /* return nothing when iterating from an empty
                            deque */

  new_instance = malloc(sizeof(obdeque_iterator));
  assert(new_instance != NULL);

  /* initialize base class data */
  ob_init_base((obj *)new_instance, &obdeque_destroy_iterator, NULL, NULL, NULL,
               classname);

  ob_retain((obj *)node);
  new_instance->node = node;
  new_instance->deque = deque;

  return new_instance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x218d
movq %rsi, %r14
movq %rdi, %rbx
movl $0x18, %edi
callq 0x10b0
testq %rax, %rax
je 0x2199
movq %rax, %r15
leaq 0xb2e(%rip), %rsi       # 0x2c93
leaq 0x2c74(%rip), %r9       # 0x4de0
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x32f0
movq %r14, %rdi
callq 0x34d3
movq %r14, 0x10(%r15)
movq %rbx, 0x8(%r15)
jmp 0x2190
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2962(%rip), %rdi      # 0x4b02
leaq 0x2471(%rip), %rsi      # 0x4618
leaq 0x29be(%rip), %rcx      # 0x4b6c
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x1050