LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: take_item
extern void take_item(int room_id, char *word1, char *word2)
{
	char *adj;
	char *name;
	int item_num;

	putchar('\n');

	if (word1 == NULL) {
		printf("Take what?\n");
		return;
	}
	
	/* assign an adjective if possible */
	assign_name(&word1, &word2, &adj, &name);
		
	/* find out if given name is ambiguous */
	item_num = in_room(room_id, adj, name);
	
	/* if none were found, the item is not present */
	/* if only one was found, it's not ambiguous */
	if (item_num == -1) {
		printf("There is no ");
		if (adj != NULL) printf("%s ",adj);
		printf("%s here.\n",name);
		return;
	} else if (item_num == -2) {
		printf("Which %s do you want to take?\n",name);
		return;
	}

	/* take item if possible */
	if (items[item_num].takeable == YES) {
		items[item_num].location = -1;
		inventory[item_num] = 1;
		printf("You took the ");
		if (items[item_num].item_adj != NULL)
			printf("%s ",items[item_num].item_adj);
		printf("%s.\n",name);
	} else {
		printf("You cannot take the %s!\n",name);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
movl $0xa, %edi
callq 0x3050
testq %rbx, %rbx
je 0x5aad
testq %r14, %r14
movq %rbx, %r15
cmoveq %r14, %r15
cmovneq %r14, %rbx
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5b40
cmpl $-0x2, %eax
je 0x5ac3
cmpl $-0x1, %eax
jne 0x5acc
leaq 0x4dec(%rip), %rdi      # 0xa873
xorl %eax, %eax
callq 0x30f0
testq %r14, %r14
je 0x5aa4
leaq 0x1ebe(%rip), %rdi      # 0x7958
movq %r15, %rsi
xorl %eax, %eax
callq 0x30f0
leaq 0x4ee0(%rip), %rdi      # 0xa98b
jmp 0x5b2c
leaq 0x4e90(%rip), %rdi      # 0xa944
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3090
leaq 0x4db6(%rip), %rdi      # 0xa880
jmp 0x5b2c
cltq
imulq $0x38, %rax, %rcx
leaq 0x9137(%rip), %r14      # 0xec10
cmpl $0x1, 0x2c(%rcx,%r14)
jne 0x5b25
addq %rcx, %r14
movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF
leaq 0xa12d(%rip), %rcx      # 0xfc20
movb $0x1, (%rax,%rcx)
leaq 0x4da1(%rip), %rdi      # 0xa89f
xorl %eax, %eax
callq 0x30f0
movq 0x10(%r14), %rsi
testq %rsi, %rsi
je 0x5b1c
leaq 0x1e43(%rip), %rdi      # 0x7958
xorl %eax, %eax
callq 0x30f0
leaq 0x1e30(%rip), %rdi      # 0x7953
jmp 0x5b2c
leaq 0x4d81(%rip), %rdi      # 0xa8ad
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x30f0
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: in_room
static int in_room(int room_id, char *adj, char *name)
{
	int i;
	int item_num;
	int count;

	/* find out if given name is ambiguous */
	for (count = 0, i = 0; items[i].item_id != -1; i++) {
		if (strcmp(items[i].item_name,name) == 0 &&
			items[i].location == room_id && items[i].hidden == NO) {
			if (adj == NULL) {
				count++;
				item_num = i;
			} else if (items[i].item_adj != NULL &&
					strcmp(adj,items[i].item_adj) == 0) {
				count = 1;
				item_num = i;
				break;
			}
		}
	}

	/* return results */
	if (count == 0) {
		return -1;
	} else if (count > 1) {
		return -2;
	} else {
		return item_num;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
xorl %ebx, %ebx
cmpl $-0x1, 0x90b4(%rip)     # 0xec10
je 0x5bc7
movq %rdx, %r14
movl %edi, %ebp
xorl %r13d, %r13d
leaq 0x90db(%rip), %r15      # 0xec48
xorl %r12d, %r12d
movq -0x30(%r15), %rdi
movq %r14, %rsi
callq 0x3170
testl %eax, %eax
jne 0x5b8d
cmpl %ebp, -0x8(%r15)
jne 0x5b8d
cmpl $0x0, -0x10(%r15)
je 0x5b9c
incl %r13d
cmpl $-0x1, (%r15)
leaq 0x38(%r15), %r15
jne 0x5b70
jmp 0x5bca
cmpq $0x0, 0x10(%rsp)
je 0x5bbd
movq -0x28(%r15), %rsi
testq %rsi, %rsi
je 0x5b8d
movq 0x10(%rsp), %rdi
callq 0x3170
testl %eax, %eax
jne 0x5b8d
jmp 0x5bf1
incl %r12d
movl %r13d, 0xc(%rsp)
jmp 0x5b8d
xorl %r12d, %r12d
cmpl $0x2, %r12d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovll 0xc(%rsp), %eax
cmpl $0x1, %r12d
sbbl %ebx, %ebx
orl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r12d
movl %r13d, 0xc(%rsp)
jmp 0x5bca
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: unique_item
extern int unique_item(int room_id, char *adj, char *name)
{
	int room;
	int inv;

	if (name == NULL) return -1;

	room = in_room(room_id, adj,name);
	inv = in_inv(adj,name);

	if ((room >= 0 && inv >= 0) || room == -2 || inv == -2) {
		return -2;
	} else if (room == -1 && inv == -1) {
		return -1;
	} else {
		if (inv == -1) inv = room;
		return inv;
	}
}

// Assembly:
testq %rdx, %rdx
je 0x5c5f
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
callq 0x5b40
movl %eax, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5c67
movl %ebx, %ecx
orl %eax, %ecx
setns %cl
cmpl $-0x2, %ebx
sete %dl
cmpl $-0x2, %eax
sete %sil
orb %dl, %sil
orb %cl, %sil
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
jne 0x5c58
cmpl $-0x1, %eax
cmovnel %eax, %ebx
movl %ebx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x5c64
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: in_inv
static int in_inv(char *adj, char *name)
{
	int i;
	int item_num;
	int count;
	
	/* find out if given name is ambiguous */
	for (count = 0, i = 0; items[i].item_id != -1; i++) {
		if (strcmp(items[i].item_name,name) == 0 &&
			inventory[i] == YES) {
			if (adj == NULL) {
				count++;
				item_num = i;
			} else if (items[i].item_adj != NULL &&
				strcmp(adj,items[i].item_adj) == 0) {
				count = 1;
				item_num = i;
				break;
			}
		}
	}

	/* return results */
	if (count == 0) {
		return -1;
	} else if (count > 1) {
		return -2;
	} else {
		return item_num;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $-0x1, 0x8f95(%rip)     # 0xec10
je 0x5ce0
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
leaq 0x8f8b(%rip), %r13      # 0xec18
xorl %ebp, %ebp
movq (%r13), %rdi
movq %r14, %rsi
callq 0x3170
testl %eax, %eax
jne 0x5cd0
leaq 0x9f7a(%rip), %rax      # 0xfc20
cmpb $0x1, (%r12,%rax)
jne 0x5cd0
testq %r15, %r15
je 0x5cc9
movq 0x8(%r13), %rsi
testq %rsi, %rsi
je 0x5cd0
movq %r15, %rdi
callq 0x3170
testl %eax, %eax
jne 0x5cd0
jmp 0x5d07
incl %ebp
movl %r12d, 0x4(%rsp)
incq %r12
cmpl $-0x1, 0x30(%r13)
leaq 0x38(%r13), %r13
jne 0x5c8f
jmp 0x5ce2
xorl %ebp, %ebp
cmpl $0x2, %ebp
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovll 0x4(%rsp), %eax
cmpl $0x1, %ebp
sbbl %ebx, %ebx
orl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ebp
movl %r12d, 0x4(%rsp)
jmp 0x5ce2
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: drop_item
extern void drop_item(int room_id, char *word1, char *word2)
{
	char *adj = NULL;
	char *name = NULL;
	int item_num;

	putchar('\n');

	if (word1 == NULL) {
		printf("Drop what?\n");
		return;
	}
	
	/* assign an adjective if possible */
	assign_name(&word1, &word2, &adj, &name);
	
	/* find out if given name is ambiguous */
	item_num = in_inv(adj, name);

	/* if none were found, the item is not in inventory */
	/* if only one was found, it's not ambiguous */
	if (item_num == -1) {
		printf("You do not have a ");
		if (adj != NULL) printf("%s ",adj);
		printf("%s.\n",name);
		return;
	} else if (item_num == -2) {
		printf("Which %s do you want to drop?\n",name);
		return;
	}

	/* drop item */
	items[item_num].location = room_id;
	inventory[item_num] = NO;
	printf("You dropped the ");
	if (items[item_num].item_adj != NULL)
		printf("%s ",items[item_num].item_adj);
	printf("%s.\n",name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
movl $0xa, %edi
callq 0x3050
testq %rbx, %rbx
je 0x5d73
testq %r14, %r14
movq %rbx, %r15
cmoveq %r14, %r15
cmovneq %r14, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5c67
cmpl $-0x2, %eax
je 0x5d89
cmpl $-0x1, %eax
jne 0x5d92
leaq 0x4b6b(%rip), %rdi      # 0xa8c6
xorl %eax, %eax
callq 0x30f0
testq %r14, %r14
je 0x5dd5
leaq 0x1bea(%rip), %rdi      # 0x7958
movq %r15, %rsi
jmp 0x5dce
leaq 0x4bd5(%rip), %rdi      # 0xa94f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3090
leaq 0x4b49(%rip), %rdi      # 0xa8d9
jmp 0x5ddc
cltq
imulq $0x38, %rax, %r14
leaq 0x8e71(%rip), %r15      # 0xec10
movl %ebp, 0x30(%r14,%r15)
leaq 0x9e75(%rip), %rcx      # 0xfc20
movb $0x0, (%rax,%rcx)
leaq 0x4b42(%rip), %rdi      # 0xa8f8
xorl %eax, %eax
callq 0x30f0
movq 0x10(%r14,%r15), %rsi
testq %rsi, %rsi
je 0x5dd5
leaq 0x1b8a(%rip), %rdi      # 0x7958
xorl %eax, %eax
callq 0x30f0
leaq 0x1b77(%rip), %rdi      # 0x7953
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x30f0
// File: /workspace/github_c_makefile_star2_O1/ethinethin[P]Secret/items.c
// Function: look_item
extern void look_item(int room_id, char *word1, char *word2)
{
	char *adj = NULL;
	char *name = NULL;
	int item_num;

	putchar('\n');

	if (word1 == NULL) {
		printf("Look at what?\n");
		return;
	}
	
	/* assign an adjective if possible */
	assign_name(&word1, &word2, &adj, &name);

	/* in location or inventory? */
	item_num = unique_item(room_id, adj, name);

	/* is it ambiguous? */
	if (item_num == -2) {
		printf("Which %s?\n",name);
		return;
	} else if (item_num == -1) {
		printf("There is no ");
		if (adj != NULL) printf("%s ",adj);
		printf("%s here.\n",name);
		return;
	} 
	/* output description */
	printf("%s\n",items[item_num].item_desc_exam);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
movl $0xa, %edi
callq 0x3050
testq %rbx, %rbx
je 0x5e3c
testq %r14, %r14
movq %rbx, %r15
cmoveq %r14, %r15
cmovneq %r14, %rbx
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5c0d
cmpl $-0x1, %eax
je 0x5e45
cmpl $-0x2, %eax
jne 0x5e84
leaq 0x4acf(%rip), %rdi      # 0xa909
jmp 0x5e70
leaq 0x4b17(%rip), %rdi      # 0xa95a
jmp 0x5e96
leaq 0x4a27(%rip), %rdi      # 0xa873
xorl %eax, %eax
callq 0x30f0
testq %r14, %r14
je 0x5e69
leaq 0x1af9(%rip), %rdi      # 0x7958
movq %r15, %rsi
xorl %eax, %eax
callq 0x30f0
leaq 0x4b1b(%rip), %rdi      # 0xa98b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x30f0
cltq
imulq $0x38, %rax, %rax
leaq 0x8d7f(%rip), %rcx      # 0xec10
movq 0x20(%rax,%rcx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3090
// File: /workspace/github_c_makefile_star2_O1/FastFilter[P]BlockBloomSimulator/src/simpleblockmodel.c
// Function: compute
void compute(size_t HowManyKeys) {
  bool verbose = false;
  printf("Number of keys %zu \n", HowManyKeys);
  printf("Full cache line (512-bits) \n");
  assessBlockSize(HowManyKeys, 512, verbose);
  printf("3/4 cache line (384-bits) \n");
  assessBlockSize(HowManyKeys, 384, verbose);
  printf("Half cache line (256-bits) \n");
  assessBlockSize(HowManyKeys, 256, verbose);
  printf("Half cache line (128-bits) \n");
  assessBlockSize(HowManyKeys, 128, verbose);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1df9(%rip), %rdi      # 0x437d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1080
leaq 0x1dfd(%rip), %rdi      # 0x4392
callq 0x1070
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1635
leaq 0x1dfe(%rip), %rdi      # 0x43ae
callq 0x1070
movl $0x180, %esi            # imm = 0x180
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1635
leaq 0x1dfe(%rip), %rdi      # 0x43c9
callq 0x1070
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1635
leaq 0x1dff(%rip), %rdi      # 0x43e5
callq 0x1070
movl $0x80, %esi
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
jmp 0x1635
// File: /workspace/github_c_makefile_star2_O1/FastFilter[P]BlockBloomSimulator/src/simpleblockmodel.c
// Function: main
int main() {
  printf("bits per key indicates storage (bits used per key): smaller is "
         "better\n");
  printf("best bits per bucket indicates the number of bits to check per key: "
         "smaller is better\n");
  printf("collision rate is the false negative rate: smaller is better\n");
  printf("In the 'lane' model you have one bit set per lane.\n");
  printf("\n");
  for(size_t i = 10000; i < 1000000000; i*=10) {
    compute(i);
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
leaq 0x1dfe(%rip), %rdi      # 0x4401
callq 0x1070
leaq 0x1e38(%rip), %rdi      # 0x4447
callq 0x1070
leaq 0x1e82(%rip), %rdi      # 0x449d
callq 0x1070
leaq 0x1eb3(%rip), %rdi      # 0x44da
callq 0x1070
movl $0xa, %edi
callq 0x1050
movl $0x2710, %ebx           # imm = 0x2710
movq %rbx, %rdi
callq 0x2579
leaq (%rbx,%rbx), %rax
leaq (%rax,%rax,4), %rax
cmpq $0x5f5e100, %rbx        # imm = 0x5F5E100
movq %rax, %rbx
jb 0x263b
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/consistent-forking.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };

	stress_parse_args(argc, argv, &args);
	_STRESS_MUST(args.n > 0, "'n' argument must be at least > 0");
	fork_so_much(args.n);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x2008, %edx           # imm = 0x2008
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1519
movl (%r14), %edi
testl %edi, %edi
jle 0x1aa9
callq 0x174b
movq 0x2548(%rip), %rbx      # 0x3ff8
movq (%rbx), %rcx
leaq 0x6aa(%rip), %rdi       # 0x2164
movl $0x9, %esi
movl $0x1, %edx
callq 0x1150
movq (%rbx), %rcx
leaq 0x697(%rip), %rdi       # 0x216a
movl $0x3, %esi
movl $0x1, %edx
callq 0x1150
movq (%rbx), %rcx
leaq 0x6ac(%rip), %rdi       # 0x2198
movl $0x21, %esi
movl $0x1, %edx
callq 0x1150
movq (%rbx), %rcx
leaq 0x53e(%rip), %rdi       # 0x2043
movl $0x2, %esi
movl $0x1, %edx
callq 0x1150
movq (%rbx), %rdi
leaq 0x528(%rip), %rsi       # 0x2046
leaq 0x600(%rip), %rdx       # 0x2125
xorl %eax, %eax
callq 0x10d0
movq (%rbx), %rdi
leaq 0x52c(%rip), %rsi       # 0x2062
movl $0x47, %edx
xorl %eax, %eax
callq 0x10d0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x10b0
movq (%rbx), %rcx
leaq 0x516(%rip), %rdi       # 0x206f
movl $0xa, %esi
movl $0x1, %edx
callq 0x1150
movl $0x1, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/Openvario[P]sensord/compdata.c
// Function: sigintHandler
static void sigintHandler(int sig_num)
{
	(void)sig_num;

	signal(SIGINT, sigintHandler);

	// if sensordata from file
	if (fp_sensordata != NULL)
		fclose(fp_sensordata);

	fprintf(stderr, "Exiting ...\n");

	exit(0);
}

// Assembly:
pushq %rax
leaq -0x8(%rip), %rsi        # 0x3066
movl $0x2, %edi
callq 0x1140
leaq 0x3006329(%rip), %rax   # 0x30093a8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x308c
callq 0x10b0
movq 0x5f65(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x285d(%rip), %rdi      # 0x58fa
movl $0xc, %esi
movl $0x1, %edx
callq 0x1210
xorl %edi, %edi
callq 0x1200
// File: /workspace/github_c_makefile_star2_O1/GRUPO1MM1INTRO-2020-1[P]1MM1INTRO/20190820_1MM1_INTRO/main.c
// Function: main
int main(void){
  int result=printf("mcd(32,132)=%d\n",mcd(32,132));
  printf("mcd(8,64)=%d\n",mcd(8,64));
  printf("mcd(65,2048)=%d\n",mcd(65,2048));

  int m=mcd(32,132);
  int arr[]={32,132};
  simplificar(arr);
  printf("32/132=%d/%d\n",arr[0],arr[1]);
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x20, %edi
movl $0x84, %esi
callq 0x1298
leaq 0xe0f(%rip), %rdi       # 0x2014
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
movl %eax, %ebx
movl $0x8, %edi
movl $0x40, %esi
callq 0x1298
leaq 0xdfe(%rip), %rdi       # 0x2024
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
movl $0x41, %edi
movl $0x800, %esi            # imm = 0x800
callq 0x1298
leaq 0xded(%rip), %rdi       # 0x2032
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
movl $0x20, %edi
movl $0x84, %esi
callq 0x1298
movabsq $0x8400000020, %rax     # imm = 0x8400000020
leaq -0x18(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x113c
movl (%r14), %esi
movl 0x4(%r14), %edx
leaq 0xdbf(%rip), %rdi       # 0x2043
xorl %eax, %eax
callq 0x1030
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/GRUPO1MM1INTRO-2020-1[P]1MM1INTRO/20190820_1MM1_INTRO/otro.c
// Function: mcd
int mcd(int n,int d)
{
  int N,D,R;
  N=abs(n);
  D=abs(d);
  R=D%N;
  if(!R) goto fin;
#ifdef PRELIMINAR
  printf("%d = %d(%d)+%d\n",D,D/N,N,R);
#endif /*PRELIMINAR*/
  D=N;
  N=R;
  R=D%N;
  if(!R) goto fin;
#ifdef PRELIMINAR
  printf("%d = %d(%d)+%d\n",D,D/N,N,R);
#endif /*PRELIMINAR*/
  D=N;
  N=R;
  R=D%N;
  if(!R) goto fin;
#ifdef PRELIMINAR
  printf("%d = %d(%d)+%d\n",D,D/N,N,R);
#endif /*PRELIMINAR*/
  D=N;
  N=R;
  R=D%N;
  if(!R) goto fin;
#ifdef PRELIMINAR
  printf("%d = %d(%d)+%d\n",D,D/N,N,R);
#endif /*PRELIMINAR*/
fin:
  return N;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
testl %edx, %edx
je 0x1352
movl %edx, %r14d
leaq 0xd3c(%rip), %rdi       # 0x2004
movl %ecx, %esi
movl %eax, %edx
movl %ebx, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x1030
movl %ebx, %eax
xorl %edx, %edx
divl %r14d
testl %edx, %edx
je 0x134a
movl %edx, %r15d
leaq 0xd17(%rip), %rdi       # 0x2004
movl %ebx, %esi
movl %eax, %edx
movl %r14d, %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x1030
movl %r14d, %eax
xorl %edx, %edx
divl %r15d
testl %edx, %edx
je 0x134f
movl %edx, %ebx
leaq 0xcf1(%rip), %rdi       # 0x2004
movl %r14d, %esi
movl %eax, %edx
movl %r15d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x1030
movl %r15d, %eax
xorl %edx, %edx
divl %ebx
testl %edx, %edx
je 0x1352
movl %edx, %r8d
leaq 0xcca(%rip), %rdi       # 0x2004
movl %r15d, %esi
movl %eax, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1030
jmp 0x1352
movl %r14d, %ebx
jmp 0x1352
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: StrCaseStr
char *StrCaseStr(char *s1, const char *s2)
{
   char h1[MAX_STR];
   char h2[MAX_STR];
   char *r;
   unsigned int i;

   memset(h1,0,sizeof(h1));
   memset(h2,0,sizeof(h2));

    for (i=0 ; i < strlen(s1) && i < sizeof(h1)-1 ; ++i)
        h1[i] = toupper(s1[i]);
    for (i=0 ; i < strlen(s2) && i < sizeof(h2)-1 ; ++i)
        h2[i] = toupper(s2[i]);

    r = strstr(h1,h2);
    if (r) r = s1 + (r - h1);
    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x400(%rsp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2180
movq %rsp, %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2180
movq %rbx, %rdi
callq 0x2110
testq %rax, %rax
je 0x27cb
movq %rax, %r12
callq 0x2030
decq %r12
movl $0x3fe, %ecx            # imm = 0x3FE
cmpq %rcx, %r12
cmovaeq %rcx, %r12
incq %r12
xorl %ecx, %ecx
movq (%rax), %rdx
movsbq (%rbx,%rcx), %rsi
movb (%rdx,%rsi,4), %dl
movb %dl, 0x400(%rsp,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0x27b1
movq %r15, %rdi
callq 0x2110
testq %rax, %rax
je 0x280a
movq %rax, %r12
callq 0x2030
movq (%rax), %rax
decq %r12
movl $0x3fe, %ecx            # imm = 0x3FE
cmpq %rcx, %r12
cmovaeq %rcx, %r12
incq %r12
xorl %ecx, %ecx
movsbq (%r15,%rcx), %rdx
movb (%rax,%rdx,4), %dl
movb %dl, (%rsp,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0x27f7
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2310
movq %rax, %rcx
subq %r14, %rcx
addq %rcx, %rbx
testq %rax, %rax
cmovneq %rbx, %rax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: StrNDup
char *StrNDup(void *src, unsigned int n)
{
   char *dst;
   if (n > MAX_STR)
   {
      fprintf(stderr,"*** tried to allocate %d bytes for string\n",n);
      fprintf(stderr,"*** current maximum length is %d\n",MAX_STR);
      exit(1);
   }
   dst = (char *)MallocOrDie(n+1);
   memmove(dst,src,n);
   return dst;
 }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
cmpl $0x401, %esi            # imm = 0x401
jae 0x28b4
movq %rdi, %r14
leal 0x1(%rbx), %edi
movl $0x1, %esi
callq 0x21e0
movq %rax, %r15
movq %rax, %rdi
callq 0x2834
movl %ebx, %edx
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2250
movl %ebx, %edi
callq 0x2373
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: MneStat
void MneStat(void)
{
   unsigned int i,j;

   for (i=0 ; i < DIMOP_6309 ; ++i)
   for (j=0 ; j < strlen(Mat[i].Mne) ; ++j)
      ++Cstat[Mat[i].Mne[j]-'A'];

   for (i=0 ; i < 26 ; ++i)
      printf("%c:%3d\n",'A'+i,Cstat[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0xf8f3(%rip), %r12      # 0x121c0
leaq 0x224ac(%rip), %r14     # 0x24d80
leaq (%r15,%r15,4), %rax
leaq (%r12,%rax,8), %rbx
movq %rbx, %rdi
callq 0x2110
testq %rax, %rax
je 0x2903
movl $0x1, %ecx
xorl %edx, %edx
movsbq (%rbx,%rdx), %rdx
incb -0x41(%rdx,%r14)
movl %ecx, %edx
incl %ecx
cmpq %rdx, %rax
ja 0x28f0
incq %r15
cmpq $0xe6, %r15
jne 0x28d4
leaq 0x9933(%rip), %rbx      # 0xc249
xorl %r15d, %r15d
movsbl (%r15,%r14), %edx
leal 0x41(%r15), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2130
incq %r15
cmpq $0x1a, %r15
jne 0x2919
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: StrMatch
char *StrMatch(char *s, const char *m)
{
   int i,j,k,l;

   k = strlen(s);
   l = strlen(m);

   for (j = 0 ; j <= k-l ; ++j)
   {
      if (s[j] == ';') break;  // don't search comment
      for (i = 0 ; i < l ; ++i)
      {
         if (toupper(s[j+i]) != toupper(m[i])) break;
      }
      if (i == l) return (s + j);
   }
   return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2110
movq %rax, %r15
movq %r14, %rdi
callq 0x2110
movq %rax, %r12
cmpl %r12d, %r15d
jl 0x29fc
subl %r12d, %r15d
incl %r15d
movl %r12d, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movq %rbx, %rcx
xorl %r13d, %r13d
movq %r15, (%rsp)
cmpb $0x3b, (%rcx,%r13)
je 0x29fc
testl %r12d, %r12d
jle 0x29ea
movq %rcx, %r15
callq 0x2030
movq (%rax), %rcx
xorl %eax, %eax
movsbq (%rbx,%rax), %rdx
movl (%rcx,%rdx,4), %edx
movsbq (%r14,%rax), %rsi
cmpl (%rcx,%rsi,4), %edx
jne 0x29e1
incq %rax
cmpq %rax, %rbp
jne 0x29c4
movl %r12d, %eax
movq %r15, %rcx
movq (%rsp), %r15
jmp 0x29ec
xorl %eax, %eax
cmpl %r12d, %eax
je 0x2a0d
incq %r13
incq %rbx
cmpq %r15, %r13
jne 0x29ab
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %r13, %rcx
movq %rcx, %rax
jmp 0x29fe
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: StrKey
char *StrKey(char *s, const char *m)
{
   char *r = StrMatch(s,m);
   if (r) // match was true
   {
      if ((r > s && isalnum(*(r-1))) ||       // check before
         (isalnum(*(r+strlen(m))))) r = NULL; // check after
   }
   return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x2969
testq %rax, %rax
je 0x2a61
movq %rax, %rbx
cmpq %r15, %rax
jbe 0x2a45
callq 0x2320
movq (%rax), %rax
movsbq -0x1(%rbx), %rcx
testb $0x8, (%rax,%rcx,2)
jne 0x2a61
callq 0x2320
movq (%rax), %r15
movq %r14, %rdi
callq 0x2110
movsbq (%rbx,%rax), %rax
testb $0x8, (%r15,%rax,2)
je 0x2a63
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: GetSymbol
char *GetSymbol(char *p, char *s)
{
   if (*p == '.') // expand local symbol
   {
      if (Scope[0])
      {
         strcpy(s,Scope);
         s += strlen(s);
         *s++ = *p++;
      }
   }
   if (*p == '_' || isalpha(*p)) while (isym(*p)) *s++ = *p++;
   *s = 0;
   return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x2e, (%rdi)
jne 0x2ae7
cmpb $0x0, 0x222e1(%rip)     # 0x24da0
je 0x2ae7
leaq 0x222d8(%rip), %rsi     # 0x24da0
movq %r14, %rdi
callq 0x2090
movq %r14, %rdi
callq 0x2110
movb (%rbx), %cl
incq %rbx
addq %rax, %r14
incq %r14
movb %cl, -0x1(%r14)
movsbq (%rbx), %r15
cmpq $0x5f, %r15
je 0x2b12
callq 0x2320
movq (%rax), %rax
testb $0x4, 0x1(%rax,%r15,2)
jne 0x2b12
movb $0x0, (%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $0x800000000000401, %r15 # imm = 0x800000000000401
movzbl (%rbx), %r12d
leal -0x24(%r12), %eax
cmpl $0x3b, %eax
ja 0x2b30
btq %rax, %r15
jb 0x2b43
movsbq %r12b, %r13
callq 0x2320
movq (%rax), %rax
testb $0x8, (%rax,%r13,2)
je 0x2b01
incq %rbx
movb %r12b, (%r14)
incq %r14
jmp 0x2b1c
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: GetMacroArg
char *GetMacroArg(char *p, char *s)
{
   p = SkipSpace(p);
   while (*p && *p != ',' && *p != ')') *s++ = *p++;
   *s = 0;
   return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x2b77
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x2b68
movabsq $0x120000000001, %rax   # imm = 0x120000000001
movzbl (%rbx), %ecx
cmpq $0x2c, %rcx
ja 0x2b90
btq %rcx, %rax
jb 0x2b9b
incq %rbx
movb %cl, (%r14)
incq %r14
jmp 0x2b81
movb $0x0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: StrCaseCmp
int StrCaseCmp(const char *a, const char *b)
{
   unsigned int i,l,m;

   l = strlen(a);
   m = strlen(b);

   for (i=0 ; i <= l && i <= m ; ++i)
   {
      if (toupper(a[i]) < toupper(b[i])) return -1;
      if (toupper(a[i]) > toupper(b[i])) return  1;
   }
   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2110
movq %rax, %r12
movq %rbx, %rdi
callq 0x2110
movq %rax, %r15
cmpl %r15d, %r12d
cmovbl %r12d, %r15d
callq 0x2030
movq (%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
movsbq (%r14,%rdx), %rsi
movsbq (%rbx,%rdx), %rdx
movl (%rax,%rdx,4), %edx
cmpl %edx, (%rax,%rsi,4)
jl 0x2c38
jg 0x2c3f
incl %ecx
cmpl %r15d, %ecx
jbe 0x2c17
xorl %eax, %eax
jmp 0x2c44
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2c44
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: strcmpword
int strcmpword(const char *s1, const char *s2)
{
   int l = strlen(s2);
   int r = StrNCaseCmp(s1,s2,l);
   if (r == 0 && isym(s1[l])) r = 1;
   return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2110
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2c50
testl %eax, %eax
jne 0x2d2b
movslq %r14d, %rax
movzbl (%rbx,%rax), %ecx
leal -0x24(%rcx), %edx
cmpl $0x3b, %edx
ja 0x2d15
movl $0x1, %eax
movabsq $0x800000000000401, %rsi # imm = 0x800000000000401
btq %rdx, %rsi
jb 0x2d2b
movsbq %cl, %rbx
callq 0x2320
movq (%rax), %rax
movzwl (%rax,%rbx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: SkipHexCode
char *SkipHexCode(char *p)
{
   int l;

   l = strlen(p);
   if (l > 20 && isdigit(p[4]) && isspace(p[5]) &&
       isxdigit(p[6]) && isxdigit(p[7]) &&
       isxdigit(p[8]) && isxdigit(p[9]) &&
       p[0] != ';')
   {
      if (SkipHex) memmove(Line,Line+20,l-19);
      else return (p+20);
   }
   return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2110
movq %rax, %r14
cmpl $0x15, %r14d
jl 0x2dc4
callq 0x2320
movq (%rax), %rax
movsbq 0x4(%rbx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x2dc4
movsbq 0x5(%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x2dc4
movsbq 0x6(%rbx), %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x2dc4
movsbq 0x7(%rbx), %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x2dc4
movsbq 0x8(%rbx), %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x2dc4
movsbq 0x9(%rbx), %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x2dc4
cmpb $0x3b, (%rbx)
je 0x2dc4
cmpl $0x0, 0x21fae(%rip)     # 0x24d50
je 0x2dc0
addl $-0x13, %r14d
leaq 0x220f1(%rip), %rdi     # 0x24ea0
leaq 0x220fe(%rip), %rsi     # 0x24eb4
movq %r14, %rdx
callq 0x22a0
jmp 0x2dc4
addq $0x14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ErrorLine
void ErrorLine(char *p)
{
   int i,ep;
   printf("%s\n",Line);
   ep = p - Line;
   if (ep >= 0 && ep < 80)
   {
      for (i=0 ; i < ep ; ++i) printf(" ");
      printf("^\n");
      return;
   }
   ep = p - OpText;
   if (ep >= 0 && ep < 80 && *OpText)
   {
      printf("Operand: %s\n",OpText);
      for (i=0 ; i < ep+9 ; ++i) printf(" ");
      printf("^\n");
      return;
   }

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x220c3(%rip), %r14     # 0x24ea0
movq %r14, %rdi
callq 0x20a0
movl %ebx, %ebp
subl %r14d, %ebp
cmpl $0x4f, %ebp
ja 0x2e0a
leaq 0x220aa(%rip), %rax     # 0x24ea0
cmpl %eax, %ebx
je 0x2e4e
movl $0x20, %edi
callq 0x2050
decl %ebp
jne 0x2dfa
jmp 0x2e4e
leaq 0x2218f(%rip), %rax     # 0x24fa0
subl %eax, %ebx
cmpl $0x4f, %ebx
ja 0x2e5e
cmpb $0x0, 0x22181(%rip)     # 0x24fa0
je 0x2e5e
leaq 0x9429(%rip), %rdi      # 0xc251
leaq 0x22171(%rip), %rsi     # 0x24fa0
xorl %eax, %eax
callq 0x2130
addl $0x8, %ebx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x20, %edi
callq 0x2050
incl %ebp
cmpl %ebx, %ebp
jl 0x2e3e
leaq 0xac2e(%rip), %rdi      # 0xda83
popq %rbx
popq %r14
popq %rbp
jmp 0x20a0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ErrorMsg
void ErrorMsg(const char *format, ...) {
   va_list args;
   char *buf;

   buf = (char *)MallocOrDie(SIZE_ERRMSG);
   snprintf(buf, SIZE_ERRMSG, "\n*** Error in file %s line %d:\n",
         IncludeStack[IncludeLevel].Src, LiNo);
   va_start(args,format);
   vsnprintf(buf+strlen(buf), SIZE_ERRMSG-strlen(buf), format, args);
   va_end(args);
   fputs(Line, stdout);
   fputs(Line, lf);
   fputs(buf, stdout);
   fputs(buf, lf);
   if (df)
   {
      fputs(Line, df);
      fputs(buf, df);
      // ListSymbols(df,Labels,0,0xffff);
   }
   free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r14
leaq 0x20(%rsp), %r13
movq %rsi, 0x8(%r13)
movq %rdx, 0x10(%r13)
movq %rcx, 0x18(%r13)
movq %r8, 0x20(%r13)
movq %r9, 0x28(%r13)
testb %al, %al
je 0x2eca
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl $0x400, %r15d           # imm = 0x400
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x21e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x2834
movslq 0x22b0f(%rip), %rax     # 0x25a00
leaq (%rax,%rax,2), %rax
leaq 0x221a4(%rip), %rcx     # 0x250a0
movq 0x10(%rcx,%rax,8), %rcx
movl 0x21e50(%rip), %r8d     # 0x24d58
leaq 0x934f(%rip), %rdx      # 0xc25e
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2150
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %r12
movq %rax, (%r12)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r12)
movq %r13, 0x10(%r12)
movq %rbx, %rdi
callq 0x2110
leaq (%rbx,%rax), %rdi
subq %rax, %r15
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x20f0
movq 0xf073(%rip), %r15      # 0x11fd8
movq (%r15), %rsi
leaq 0x21f31(%rip), %r14     # 0x24ea0
movq %r14, %rdi
callq 0x2170
movq 0x22a8a(%rip), %rsi     # 0x25a08
movq %r14, %rdi
callq 0x2170
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2170
movq 0x22a70(%rip), %rsi     # 0x25a08
movq %rbx, %rdi
callq 0x2170
movq 0x22a69(%rip), %rsi     # 0x25a10
testq %rsi, %rsi
je 0x2fc7
leaq 0x21eed(%rip), %rdi     # 0x24ea0
callq 0x2170
movq 0x22a51(%rip), %rsi     # 0x25a10
movq %rbx, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2040
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: PrintOC
void PrintOC(int v)
{

   if (!ListOn) return;
   // special format for 32 bit load

   if (oc == 0xcd) // LDQ immediate
   {
      fprintf(lf," cd %4.4x %4.4x",(v>>16)&0xffff,v&0xffff);
      return;
   }

   // opcode value is 16 or 8 bit

   if (oc > 255) fprintf(lf," %4.4x",oc);
   else          fprintf(lf,"   %2.2x",oc);

   // postbyte

   if (pb >= 0)  fprintf(lf," %2.2x",pb);
   else          fprintf(lf,"   ");

   // address or value 16 bit, 8 bit or none

        if (ql == 2) fprintf(lf," %4.4x",v&0xffff);
   else if (ql == 1) fprintf(lf,"   %2.2x",v&0xff);
   else              fprintf(lf,"     ");
}

// Assembly:
pushq %rbx
cmpl $0x0, 0xf15d(%rip)      # 0x121b8
je 0x308b
movl %edi, %ebx
movl 0x229b7(%rip), %edx     # 0x25a1c
cmpl $0xcd, %edx
jne 0x308d
movq 0x22994(%rip), %rdi     # 0x25a08
movl %ebx, %edx
shrl $0x10, %edx
movzwl %bx, %ecx
leaq 0x9200(%rip), %rsi      # 0xc283
xorl %eax, %eax
popq %rbx
jmp 0x2210
popq %rbx
retq
cmpl $0x100, %edx            # imm = 0x100
movq 0x2296e(%rip), %rdi     # 0x25a08
leaq 0xa53d(%rip), %rax      # 0xd5de
leaq 0x9205(%rip), %rsi      # 0xc2ad
cmovgeq %rax, %rsi
xorl %eax, %eax
callq 0x2210
movl 0x22967(%rip), %edx     # 0x25a20
movq 0x22948(%rip), %rcx     # 0x25a08
testl %edx, %edx
js 0x30d7
leaq 0x91e4(%rip), %rsi      # 0xc2af
movq %rcx, %rdi
xorl %eax, %eax
callq 0x2210
jmp 0x30ed
leaq 0xa5f0(%rip), %rdi      # 0xd6ce
movl $0x3, %esi
movl $0x1, %edx
callq 0x2300
movl 0x22931(%rip), %eax     # 0x25a24
movq 0x2290e(%rip), %rcx     # 0x25a08
cmpl $0x1, %eax
je 0x3110
cmpl $0x2, %eax
jne 0x3125
movzwl %bx, %edx
leaq 0xa4d0(%rip), %rsi      # 0xd5de
jmp 0x311a
movzbl %bl, %edx
leaq 0x9193(%rip), %rsi      # 0xc2ad
movq %rcx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x2210
leaq 0xa5a0(%rip), %rdi      # 0xd6cc
movl $0x5, %esi
movl $0x1, %edx
popq %rbx
jmp 0x2300
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: PrintByteLine
void PrintByteLine(int b)
{
   if (!ListOn || Pass) return;
   PrintLiNo();
   fprintf(lf,"       %2.2x",b);
   fprintf(lf,"         %s\n",Line);
}

// Assembly:
cmpl $0x0, 0xefe7(%rip)      # 0x121b8
je 0x3237
cmpl $0x0, 0x2283e(%rip)     # 0x25a18
jne 0x3237
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0x21b76(%rip)     # 0x24d5c
je 0x3203
movq 0x22819(%rip), %rdi     # 0x25a08
movl 0x21b63(%rip), %edx     # 0x24d58
leaq 0x9082(%rip), %rsi      # 0xc27e
xorl %eax, %eax
callq 0x2210
movq 0x227fe(%rip), %rdi     # 0x25a08
leaq 0x9098(%rip), %rsi      # 0xc2a9
movl %ebx, %edx
xorl %eax, %eax
callq 0x2210
movq 0x227e7(%rip), %rdi     # 0x25a08
leaq 0x9074(%rip), %rsi      # 0xc29c
leaq 0x21c71(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
popq %rbx
jmp 0x2210
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: PrintWordLine
void PrintWordLine(int w)
{
   if (!ListOn || Pass) return;
   PrintLiNo();
   fprintf(lf,"%4.4x",w);
   fprintf(lf,"              %s\n",Line);
}

// Assembly:
cmpl $0x0, 0xef79(%rip)      # 0x121b8
je 0x32a5
cmpl $0x0, 0x227d0(%rip)     # 0x25a18
jne 0x32a5
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0x21b08(%rip)     # 0x24d5c
je 0x3271
movq 0x227ab(%rip), %rdi     # 0x25a08
movl 0x21af5(%rip), %edx     # 0x24d58
leaq 0x9014(%rip), %rsi      # 0xc27e
xorl %eax, %eax
callq 0x2210
movq 0x22790(%rip), %rdi     # 0x25a08
leaq 0xa360(%rip), %rsi      # 0xd5df
movl %ebx, %edx
xorl %eax, %eax
callq 0x2210
movq 0x22779(%rip), %rdi     # 0x25a08
leaq 0x9001(%rip), %rsi      # 0xc297
leaq 0x21c03(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
popq %rbx
jmp 0x2210
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: IsInstruction
int IsInstruction(char *p)
{
   int i,l;

   for (i = 0 ; i < DimOp ; ++i)
   {
      l = strlen(Mat[i].Mne);
      if (!StrNCaseCmp(p,Mat[i].Mne,l) && !isym(p[l]))
      {
         return i;
      }
   }
   return -1; // No mnemonic
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x112f8(%rip), %r13     # 0x145b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
jle 0x332f
movq %rdi, %r14
leaq 0xeef4(%rip), %r15      # 0x121c0
xorl %ebp, %ebp
movabsq $0x800000000000401, %rbx # imm = 0x800000000000401
movq %r15, %rdi
callq 0x2110
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x2c50
testl %eax, %eax
jne 0x331e
movslq %r12d, %rax
movzbl (%r14,%rax), %eax
leal -0x24(%rax), %ecx
cmpl $0x3b, %ecx
ja 0x330b
btq %rcx, %rbx
jb 0x331e
movsbq %al, %r12
callq 0x2320
movq (%rax), %rax
testb $0x8, (%rax,%r12,2)
je 0x333e
incq %rbp
addq $0x28, %r15
cmpq %rbp, %r13
jne 0x32d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %eax
jmp 0x332f
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ParseCaseData
char *ParseCaseData(char *p)
{
   p = SkipSpace(p);
        if (*p == '+') IgnoreCase = 0;
   else if (*p == '-') IgnoreCase = 1;
   else
   {
      ++ErrNum;
      ErrorMsg("Missing '+' or '-' after CASE\n");
      exit(1);
   }
   PrintLine();
   return p+1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x339c
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x338d
movzbl (%rbx), %ecx
xorl %eax, %eax
cmpl $0x2b, %ecx
je 0x33b0
cmpl $0x2d, %ecx
jne 0x33c3
movl $0x1, %eax
movl %eax, 0x22672(%rip)     # 0x25a28
callq 0x313c
incq %rbx
movq %rbx, %rax
popq %rbx
retq
incl 0x22663(%rip)           # 0x25a2c
leaq 0x8ee6(%rip), %rdi      # 0xc2b6
xorl %eax, %eax
callq 0x2e63
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ParseListOption
char *ParseListOption(char *p)
{
   p = SkipSpace(p);
        if (*p == '+') ListGlobal = 1;
   else if (*p == '-') ListGlobal = 0;
   else
   {
      ++ErrNum;
      ErrorMsg("Missing '+' or '-' after LIST\n");
      exit(1);
   }
   ListOn = ListGlobal;
   PrintLine();
   return p+1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x3404
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x33f5
movzbl (%rbx), %ecx
movl $0x1, %eax
cmpl $0x2b, %ecx
je 0x3418
cmpl $0x2d, %ecx
jne 0x3431
xorl %eax, %eax
movl %eax, 0xed96(%rip)      # 0x121b4
movl %eax, 0xed94(%rip)      # 0x121b8
callq 0x313c
incq %rbx
movq %rbx, %rax
popq %rbx
retq
incl 0x225f5(%rip)           # 0x25a2c
leaq 0x8e97(%rip), %rdi      # 0xc2d5
xorl %eax, %eax
callq 0x2e63
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: SetBSS
char *SetBSS(char *p)
{
   p = NeedChar(p,'=');
   if (!p)
   {
      ++ErrNum;
      ErrorMsg("Missing '=' in set BSS & instruction\n");
      exit(1);
   }
   p = ExtractValue(p+1,&bss);
   if (ListOn && !Pass)
   {
      PrintLiNo();
      fprintf(lf,"%4.4x              %s\n",bss,Line);
   }
   return p;
}

// Assembly:
pushq %rbx
movl $0x3d, %esi
callq 0x3342
testq %rax, %rax
je 0x34d1
incq %rax
leaq 0x225c7(%rip), %rsi     # 0x25a30
movq %rax, %rdi
callq 0x34ef
movq %rax, %rbx
cmpl $0x0, 0xed3d(%rip)      # 0x121b8
je 0x34cc
cmpl $0x0, 0x22594(%rip)     # 0x25a18
jne 0x34cc
cmpl $0x0, 0x218cf(%rip)     # 0x24d5c
je 0x34aa
movq 0x22572(%rip), %rdi     # 0x25a08
movl 0x218bc(%rip), %edx     # 0x24d58
leaq 0x8ddb(%rip), %rsi      # 0xc27e
xorl %eax, %eax
callq 0x2210
movq 0x22557(%rip), %rdi     # 0x25a08
movl 0x22579(%rip), %edx     # 0x25a30
leaq 0x8e5c(%rip), %rsi      # 0xc31a
leaq 0x219db(%rip), %rcx     # 0x24ea0
xorl %eax, %eax
callq 0x2210
movq %rbx, %rax
popq %rbx
retq
incl 0x22555(%rip)           # 0x25a2c
leaq 0x8e16(%rip), %rdi      # 0xc2f4
xorl %eax, %eax
callq 0x2e63
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ExtractValue
char *ExtractValue(char *p, int *v)
{
   char *r; // pointer to trailing text after value (should be none)

   p = ExtractOpText(p);        // separate value string from comment
   if (OpText[0] == 0)
   {
      ErrorLine(p);
      ErrorMsg("Empty operand\n");
      exit(1);
   }
   r = EvalOperand(OpText,v,0); // evaluate integer value
   if (*r)                      // check for trailing text
   {
      ErrorLine(r);
      ErrorMsg("Extra text after operand\n");
      exit(1);
   }
   return p;                    // points to comment or EOL
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x369b
movq %rax, %rbx
cmpb $0x0, 0x21a9b(%rip)     # 0x24fa0
je 0x3528
leaq 0x21a92(%rip), %rdi     # 0x24fa0
movq %r14, %rsi
xorl %edx, %edx
callq 0x3daa
cmpb $0x0, (%rax)
jne 0x3539
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2dcf
leaq 0x90e9(%rip), %rdi      # 0xc620
jmp 0x3548
movq %rax, %rdi
callq 0x2dcf
leaq 0x90e7(%rip), %rdi      # 0xc62f
xorl %eax, %eax
callq 0x2e63
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: MacroIndex
int MacroIndex(char *p)
{
   int i,l;

   for (i = 0 ; i < Macros ; ++i)
   {
      l = strlen(Mac[i].Name);
      if (!StrnCmp(p,Mac[i].Name,l) && !isym(p[l])) return i;
   }
   return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x8002f(%rip), %r13     # 0x83640
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
jle 0x3688
movq %rdi, %r14
leaq 0x8002b(%rip), %rbx     # 0x83650
xorl %ebp, %ebp
movq (%rbx), %r12
movq %r12, %rdi
callq 0x2110
movslq %eax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x356b
testl %eax, %eax
jne 0x3677
movzbl (%r14,%r15), %eax
leal -0x24(%rax), %ecx
cmpl $0x3b, %ecx
ja 0x3664
movabsq $0x800000000000401, %rdx # imm = 0x800000000000401
btq %rcx, %rdx
jb 0x3677
movsbq %al, %r15
callq 0x2320
movq (%rax), %rax
testb $0x8, (%rax,%r15,2)
je 0x3697
incq %rbp
addq $0x20, %rbx
cmpq %rbp, %r13
jne 0x3627
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %eax
jmp 0x3688
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: ExtractOpText
char *ExtractOpText(char *p)
{
   int l,inquo,inapo;

   l          = 0; // length of trimmed operand
   inquo      = 0; // inside quotes
   inapo      = 0; // inside apostrophes
   ForcedMode = 0; // forced direct page (-1) or extended (+1)
   OpText[0]  = 0; // empty operand text

   p = SkipSpace(p);  // text after mnemonic or pseudo op
   if (!*p) return p; // end of line

   if (*p == '<' || *p == '>')
   {
      ForcedMode = *p - 0x3d; // -1 for '<', +1 for '>'
      ++p;
   }

   // Extract operand

   if (CodeStyle == 1) // Thomson style
   {
      while (*p && *p != ' ' && l < ML) OpText[l++] = *p++;
   }
   else
   {
      while (*p && l < ML)
      {
         if (*p == '"'  && inapo == 0) inquo = !inquo;
         if (*p == '\'' && inquo == 0) inapo = !inapo;
         if (*p == ';'  && inquo == 0 && inapo == 0) break;
         OpText[l++] = *p++;
      }
      while (l && isspace(OpText[l-1])) OpText[--l] = 0;
   }
   OpText[l] = 0; // end marker
   // if (df) fprintf(df,"OpText = [%s]\n",OpText);
   return p;      // points to comment start or EOL
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x818a3(%rip)     # 0x84f50
movb $0x0, 0x218ec(%rip)     # 0x24fa0
cmpb $0x0, (%rdi)
je 0x36d3
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x36c4
movzbl (%rbx), %eax
testl %eax, %eax
je 0x3804
cmpl $0x3e, %eax
je 0x36e8
cmpl $0x3c, %eax
jne 0x36f7
movsbl %al, %eax
addl $-0x3d, %eax
movl %eax, 0x8185c(%rip)     # 0x84f50
incq %rbx
cmpl $0x1, 0x81856(%rip)     # 0x84f54
movb (%rbx), %al
jne 0x3748
xorl %r14d, %r14d
testb %al, %al
je 0x37f6
leaq 0x2188c(%rip), %rcx     # 0x24fa0
cmpb $0x20, %al
je 0x37b8
cmpq $0xff, %r14
ja 0x37b8
leaq 0x1(%r14), %rdx
movb %al, (%r14,%rcx)
movb 0x1(%rbx,%r14), %al
movq %rdx, %r14
testb %al, %al
jne 0x3714
addq %rdx, %rbx
movl %edx, %r14d
jmp 0x37f6
xorl %r14d, %r14d
testb %al, %al
je 0x37b3
xorl %ecx, %ecx
leaq 0x21848(%rip), %rdx     # 0x24fa0
xorl %edi, %edi
xorl %esi, %esi
movl %edi, %r8d
xorl %r9d, %r9d
testl %esi, %esi
sete %r9b
xorl %edi, %edi
testl %r8d, %r8d
cmovnel %esi, %r9d
sete %dil
cmpb $0x22, %al
cmovel %r9d, %esi
testl %esi, %esi
cmovnel %r8d, %edi
cmpb $0x27, %al
cmovnel %r8d, %edi
cmpb $0x3b, %al
jne 0x3793
testl %esi, %esi
jne 0x3793
testl %edi, %edi
je 0x37bd
leaq 0x1(%rcx), %r15
movb %al, (%rcx,%rdx)
movb 0x1(%rbx,%rcx), %al
testb %al, %al
je 0x37ae
cmpq $0xff, %rcx
movq %r15, %rcx
jb 0x375c
addq %r15, %rbx
jmp 0x37c3
xorl %r15d, %r15d
jmp 0x37c3
addq %r14, %rbx
jmp 0x37f6
addq %rcx, %rbx
movl %ecx, %r15d
testl %r15d, %r15d
je 0x37f6
callq 0x2320
movl %r15d, %ecx
leaq 0x217c9(%rip), %rdx     # 0x24fa0
movq (%rax), %rsi
movsbq -0x1(%rcx,%rdx), %rdi
testb $0x20, 0x1(%rsi,%rdi,2)
je 0x37f3
movb $0x0, -0x1(%rcx,%rdx)
decq %rcx
jne 0x37d7
jmp 0x37f6
movl %ecx, %r14d
movslq %r14d, %rax
leaq 0x217a0(%rip), %rcx     # 0x24fa0
movb $0x0, (%rax,%rcx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: SymRefs
void SymRefs(int i)
{
   int n;

   if (Pass) return;
   n = ++lab[i].NumRef;
   lab[i].Ref = (int *)ReallocOrDie(lab[i].Ref,(n+1)*sizeof(int));
   lab[i].Ref[n] = LiNo;
   lab[i].Att = (int *)ReallocOrDie(lab[i].Att,(n+1)*sizeof(int));
   lab[i].Att[n] = am;
}

// Assembly:
cmpl $0x0, 0x2193e(%rip)     # 0x25a18
je 0x40dd
retq
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %edi, %rax
leaq (%rax,%rax,2), %r15
shlq $0x4, %r15
leaq 0x21948(%rip), %r13     # 0x25a40
movslq 0x18(%r15,%r13), %r12
leaq 0x1(%r12), %rax
movl %eax, 0x18(%r15,%r13)
movq 0x20(%r15,%r13), %rdi
leaq 0x8(,%r12,4), %rbx
movq %rbx, %rsi
callq 0x2280
movq %rax, %r14
movq %rax, %rdi
callq 0x2834
movq %r14, 0x20(%r15,%r13)
movl 0x20c26(%rip), %eax     # 0x24d58
movl %eax, 0x4(%r14,%r12,4)
movq 0x28(%r15,%r13), %rdi
movq %rbx, %rsi
callq 0x2280
movq %rax, %rbx
movq %rax, %rdi
callq 0x2834
movq %rbx, 0x28(%r15,%r13)
movl 0x80f0a(%rip), %eax     # 0x85064
movl %eax, 0x4(%rbx,%r12,4)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/bs9.c
// Function: EvalSymValue
char *EvalSymValue(char *p, int *v)
{
   int i;
   char Sym[ML];

   p = GetSymbol(p,Sym);
   for (i=0 ; i < Labels ; ++i)
   {
      if (!StrCmp(Sym,lab[i].Name))
      {
         *v = lab[i].Address;
         SymRefs(i);
         return p;
      }
   }
   AddLabel(Sym);
   *v = UNDEF;
   return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rsp, %rsi
callq 0x2aa4
movq %rax, %rbx
movslq 0x218a5(%rip), %r13     # 0x25a34
testq %r13, %r13
jle 0x41bd
leaq 0x218a5(%rip), %rbp     # 0x25a40
xorl %r15d, %r15d
movq %rsp, %r12
movq (%rbp), %rsi
movq %r12, %rdi
callq 0x3559
testl %eax, %eax
je 0x41ce
incq %r15
addq $0x30, %rbp
cmpq %r15, %r13
jne 0x41a1
movq %rsp, %rdi
callq 0x41f1
movl $0xff0000, (%r14)       # imm = 0xFF0000
jmp 0x41dc
movl 0xc(%rbp), %eax
movl %eax, (%r14)
movl %r15d, %edi
callq 0x40d3
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq