LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: is_word_start
static int is_word_start(const unsigned char *words, const struct translate *translate, const int at)
{
	if(at >= translate->input_len)
		return 0;

	if(translate_on_marker_at(translate, at))
		return is_word_start(words, translate, get_after_next_delimiter(translate, at));

	if(!translate_has_attributes_at(translate, at, CHAR_SPACE))
		return 1;

	return 0;
}

// Assembly:
pushq %rbx
movslq 0x44(%rdi), %rax
cmpl %esi, %eax
jle 0xe1bc
movq (%rdi), %r9
movq 0x38(%rdi), %rcx
movslq 0xc(%rdi), %rdx
movq -0x8(%r9,%rdx,8), %r10
movslq %esi, %r8
movzwl (%rcx,%r8,2), %edx
cmpw 0x1e8(%r10), %dx
je 0xe182
cmpw 0x1ea(%r10), %dx
je 0xe182
cmpw 0x1ec(%r10), %dx
je 0xe182
cmpw 0x1f0(%r10), %dx
je 0xe182
cmpw 0x1f2(%r10), %dx
je 0xe182
cmpw 0x1f4(%r10), %dx
jne 0xe1c2
leal 0x1(%rsi), %r9d
cmpl %r9d, %eax
cmovgl %eax, %r9d
decl %r9d
decl %esi
incq %r8
cmpq %rax, %r8
jge 0xe1ac
incl %esi
leaq 0x1(%r8), %r10
cmpw %dx, (%rcx,%r8,2)
movq %r10, %r8
jne 0xe195
jmp 0xe1af
movl %r9d, %esi
addl $0x2, %esi
cmpl %eax, %esi
cmovgel %eax, %esi
jmp 0xe126
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
movl $0x1, %ebx
testl %esi, %esi
js 0xe1be
movslq 0x8(%rdi), %rax
movq (%r9,%rax,8), %rdi
movl %esi, %eax
movzwl (%rcx,%rax,2), %esi
callq 0x1e99
testq %rax, %rax
je 0xe1be
movl 0x24(%rax), %ebx
notl %ebx
andl $0x1, %ebx
jmp 0xe1be
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: convert_to_passage
static void convert_to_passage(unsigned int *indicators, unsigned char *words, const int pass_begin, const int pass_end)
{
	int i;

	for(i = pass_begin; i <= pass_end; i++)
	{
		indicators[i] &= ~(EMP_SYMBOL | EMP_WORD);
		words[i] &= ~WORD_WHOLE;
	}

	indicators[pass_begin] |= EMP_BEGIN;
	indicators[pass_end] |= EMP_END;
}

// Assembly:
movslq %edx, %rax
cmpl %ecx, %edx
jg 0xe219
leaq (%rdi,%rax,4), %rdx
addq %rax, %rsi
movl %ecx, %r8d
subl %eax, %r8d
incl %r8d
xorl %r9d, %r9d
andb $-0xd, (%rdx,%r9,4)
andb $-0x3, (%rsi,%r9)
incq %r9
cmpl %r9d, %r8d
jne 0xe207
orb $0x1, (%rdi,%rax,4)
movslq %ecx, %rax
orb $0x2, (%rdi,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: sort_word_end
static void sort_word_end(struct indicator *indicator)
{
	struct indicator *nxt;

	if(!indicator->nxt)
		return;
	if(indicator->nxt->type != (EMP_WORD | EMP_END))
		return;

	sort_word_end(indicator->nxt);

	if(indicator->len < indicator->nxt->len)
	{
		nxt = indicator->nxt;

		if(indicator->prv)
			indicator->prv->nxt = nxt;
		if(nxt->nxt)
			nxt->nxt->prv = indicator;

		nxt->prv = indicator->prv;
		indicator->nxt = nxt->nxt;

		nxt->nxt = indicator;
		indicator->prv = nxt;

		sort_word_end(indicator);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xe274
cmpl $0x6, 0x18(%rdi)
jne 0xe274
callq 0xe225
movl 0x1c(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpl 0x1c(%rax), %ecx
jge 0xe274
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xe255
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xe261
movq %rbx, (%rcx)
movq (%rbx), %rdx
movq %rdx, (%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
jmp 0xe229
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: sort_word_begin
static void sort_word_begin(struct indicator *indicator)
{
	struct indicator *nxt;

	if(!indicator->nxt)
		return;
	if(indicator->nxt->type != EMP_WORD)
		return;

	sort_word_begin(indicator->nxt);

	if(indicator->len > indicator->nxt->len)
	{
		nxt = indicator->nxt;

		if(indicator->prv)
			indicator->prv->nxt = nxt;
		if(nxt->nxt)
			nxt->nxt->prv = indicator;

		nxt->prv = indicator->prv;
		indicator->nxt = nxt->nxt;

		nxt->nxt = indicator;
		indicator->prv = nxt;

		sort_word_begin(indicator);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xe2c5
cmpl $0x4, 0x18(%rdi)
jne 0xe2c5
callq 0xe276
movl 0x1c(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpl 0x1c(%rax), %ecx
jle 0xe2c5
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xe2a6
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xe2b2
movq %rbx, (%rcx)
movq (%rbx), %rdx
movq %rdx, (%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
jmp 0xe27a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: sort_passage_end
static void sort_passage_end(struct indicator *indicator)
{
	struct indicator *nxt;

	if(!indicator->nxt)
		return;
	if(indicator->nxt->type != EMP_END)
		return;

	sort_passage_end(indicator->nxt);

	if(indicator->len < indicator->nxt->len)
	{
		nxt = indicator->nxt;

		if(indicator->prv)
			indicator->prv->nxt = nxt;
		if(nxt->nxt)
			nxt->nxt->prv = indicator;

		nxt->prv = indicator->prv;
		indicator->nxt = nxt->nxt;

		nxt->nxt = indicator;
		indicator->prv = nxt;

		sort_passage_end(indicator);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xe316
cmpl $0x2, 0x18(%rdi)
jne 0xe316
callq 0xe2c7
movl 0x1c(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpl 0x1c(%rax), %ecx
jge 0xe316
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xe2f7
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xe303
movq %rbx, (%rcx)
movq (%rbx), %rdx
movq %rdx, (%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
jmp 0xe2cb
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: sort_passage_begin
static void sort_passage_begin(struct indicator *indicator)
{
	struct indicator *nxt;

	if(!indicator->nxt)
		return;

	sort_passage_begin(indicator->nxt);

	if(indicator->len > indicator->nxt->len)
	{
		nxt = indicator->nxt;

		if(indicator->prv)
			indicator->prv->nxt = nxt;
		if(nxt->nxt)
			nxt->nxt->prv = indicator;

		nxt->prv = indicator->prv;
		indicator->nxt = nxt->nxt;

		nxt->nxt = indicator;
		indicator->prv = nxt;

		sort_passage_begin(indicator);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xe361
callq 0xe318
movl 0x1c(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpl 0x1c(%rax), %ecx
jle 0xe361
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xe342
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xe34e
movq %rbx, (%rcx)
movq (%rbx), %rdx
movq %rdx, (%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
jmp 0xe31c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: insert_indicator_node
static int insert_indicator_node(struct translate *translate, const struct table *table, struct indicator *indicator, const int at)
{
	if(!indicator)
		return 1;
	insert_indicator_node(translate, table, indicator->nxt, at);

	switch(indicator->type)
	{
	case EMP_BEGIN:           return generic_insert_marked(translate, indicator->mode->begin, indicator->mode->begin_len, table->marker_hard);
	case EMP_END:             return generic_insert_marked(translate, indicator->mode->end, indicator->mode->end_len, table->marker_hard);
	case EMP_WORD:            return generic_insert_marked(translate, indicator->mode->word, indicator->mode->word_len, table->marker_hard);
	case EMP_WORD | EMP_END:  return generic_insert_marked(translate, indicator->mode->term, indicator->mode->term_len, table->marker_hard);
	case EMP_SYMBOL:          return generic_insert_marked(translate, indicator->mode->symbol, indicator->mode->symbol_len, table->marker_hard);
	}

	ASSERT(0)
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0xe3a7
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdx), %rdx
callq 0xe363
movl 0x18(%r15), %eax
decl %eax
cmpl $0x7, %eax
ja 0xe3f9
leaq 0x5857(%rip), %rcx      # 0x13be8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r15), %rsi
movl 0x54(%rsi), %edx
addq $0xc, %rsi
jmp 0xe3e4
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r15), %rsi
movl 0x64(%rsi), %edx
addq $0x44, %rsi
jmp 0xe3e4
movq 0x10(%r15), %rsi
movl 0x5c(%rsi), %edx
addq $0x28, %rsi
jmp 0xe3e4
movq 0x10(%r15), %rsi
movl 0x60(%rsi), %edx
addq $0x36, %rsi
jmp 0xe3e4
movq 0x10(%r15), %rsi
movl 0x58(%rsi), %edx
addq $0x1a, %rsi
movzwl 0x1f0(%r14), %ecx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa978
callq 0x1060
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: is_indicator_in_word
static int is_indicator_in_word(const struct translate *translate, const int at)
{
	int crs;

	for(crs = at + 1; crs < translate->input_len; crs++)
	if(translate->input[crs] == translate->input[at])
		break;

	crs++;
	if(translate_has_attributes_at(translate, crs, CHAR_UPPER))
		return 1;
	return 0;
}

// Assembly:
pushq %rbx
movslq 0x44(%rdi), %rax
movslq %esi, %rcx
leal 0x1(%rcx), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
decl %edx
leal -0x1(%rcx), %esi
leaq 0x1(%rcx), %r8
cmpq %rax, %r8
jge 0xe44f
movq 0x38(%rdi), %r9
movzwl (%r9,%r8,2), %r10d
incl %esi
incq %r8
cmpw (%r9,%rcx,2), %r10w
jne 0xe433
jmp 0xe451
movl %edx, %esi
leal 0x2(%rsi), %ecx
cmpl $-0x2, %esi
setl %dl
cmpl %ecx, %eax
setle %al
xorl %ebx, %ebx
orb %dl, %al
jne 0xe48d
movslq 0x8(%rdi), %rax
movq (%rdi), %rdx
movq 0x38(%rdi), %rsi
movq (%rdx,%rax,8), %rdi
movl %ecx, %eax
movzwl (%rsi,%rax,2), %esi
callq 0x1e99
testq %rax, %rax
je 0xe48d
movl 0x24(%rax), %ebx
shrl $0x7, %ebx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/utf-output.c
// Function: utf16_output
void utf16_output(FILE *output, const unichar *uchars, const int uchars_len)
{
	char *cchars;
	int cchars_len;

	if(uchars_len <= 0 || !uchars)
		return;

	cchars_len = uchars_len * 8;
	cchars = MALLOC(cchars_len + 1);

	utf16_convert_to_utf8(cchars, (cchars_len + 1), uchars, uchars_len, NULL);
	fprintf(output, "%s", cchars);
	fflush(output);

	FREE(cchars);
}

// Assembly:
testl %edx, %edx
setle %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x10aa8
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leal 0x1(,%r14,8), %r12d
movq %r12, %rdi
callq 0x1180
movq %rax, %r13
movq %rax, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x16c6
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1190
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/utf-output.c
// Function: utf16_output_char
void utf16_output_char(FILE *output, const unichar uchar)
{
	char cchars[16];
	unichar uchars[2];

	switch(uchar)
	{
	case 0xa0:
	case u' ':
	case u'\n':
	case u'\r':
	case u'\t':  fputs(" ", output);  break;
	default:

		uchars[0] = uchar;
		uchars[1] = 0;
		utf16_convert_to_utf8(cchars, 16, uchars, 2, NULL);
		fprintf(output, "%s", cchars);
	}

	fflush(output);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0x20, %esi
ja 0x10aca
movl %esi, %eax
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jb 0x10ad2
cmpl $0xa0, %esi
jne 0x10af1
leaq 0x367e(%rip), %rdi      # 0x14157
movq %rbx, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1190
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0xc(%rsp), %rdx
movw %si, (%rdx)
movw $0x0, 0x2(%rdx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x10, %esi
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x16c6
movq %r14, %rdi
jmp 0x10ad9
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/utf-output.c
// Function: utf16_output_char_escape
void utf16_output_char_escape(FILE *output, const unichar uchar)
{
	char cchars[16];
	unichar uchars[2];

	switch(uchar)
	{
	case 0xa0:   fputs("\\S", output);  break;
	case u' ':   fputs("\\s", output);  break;
	case u'\n':  fputs("\\n", output);  break;
	case u'\r':  fputs("\\r", output);  break;
	case u'\t':  fputs("\\t", output);  break;
	default:

		uchars[0] = uchar;
		uchars[1] = 0;
		utf16_convert_to_utf8(cchars, 16, uchars, 2, NULL);
		fprintf(output, "%s", cchars);
	}

	fflush(output);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0xc, %esi
jle 0x10b48
cmpl $0xd, %esi
je 0x10b5b
cmpl $0x20, %esi
je 0x10b64
cmpl $0xa0, %esi
jne 0x10b76
leaq 0x31ee(%rip), %rdi      # 0x13d34
jmp 0x10ba1
cmpl $0x9, %esi
je 0x10b6d
cmpl $0xa, %esi
jne 0x10b76
leaq 0x31e1(%rip), %rdi      # 0x13d3a
jmp 0x10ba1
leaq 0x31db(%rip), %rdi      # 0x13d3d
jmp 0x10ba1
leaq 0x31cc(%rip), %rdi      # 0x13d37
jmp 0x10ba1
leaq 0x31cc(%rip), %rdi      # 0x13d40
jmp 0x10ba1
leaq 0xc(%rsp), %rdx
movw %si, (%rdx)
movw $0x0, 0x2(%rdx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x10, %esi
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x16c6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1190
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/pattern-output.c
// Function: pattern_output
void pattern_output(const unichar *expr_data)
{
	printf("%d    \tlength\n", expr_data[0]);
	printf("%d    \tloops\n", expr_data[1]);
	if(expr_data[0] > 0 && expr_data[0] != PTN_END)
		pattern_output_expression(expr_data, 2);
	fflush(stdout);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl (%rdi), %esi
leaq 0x31da(%rip), %rdi      # 0x13da4
xorl %eax, %eax
callq 0x10c0
movzwl 0x2(%rbx), %esi
leaq 0x31d7(%rip), %rdi      # 0x13db3
xorl %eax, %eax
callq 0x10c0
movzwl (%rbx), %eax
testl %eax, %eax
je 0x10bfe
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x10bfe
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10c0e
movq 0x73d3(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
popq %rbx
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/pattern-output.c
// Function: pattern_print
void pattern_print(FILE *output, const unichar *expr_data, const char *attrs_chars_)
{
	set_attrs_chars(attrs_chars_);

	if(expr_data[0] > 0 && expr_data[0] != PTN_END)
		pattern_print_expression(output, expr_data, 2);
	fflush(output);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x113f8
movq %rdx, %r15
movq %rdx, %rdi
callq 0x10b0
testl %eax, %eax
jle 0x113f8
cmpl $0x20, %eax
movl $0x20, %ecx
cmovll %eax, %ecx
cmpl $0x2, %ecx
movl $0x1, %edx
cmovgel %ecx, %edx
leaq 0x6d60(%rip), %rdi      # 0x18150
movq %r15, %rsi
callq 0x1170
movzwl (%r14), %eax
testl %eax, %eax
je 0x11417
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x11417
movq %rbx, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x1106b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/conversion-output.c
// Function: conversion_output
void conversion_output(FILE *output, const struct conversion *conversion)
{
	unichar uchar, cell;
	int x, y;

	if(!conversion)
		return;

	fprintf(output, "%s\n", conversion->file_name);

	fputs("unknown:  ", output);
	utf16_output_char_escape(output, conversion->unknown);
	fputs("\n", output);

	fputs("\n", output);

	cell = 0x2800;
	for(y = 0; y < 16; y++)
	{
		for(x = 0; x < 16; x++)
		{
			uchar = conversion->converts[(y * 16) + x];
			if(uchar != cell)
				utf16_output_char(output, uchar);
			else
				fputs(" ", output);
			utf16_output_char(output, cell);
			if(x != 15)
				fputs(" ", output);
			cell++;
		}
		fputs("\n", output);
	}

	fflush(output);
}

// Assembly:
testq %rsi, %rsi
je 0x11552
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
leaq 0x263b(%rip), %rsi      # 0x13aa8
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x1150
leaq 0x2a50(%rip), %rdi      # 0x13ece
movq %rbx, %rsi
callq 0x1100
movzwl 0x210(%r14), %esi
movq %rbx, %rdi
callq 0x10b1e
leaq 0x2aa3(%rip), %r15      # 0x13f40
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
addq $0x10, %r14
movw $0x2800, %bp            # imm = 0x2800
leaq 0x2c95(%rip), %r12      # 0x14157
movq %r13, (%rsp)
movzwl %bp, %ebp
xorl %r15d, %r15d
leaq (%r15,%rbp), %r13
movzwl (%r14,%r15,2), %eax
cmpw %ax, %r13w
jne 0x114e8
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
jmp 0x114f3
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
movzwl %r13w, %esi
movq %rbx, %rdi
callq 0x10aa9
cmpq $0xf, %r15
je 0x11510
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
incq %r15
cmpq $0x10, %r15
jne 0x114cc
leaq 0x2a20(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
callq 0x1100
movq (%rsp), %r13
incq %r13
addq $0x20, %r14
addl %r15d, %ebp
cmpq $0x10, %r13
jne 0x114c2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/table-output.c
// Function: subpattern_output
static void subpattern_output(FILE *output, const struct subpattern *subpattern)
{
	int i;

	if(!subpattern)
		return;

	subpattern_output(output, subpattern->nxt);

	fputs("   ", output);

	utf16_output(output, subpattern->tag, subpattern->tag_len);

	fputs("   ", output);

	utf16_output(output, subpattern->src_data, subpattern->src_len);

	for(i = 0; i < subpattern->src_len; i++)
	{
		if(subpattern->src_data[i] == u'\\')
		{
			i++;
			continue;
		}
		if(subpattern->src_data[i] == u'@')
		{
			fputs("   ", output);
			pattern_print(output, subpattern->expr_data, attrs_chars);
			break;
		}
	}

	fputs("\n", output);
}

// Assembly:
testq %rsi, %rsi
je 0x11e0f
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0x11d8f
leaq 0x23a7(%rip), %r15      # 0x14155
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
movq 0x8(%r14), %rsi
movl 0x20(%r14), %edx
movq %rbx, %rdi
callq 0x10a3c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
movq 0x18(%r14), %rsi
movl 0x28(%r14), %edx
movq %rbx, %rdi
callq 0x10a3c
movl 0x28(%r14), %eax
testl %eax, %eax
jle 0x11e32
movq 0x18(%r14), %rcx
xorl %edx, %edx
movslq %edx, %rsi
movzwl (%rcx,%rsi,2), %esi
cmpl $0x5c, %esi
je 0x11e05
cmpl $0x40, %esi
jne 0x11e07
jmp 0x11e10
incl %edx
incl %edx
cmpl %eax, %edx
jl 0x11df2
jmp 0x11e32
retq
leaq 0x233e(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
movq 0x10(%r14), %rsi
leaq 0x8476(%rip), %rdx      # 0x1a2a0
movq %rbx, %rdi
callq 0x113b4
leaq 0x2107(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/table-output.c
// Function: filter_output
static void filter_output(FILE *output, const struct filter *filter)
{
	if(!filter)
		return;

	filter_output(output, filter->nxt);

	fputs("   ", output);
	if(filter->name)
		utf16_output(output, filter->name, filter->name_len);
	else
		fputs("   -", output);

	fputs("   ", output);
	if(filter->before)
		pattern_print_reverse(output, filter->before, filter->before_len);
	else
		fputs("-", output);

	fputs("   ", output);
	if(filter->after)
		pattern_print(output, filter->after, attrs_chars);
	else
		fputs("-", output);

	fputs("\n", output);
}

// Assembly:
testq %rsi, %rsi
je 0x11e83
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0x11e46
leaq 0x22f1(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
movq 0x20(%r14), %rsi
testq %rsi, %rsi
je 0x11e84
movl 0x28(%r14), %edx
movq %rbx, %rdi
callq 0x10a3c
jmp 0x11e93
retq
leaq 0x22ba(%rip), %rdi      # 0x14145
movq %rbx, %rsi
callq 0x1100
leaq 0x22bb(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x11eb9
movl 0x18(%r14), %edx
movq %rbx, %rdi
callq 0x121f3
jmp 0x11ec8
leaq 0x2288(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x2286(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
movq 0x10(%r14), %rsi
testq %rsi, %rsi
je 0x11ef1
leaq 0x83b9(%rip), %rdx      # 0x1a2a0
movq %rbx, %rdi
callq 0x113b4
jmp 0x11f00
leaq 0x2250(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x2039(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/outputs/table-output.c
// Function: pattern_print_reverse
static void pattern_print_reverse(FILE *output, unichar *expr_data, const int expr_len)
{
	unichar *expr_rev;

	expr_rev = MALLOC(expr_len * sizeof(unichar));
	memcpy(expr_rev, expr_data, expr_len * sizeof(unichar));
	pattern_reverse(expr_rev);
	pattern_print(output, expr_rev, attrs_chars);
	FREE(expr_rev);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %r15
addq %r15, %r15
movq %r15, %rdi
callq 0x1180
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1170
movq %r12, %rdi
callq 0x85c5
leaq 0x8071(%rip), %rdx      # 0x1a2a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x113b4
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output
void debug_output(const unichar *uchars, const int uchars_len)
{
	char cchars[0x4000];
	int cchars_len;

	if(uchars_len <= 0 || !uchars)
	{
		puts("");
		fflush(stdout);
		return;
	}

	memset(cchars, 0, 0x4000);
	cchars_len = utf16_convert_to_utf8(cchars, 0x4000, uchars, uchars_len, NULL);
	cchars_convert_spaces(cchars, cchars_len);

	printf("%s", cchars);
	fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4000, %rsp           # imm = 0x4000
testl %esi, %esi
setg %al
testq %rdi, %rdi
setne %cl
testb %al, %cl
je 0x122d5
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x1110
movq %r15, %rdi
movl $0x4000, %esi           # imm = 0x4000
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x16c6
testl %eax, %eax
jle 0x122c2
movl %eax, %eax
xorl %ecx, %ecx
movzbl (%rsp,%rcx), %edx
leal -0x9(%rdx), %esi
cmpl $0x2, %esi
jb 0x122b6
cmpl $0xd, %edx
je 0x122b6
testl %edx, %edx
jne 0x122ba
jmp 0x122c2
movb $0x20, (%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x1229f
leaq 0x17c9(%rip), %rdi      # 0x13a92
movq %rsp, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x122df
movl $0xa, %edi
callq 0x1050
movq 0x5cf2(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
callq 0x1190
addq $0x4000, %rsp           # imm = 0x4000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_line
void debug_output_line(const unichar *uchars, const int uchars_len)
{
	char cchars[0x4000];
	int cchars_len;

	rewind(stdout);

	if(uchars_len <= 0 || !uchars)
	{
		puts("");
		fflush(stdout);
		return;
	}

	memset(cchars, 0, 0x4000);
	cchars_len = utf16_convert_to_utf8(cchars, 0x4000, uchars, uchars_len, NULL);
	cchars_convert_spaces(cchars, cchars_len);

	printf("%s\n", cchars);
	fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4008, %rsp           # imm = 0x4008
movl %esi, %ebx
movq %rdi, %r14
movq 0x5cc3(%rip), %r12      # 0x17fd8
movq (%r12), %rdi
callq 0x10d0
testl %ebx, %ebx
setg %al
testq %r14, %r14
setne %cl
testb %al, %cl
je 0x12389
movq %rsp, %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x1110
movq %r15, %rdi
movl $0x4000, %esi           # imm = 0x4000
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x16c6
testl %eax, %eax
jle 0x1237f
movl %eax, %eax
xorl %ecx, %ecx
movzbl (%rsp,%rcx), %edx
leal -0x9(%rdx), %esi
cmpl $0x2, %esi
jb 0x12373
cmpl $0xd, %edx
je 0x12373
testl %edx, %edx
jne 0x12377
jmp 0x1237f
movb $0x20, (%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x1235c
movq %rsp, %rdi
callq 0x1090
jmp 0x12393
movl $0xa, %edi
callq 0x1050
movq (%r12), %rdi
callq 0x1190
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_pad
void debug_output_pad(const unichar *uchars, const int uchars_len)
{
	char cchars[0x4000];
	int cchars_len, i;

	if(uchars_len <= 0 || !uchars)
	{
		puts("");
		fflush(stdout);
		return;
	}

	memset(cchars, 0, 0x4000);
	cchars_len = utf16_convert_to_utf8(cchars, 0x4000, uchars, uchars_len, NULL);
	cchars_convert_spaces(cchars, cchars_len);

	printf("%s", cchars);
	for(i = strlen(cchars); i < uchars_len; i++)
		printf(" ");
	fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4000, %rsp           # imm = 0x4000
testl %esi, %esi
setg %al
testq %rdi, %rdi
setne %cl
testb %al, %cl
je 0x12451
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x1110
movq %r15, %rdi
movl $0x4000, %esi           # imm = 0x4000
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x16c6
testl %eax, %eax
jle 0x12421
movl %eax, %eax
xorl %ecx, %ecx
movzbl (%rsp,%rcx), %edx
leal -0x9(%rdx), %esi
cmpl $0x2, %esi
jb 0x12415
cmpl $0xd, %edx
je 0x12415
testl %edx, %edx
jne 0x12419
jmp 0x12421
movb $0x20, (%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x123fe
leaq 0x166a(%rip), %rdi      # 0x13a92
movq %rsp, %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movq %r14, %rdi
callq 0x10b0
subl %eax, %ebx
jle 0x1245b
movl $0x20, %edi
callq 0x1050
decl %ebx
jne 0x12441
jmp 0x1245b
movl $0xa, %edi
callq 0x1050
movq 0x5b76(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
callq 0x1190
addq $0x4000, %rsp           # imm = 0x4000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_chomp
void debug_output_chomp(const unichar *uchars, const int uchars_len)
{
	char cchars[0x4000], *crs;
	int cchars_len;

	if(uchars_len <= 0 || !uchars)
	{
		puts("");
		fflush(stdout);
		return;
	}

	memset(cchars, 0, 0x4000);
	cchars_len = utf16_convert_to_utf8(cchars, 0x4000, uchars, uchars_len, NULL);
	cchars_convert_spaces(cchars, cchars_len);

	for(crs = cchars; *crs; crs++);
	crs--;
	while(crs >= cchars && (*crs == '\n' || *crs == '\r'))
		*crs-- = 0;
	printf("%s", cchars);
	fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x4000, %rsp           # imm = 0x4000
testl %esi, %esi
setg %al
testq %rdi, %rdi
setne %cl
testb %al, %cl
je 0x12528
movl %esi, %ebp
movq %rdi, %r14
movq %rsp, %rbx
movl $0x4000, %edx           # imm = 0x4000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1110
movq %rbx, %rdi
movl $0x4000, %esi           # imm = 0x4000
movq %r14, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x16c6
testl %eax, %eax
jle 0x124ec
movl %eax, %eax
xorl %ecx, %ecx
movzbl (%rsp,%rcx), %edx
leal -0x9(%rdx), %esi
cmpl $0x2, %esi
jb 0x124e0
cmpl $0xd, %edx
je 0x124e0
testl %edx, %edx
jne 0x124e4
jmp 0x124ec
movb $0x20, (%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x124c9
leaq -0x2(%rsp), %rax
cmpb $0x0, 0x2(%rax)
leaq 0x1(%rax), %rax
jne 0x124f1
jmp 0x12510
movzbl (%rax), %ecx
cmpl $0xd, %ecx
je 0x1250a
cmpl $0xa, %ecx
jne 0x12515
movb $0x0, (%rax)
decq %rax
cmpq %rbx, %rax
jae 0x124fd
leaq 0x1576(%rip), %rdi      # 0x13a92
movq %rsp, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x12532
movl $0xa, %edi
callq 0x1050
movq 0x5a9f(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
callq 0x1190
addq $0x4000, %rsp           # imm = 0x4000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_uchar
void debug_output_uchar(const unichar uchar)
{
	char cchars[16];
	unichar uchars[2];

	switch(uchar)
	{
	case 0xa0:
	case u' ':
	case u'\n':
	case u'\r':
	case u'\t':  printf(" ");  break;
	default:

		uchars[0] = uchar;
		uchars[1] = 0;
		utf16_convert_to_utf8(cchars, 16, uchars, 2, NULL);
		printf("%s", cchars);
	}

	fflush(stdout);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpl $0x20, %edi
ja 0x12569
movl %edi, %eax
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jb 0x12571
cmpl $0xa0, %edi
jne 0x12590
movl $0x20, %edi
callq 0x1050
movq 0x5a56(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
callq 0x1190
addq $0x20, %rsp
popq %rbx
retq
leaq 0xc(%rsp), %rdx
movw %di, (%rdx)
movw $0x0, 0x2(%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x16c6
leaq 0x14d3(%rip), %rdi      # 0x13a92
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x1257b
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_uchar_escape
void debug_output_uchar_escape(const unichar uchar)
{
	char cchars[16];
	unichar uchars[2];

	switch(uchar)
	{
	case 0xa0:   printf("\\S");  break;
	case u' ':   printf("\\s");  break;
	case u'\n':  printf("\\n");  break;
	case u'\r':  printf("\\r");  break;
	case u'\t':  printf("\\t");  break;
	default:

		uchars[0] = uchar;
		uchars[1] = 0;
		utf16_convert_to_utf8(cchars, 16, uchars, 2, NULL);
		printf("%s", cchars);
	}

	fflush(stdout);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpl $0xc, %edi
jle 0x125f0
cmpl $0xd, %edi
je 0x12603
cmpl $0x20, %edi
je 0x1260c
cmpl $0xa0, %edi
jne 0x12638
leaq 0x1746(%rip), %rdi      # 0x13d34
jmp 0x1261c
cmpl $0x9, %edi
je 0x12615
cmpl $0xa, %edi
jne 0x12638
leaq 0x1739(%rip), %rdi      # 0x13d3a
jmp 0x1261c
leaq 0x1733(%rip), %rdi      # 0x13d3d
jmp 0x1261c
leaq 0x1724(%rip), %rdi      # 0x13d37
jmp 0x1261c
leaq 0x1724(%rip), %rdi      # 0x13d40
xorl %eax, %eax
callq 0x10c0
movq 0x59ae(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
callq 0x1190
addq $0x20, %rsp
popq %rbx
retq
leaq 0xc(%rsp), %rdx
movw %di, (%rdx)
movw $0x0, 0x2(%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x16c6
leaq 0x142b(%rip), %rdi      # 0x13a92
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x12623
// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/debug/debug.c
// Function: debug_output_convert_private
void debug_output_convert_private(const struct table *table, const unichar *uchars, const int uchars_len)
{
	unichar convert[0x4000];

	if(uchars_len > 0x3fff)
	{
		log_message(LOG_ERROR, "TOO LONG");
		return;
	}

	memset(convert, 0, 0x4000 * sizeof(unichar));
	memcpy(convert, uchars, uchars_len * sizeof(unichar));
	table_convert_markers(table, convert, uchars_len);
	utf16_output(stdout, convert, uchars_len);
}

// Assembly:
cmpl $0x4000, %edx           # imm = 0x4000
jl 0x1268e
leaq 0x1ae7(%rip), %rsi      # 0x14169
movl $0x6, %edi
xorl %eax, %eax
jmp 0xa36c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8008, %rsp           # imm = 0x8008
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %r12
movl $0x8000, %edx           # imm = 0x8000
movq %r12, %rdi
xorl %esi, %esi
callq 0x1110
movslq %ebx, %rdx
addq %rdx, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1170
testq %r14, %r14
je 0x12753
testl %ebx, %ebx
jle 0x12785
movl %ebx, %eax
movzwl 0x1e8(%r14), %ecx
xorl %edx, %edx
movzwl (%rsp,%rdx,2), %esi
movw $0x27d8, %di            # imm = 0x27D8
cmpw %cx, %si
je 0x12745
movw $0x27ea, %di            # imm = 0x27EA
cmpw 0x1ea(%r14), %si
je 0x12745
movw $0x27eb, %di            # imm = 0x27EB
cmpw 0x1ec(%r14), %si
je 0x12745
movw $0x2605, %di            # imm = 0x2605
cmpw 0x1ee(%r14), %si
je 0x12745
movw $0x27e0, %di            # imm = 0x27E0
cmpw 0x1f0(%r14), %si
je 0x12745
movw $0x27ca, %di            # imm = 0x27CA
cmpw 0x1f2(%r14), %si
je 0x12745
movw $0x2623, %di            # imm = 0x2623
cmpw 0x1f4(%r14), %si
jne 0x12749
movw %di, (%rsp,%rdx,2)
incq %rdx
cmpq %rdx, %rax
jne 0x126e4
jmp 0x12785
testl %ebx, %ebx
jle 0x12785
movl %ebx, %eax
xorl %ecx, %ecx
leaq 0x1a10(%rip), %rdx      # 0x14172
movzwl (%rsp,%rcx,2), %esi
addl $0xfff, %esi            # imm = 0xFFF
cmpw $0x6, %si
ja 0x1277d
movzwl %si, %esi
movzwl (%rdx,%rsi,2), %esi
movw %si, (%rsp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x12762
movq 0x584c(%rip), %rax      # 0x17fd8
movq (%rax), %rdi
movq %rsp, %rsi
movl %ebx, %edx
callq 0x10a3c
addq $0x8008, %rsp           # imm = 0x8008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_ecmg.c
// Function: main.cold.3
static void handle_channel_close(uint8_t *p_tlv)
{
    uint16_t i_wanted_channelid = ecmg_find_channelid(p_tlv, 0);
    int i;

    if (i_wanted_channelid != i_channelid) {
        send_channel_error(i_wanted_channelid, 0x6);
        return;
    }

    fprintf(stderr, "stopping channel ID=0x%x\n", i_channelid);

    b_init = true;

    for (i = 0; i < i_nb_streams; i++)
        free(pp_streams[i]);
    free(pp_streams);
    pp_streams = NULL;
    i_nb_streams = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzwl %di, %edx
movq 0x56a0(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x39d1(%rip), %rsi      # 0x5333
xorl %eax, %eax
callq 0x1070
movb $0x0, 0x5718(%rip)      # 0x7088
movslq 0x5715(%rip), %rbx      # 0x708c
testq %rbx, %rbx
jle 0x1997
movq 0x570d(%rip), %r14      # 0x7090
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %rbx
jne 0x1986
movq 0x56f2(%rip), %rdi      # 0x7090
callq 0x1030
andq $0x0, 0x56e5(%rip)      # 0x7090
andl $0x0, 0x56da(%rip)      # 0x708c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_ecmg.c
// Function: read_wrapper
ssize_t read_wrapper(void *p_buf, size_t i_count)
{
    size_t i_received = 0;

    do {
        ssize_t i_read = read(STDIN_FILENO, p_buf + i_received,
                              i_count - i_received);
        if (i_read < 0 && errno == EINTR) continue;
        if (i_read < 0) {
            fprintf(stderr, "read error, aborting (%m)");
            return i_read;
        }
        if (!i_read) {
            fprintf(stderr, "read end-of-file, aborting");
            return i_read;
        }
        i_received += i_read;
    } while (i_received < i_count);

    return i_count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq (%r14,%r13), %rsi
movq %rbx, %rdx
subq %r13, %rdx
xorl %edi, %edi
callq 0x1060
movq %rax, %r12
testq %rax, %rax
js 0x1bc0
je 0x1bdf
addq %r12, %r13
xorl %ecx, %ecx
jmp 0x1bcf
callq 0x1040
movl $0x3, %ecx
cmpl $0x4, (%rax)
jne 0x1bee
cmpl $0x3, %ecx
je 0x1bd8
testl %ecx, %ecx
jne 0x1c00
cmpq %rbx, %r13
jb 0x1b9e
jmp 0x1bfd
callq 0x1606
movl $0x1, %ecx
xorl %r15d, %r15d
jmp 0x1bcf
callq 0x1622
movl $0x1, %ecx
movq %r12, %r15
jmp 0x1bcf
movq %rbx, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_ecmg.c
// Function: write_wrapper
ssize_t write_wrapper(const void *p_buf, size_t i_count)
{
    size_t i_sent = 0;

    do {
        ssize_t i_written = write(STDOUT_FILENO,
                                  p_buf + i_sent, i_count - i_sent);
        if (i_written < 0 && errno == EINTR) continue;
        if (i_written < 0) {
            fprintf(stderr, "write error (%m)");
            return i_written;
        }
        i_sent += i_written;
    } while (i_sent < i_count);

    return i_count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq (%r14,%r13), %rsi
movq %rbx, %rdx
subq %r13, %rdx
movl $0x1, %edi
callq 0x1050
movq %rax, %r12
testq %rax, %rax
js 0x1c42
addq %r12, %r13
xorl %ecx, %ecx
jmp 0x1c51
callq 0x1040
movl $0x3, %ecx
cmpl $0x4, (%rax)
jne 0x1c61
cmpl $0x3, %ecx
je 0x1c5a
testl %ecx, %ecx
jne 0x1c73
cmpq %rbx, %r13
jb 0x1c1f
jmp 0x1c70
callq 0x163a
movl $0x1, %ecx
movq %r12, %r15
jmp 0x1c51
movq %rbx, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/./bitstream/dvb/sim.h
// Function: tlv_find_param
static inline uint8_t *tlv_find_param(uint8_t *p_tlv, uint16_t i_type,
                                      uint16_t n)
{
    uint8_t *p_param;
    uint8_t j = 0;

    while ((p_param = tlv_get_param(p_tlv, j)) != NULL) {
        j++;
        if (tlv_get_type(p_param) == i_type) {
            if (!n) return p_param;
            n--;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbx
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0x4(%rdi), %rcx
testl %edx, %edx
sete %r8b
xorl %edx, %edx
xorl %r9d, %r9d
movq %rcx, %r10
testb %r9b, %r9b
je 0x319f
movzbl %r9b, %r11d
movq %rcx, %r10
movq %r10, %rbx
subq %rdi, %rbx
cmpq %rax, %rbx
jg 0x31b2
movzwl 0x2(%r10), %ebx
rolw $0x8, %bx
movzwl %bx, %ebx
addq %rbx, %r10
addq $0x4, %r10
decw %r11w
jne 0x317b
movq %r10, %r11
subq %rdi, %r11
addq $-0x4, %r11
cmpq %rax, %r11
cmovgeq %rdx, %r10
jmp 0x31b5
xorl %r10d, %r10d
testq %r10, %r10
je 0x31d5
incb %r9b
movzwl (%r10), %r10d
rolw $0x8, %r10w
cmpw %si, %r10w
jne 0x316c
testb $0x1, %r8b
movb $0x1, %r8b
je 0x316c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_ecmg.c
// Function: build_ecm
static void build_ecm(stream_t *p_stream, uint16_t i_cp_number,
                      uint8_t * const ppi_cw[2],
                      uint8_t *p_accesscrit_param)
{
    /* you will want to customize this function */
    static const uint8_t pi_xor[8] =
        {0x42, 0x12, 0x02, 0x24, 0x21, 0x20, 0x66, 0x88};
    PSI_DECLARE(p_section);
    uint8_t *pi_ecm;
    int i, j;

    psi_init(p_section, false);
    psi_set_tableid(p_section, 0x80 | (i_cp_number & 0x1));
    psi_set_length(p_section, 16);

    pi_ecm = p_section + 3;
    for (i = 0; i < 2; i++)
        for (j = 0; j < 8; j++)
            pi_ecm[i * 8 + j] = ppi_cw[i][j] ^ pi_xor[j];

    send_ecm(p_stream, i_cp_number, p_section,
             psi_get_length(p_section) + PSI_HEADER_SIZE);
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
leaq 0x3(%rsp), %rax
movw $0x1070, -0x2(%rax)     # imm = 0x1070
movl %esi, %ecx
andb $0x1, %cl
orb $-0x80, %cl
movb %cl, -0x3(%rax)
movb $0x70, -0x2(%rax)
xorl %r8d, %r8d
leaq 0x16f4(%rip), %rcx      # 0x543d
movq (%rdx,%r8,8), %r9
xorl %r10d, %r10d
movb (%r10,%rcx), %r11b
xorb (%r9,%r10), %r11b
movb %r11b, (%rax,%r10)
incq %r10
cmpq $0x8, %r10
jne 0x3d50
leaq 0x1(%r8), %r9
addq $0x8, %rax
testq %r8, %r8
movq %r9, %r8
je 0x3d49
movzwl %si, %esi
movq %rsp, %rdx
movl $0x13, %ecx
callq 0x3d8d
addq $0x408, %rsp            # imm = 0x408
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal.c
// Function: help
void help(){
  printf("Usage:\n");
  printf("./feistal -i <infile_name> -o <outfile_name> -<op>\n\
      -i      input file name\n\
      -o      output file name\noption (op): \n\
      -e      encrypt given file\n\
      -d      decrypt given file\n\n");
  printf("Note: Use ./feistal -g to generate 64 bits keys. ");
  printf("Keys should be 64 bits i.e. 8 characters.\n\n");
  return;
}

// Assembly:
pushq %rax
leaq 0xe2e(%rip), %rdi       # 0x2042
callq 0x1040
leaq 0xe29(%rip), %rdi       # 0x2049
callq 0x1040
leaq 0xdd8(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1080
leaq 0xed0(%rip), %rdi       # 0x210a
popq %rax
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal.c
// Function: fesital
void fesital(FILE *ifile, FILE *ofile, int op)
{
  uint32_t keys[ROUNDS] = { 0xDEAD, 0xBEEF, 0xBAAD, 0xF00D, 0xFEED, 0xFACE, 0xCAFE, 0xBABE, 0xDEAD, 0xBABE, 0xD15, 0xEA5E, 0xDECE, 0xA5ED, 0xBAAD, 0xAC1D };
  char *key = getKey();
  if(!generateSubKeys(key, keys)){
    help();
    printf("Error: key generation getting failed\n");
    return;
  }
  switch(op){
    case 0:
      encrypt_ecb(ifile, ofile, keys);
      printf("Encrypted file is generated\n");
      break;
    case 1:
      decrypt_ecb(ifile, ofile, keys);
      printf("Decrypted file is generated\n");
      break;
    default:
      printf("Invalid option\n");
      break;
  }
  free(key);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movaps 0xf81(%rip), %xmm0      # 0x21e0
leaq 0x20(%rsp), %r12
movaps %xmm0, 0x30(%r12)
movaps 0xf5f(%rip), %xmm0      # 0x21d0
movaps %xmm0, 0x20(%r12)
movaps 0xf42(%rip), %xmm0      # 0x21c0
movaps %xmm0, 0x10(%r12)
movaps 0xf25(%rip), %xmm0      # 0x21b0
movaps %xmm0, (%r12)
movl $0xa, %edi
callq 0x10c0
leaq 0x18(%rsp), %r15
movq %rax, (%r15)
leaq 0x10(%rsp), %r13
movq $0xa, (%r13)
xorl %ebx, %ebx
movq %rbx, (%rax)
movw $0x0, 0x8(%rax)
leaq 0xd75(%rip), %rdi       # 0x2036
xorl %eax, %eax
callq 0x1080
movq 0x2d11(%rip), %rax      # 0x3fe0
movq (%rax), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x10e0
movq (%r15), %r15
movq %r15, %rdi
callq 0x1070
cmpq $0x9, %rax
cmovneq %rbx, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x1518
testl %eax, %eax
je 0x1323
cmpl $0x1, %ebp
je 0x1336
testl %ebp, %ebp
jne 0x1351
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x1374
leaq 0xe55(%rip), %rdi       # 0x2176
jmp 0x1358
callq 0x120c
leaq 0xe06(%rip), %rdi       # 0x2135
callq 0x1040
jmp 0x1365
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x1444
leaq 0xe0b(%rip), %rdi       # 0x215a
jmp 0x1358
leaq 0xe3a(%rip), %rdi       # 0x2192
callq 0x1040
movq %r15, %rdi
callq 0x1030
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal_encrypt.c
// Function: encrypt_ecb
void encrypt_ecb(FILE *infile, FILE *outfile, uint32_t keys[])
{
  uint32_t left, right;
  size_t ret;
  uint64_t sblock;
  memset(&sblock,0,sizeof(sblock));
  while(fread(&sblock, sizeof(sblock), 1, infile)){    
    left = (sblock>>32);
    right = ((sblock<<32)>>32);
    sblock = encrypt(left, right, keys);
    fwrite(&sblock,1,sizeof(sblock), outfile);
    memset(&sblock,0,sizeof(sblock));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x1050
testq %rax, %rax
je 0x1434
leaq 0x8(%rsp), %r12
movq 0x8(%rsp), %rax
movq %rax, %r13
shrq $0x20, %r13
movq $-0x10, %r14
movl %eax, %ebp
movl 0x40(%rbx,%r14,4), %esi
movl %eax, %edi
callq 0x1540
xorl %eax, %r13d
movl %r13d, %eax
incq %r14
cmovel %ebp, %eax
cmovnel %ebp, %r13d
jne 0x13cc
shlq $0x20, %r13
movl %eax, %eax
orq %r13, %rax
movq %rax, 0x8(%rsp)
movl $0x1, %esi
movl $0x8, %edx
movq %r12, %rdi
movq 0x10(%rsp), %rcx
callq 0x10f0
movq $0x0, 0x8(%rsp)
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x1050
testq %rax, %rax
jne 0x13b9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal_decrypt.c
// Function: decrypt_ecb
void decrypt_ecb(FILE *infile, FILE *outfile, uint32_t keys[])
{
  uint32_t left, right;
  size_t ret;
  uint64_t sblock;
  memset(&sblock, 0, sizeof(sblock));
  while(fread(&sblock, sizeof(sblock), 1, infile)){
    left = (sblock>>32);
    right = (sblock<<32)>>32;
    sblock = decrypt(left, right, keys);
    fwrite(&sblock, 1, sizeof(sblock), outfile);
    memset(&sblock, 0, sizeof(sblock));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x1050
testq %rax, %rax
je 0x1507
leaq 0x8(%rsp), %r12
movq 0x8(%rsp), %rax
movq %rax, %r13
shrq $0x20, %r13
movl $0xf, %r14d
movl %eax, %ebp
movl (%rbx,%r14,4), %esi
movl %eax, %edi
callq 0x1540
xorl %eax, %r13d
subq $0x1, %r14
movl %r13d, %eax
cmovbl %ebp, %eax
cmovael %ebp, %r13d
cmpq $-0x1, %r14
jne 0x149b
shlq $0x20, %r13
movl %eax, %eax
orq %r13, %rax
movq %rax, 0x8(%rsp)
movl $0x1, %esi
movl $0x8, %edx
movq %r12, %rdi
movq 0x10(%rsp), %rcx
callq 0x10f0
movq $0x0, 0x8(%rsp)
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x1050
testq %rax, %rax
jne 0x1489
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/keymgmt.c
// Function: generateSubKeys
int generateSubKeys(char *key, uint32_t keys[]){
  int k=0;
  if(key==NULL)
    return 0;
  for(int i=0;(i<ROUNDS) &&((key[k] != '\0')||(key[k] != '\n'));i+=2, k++){
    keys[i] = (uint32_t)key[k]^keys[i];
    keys[i+1] = (uint32_t)key[k]^keys[i+1];
  }
  return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x153d
xorl %eax, %eax
movsbl (%rdi,%rax), %ecx
xorl %ecx, (%rsi,%rax,8)
movsbl (%rdi,%rax), %ecx
xorl %ecx, 0x4(%rsi,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x151f
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/keymgmt.c
// Function: generateKey
void generateKey(){
  int i=0;
  srand(time(0));
  char key[10]={'\0'};
  while(i!=8){
    key[i] =(char)rand()%256;
    if(inRange(key[i]))
      i++;
  }
  printf("Generated Key: %s\n", key);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
movl %eax, %edi
callq 0x1090
movw $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
callq 0x1100
movl %ebx, %ecx
movb %al, (%rsp,%rcx)
addb $-0x21, %al
cmpb $0x5e, %al
adcl $0x0, %ebx
cmpl $0x8, %ebx
jne 0x1569
leaq 0xc6a(%rip), %rdi       # 0x21f0
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1080
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/des/feistal_algo/main.c
// Function: main
int main(int argc, char *argv[])
{
  FILE *infile, *outfile;
  char *key;
  int op;
  if((argc==2)&&(!strcmp(argv[1],"-g"))){
    generateKey();
    return 0;
  }

  if((argc < 5)){
    help();
    return 0;
  }

  for(int i=1; i< argc ; i+=2){
    if(!strcmp(argv[i],"-i")){
      printf("Input file: %s\n", argv[i+1]);
      infile = fopen(argv[i+1],"r");
      if(!infile){
        printf("Error: in-valid file name\n");
        help();
        return 0;
      }
    }
    else if(!strcmp(argv[i],"-o")){
      printf("Output File: %s\n",argv[i+1]);
      outfile = fopen(argv[i+1],"w+");
    }
    else if(!strcmp(argv[i],"-e")|| !strcmp(argv[i],"-d")){
      if(argv[i][1] =='e'){
        printf("Encrypting the file...\n");
        op = ENCRYPT;
      }else if(argv[i][1] =='d'){
        op = DECRYPT;
        printf("Decrypting the file...\n");
      }else{
        help();
        return 0;
      }
    }
  }
  fesital(infile, outfile, op);
  fclose(infile);
  fclose(outfile);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jne 0x15c8
movq 0x8(%rbx), %rdi
leaq 0xc48(%rip), %rsi       # 0x2203
callq 0x10a0
testl %eax, %eax
je 0x16e3
cmpl $0x5, %ebp
jge 0x15d9
xorl %eax, %eax
callq 0x120c
jmp 0x172a
movb $0x1, %r13b
movl $0x1, %r15d
movq (%rbx,%r15,8), %r14
movq %r14, %rdi
leaq 0xc16(%rip), %rsi       # 0x2206
callq 0x10a0
testl %eax, %eax
je 0x1663
movq %r14, %rdi
leaq 0xc18(%rip), %rsi       # 0x221b
callq 0x10a0
testl %eax, %eax
je 0x1691
movq %r14, %rdi
leaq 0xc18(%rip), %rsi       # 0x2232
callq 0x10a0
testl %eax, %eax
je 0x163a
movq %r14, %rdi
leaq 0xc08(%rip), %rsi       # 0x2235
callq 0x10a0
testl %eax, %eax
jne 0x16d0
movzbl 0x1(%r14), %eax
cmpl $0x64, %eax
je 0x16bc
cmpl $0x65, %eax
jne 0x16f9
leaq 0xc15(%rip), %rdi       # 0x2269
callq 0x1040
movl $0x0, 0xc(%rsp)
jmp 0x16d0
movq 0x8(%rbx,%r15,8), %rsi
leaq 0xb9a(%rip), %rdi       # 0x2209
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx,%r15,8), %rdi
leaq 0xb97(%rip), %rsi       # 0x2219
callq 0x10d0
testq %rax, %rax
je 0x16ea
movq %rax, %r12
jmp 0x16d0
movq 0x8(%rbx,%r15,8), %rsi
leaq 0xb81(%rip), %rdi       # 0x221e
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx,%r15,8), %rdi
leaq 0xb7f(%rip), %rsi       # 0x222f
callq 0x10d0
movq %rax, 0x10(%rsp)
jmp 0x16d0
leaq 0xb8f(%rip), %rdi       # 0x2252
callq 0x1040
movl $0x1, 0xc(%rsp)
addq $0x2, %r15
cmpl %ebp, %r15d
setl %r13b
jl 0x15e2
jmp 0x1700
callq 0x1545
jmp 0x172a
leaq 0xb47(%rip), %rdi       # 0x2238
callq 0x1040
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x120c
testb $0x1, %r13b
jne 0x172a
movq %r12, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
movl 0xc(%rsp), %edx
callq 0x1240
movq %r12, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1060
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq