LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/marcespie[P]unix-samples/chapter2/ttysig.c
// Function: tcont_handler
void
tcont_handler(int sig)
{
	int save_errno = errno;

	signal(SIGTSTP, tstp_handler);
	errwrap(tcsetattr(0, TCSANOW, &mytty));
	errno = save_errno;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0x1030
movl (%rax), %eax
movl %eax, -0x8(%rbp)
movl $0x14, %edi
leaq -0x91(%rip), %rsi       # 0x1270
callq 0x1090
xorl %esi, %esi
leaq 0x2dc1(%rip), %rdx      # 0x40d0
movl %esi, %edi
callq 0x10e0
cmpl $-0x1, %eax
jne 0x132e
movl $0x1, %edi
leaq 0xcfd(%rip), %rsi       # 0x2024
movb $0x0, %al
callq 0x10c0
jmp 0x1330
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
callq 0x1030
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcespie[P]unix-samples/chapter2/ttysig.c
// Function: main
int
main()
{
	if (!isatty(0)) {
		fprintf(stderr, "This example programs shows tty behavior\n");
		exit(0);
	}
	// save basic tty stuff for later
	errwrap(tcgetattr(0, &basetty));
	errwrap(tcgetattr(0, &mytty));

	// obvious signals where we need to change/restore behavior
	signal(SIGTSTP, tstp_handler);
	signal(SIGCONT, tcont_handler);

	// all the signals that "kill" your program, so you should save
	// data AND restore the tty
	signal(SIGINT, byebye);
	signal(SIGQUIT, byebye);
	signal(SIGTERM, byebye);
	signal(SIGHUP, byebye);

	// XXX a lot of modern shells may handle tty modes for us, but
	// it's by no way guaranteed, so to be fully compliant we must
	// restore the tty on TSTP, and restore it on CONT.


	// tweak stuff we want (e.g., echo off)
	mytty.c_lflag &= ~ECHO;
	errwrap(tcsetattr(0, TCSANOW, &mytty));


	char buffer[MYSIZE];

	while (true) {
		ssize_t r;
		errwrap(r = read(0, buffer, sizeof buffer));
		if (r == 0)
			break;
		safe_write(1, buffer, r);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movl $0x0, -0x4(%rbp)
xorl %edi, %edi
callq 0x1040
cmpl $0x0, %eax
jne 0x138d
movq 0x2c83(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xcc3(%rip), %rsi       # 0x2042
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x10f0
jmp 0x138f
xorl %edi, %edi
leaq 0x2cfc(%rip), %rsi      # 0x4094
callq 0x10d0
cmpl $-0x1, %eax
jne 0x13b5
movl $0x1, %edi
leaq 0xcbe(%rip), %rsi       # 0x206c
movb $0x0, %al
callq 0x10c0
jmp 0x13b7
jmp 0x13b9
xorl %edi, %edi
leaq 0x2d0e(%rip), %rsi      # 0x40d0
callq 0x10d0
cmpl $-0x1, %eax
jne 0x13df
movl $0x1, %edi
leaq 0xcab(%rip), %rsi       # 0x2083
movb $0x0, %al
callq 0x10c0
jmp 0x13e1
movl $0x14, %edi
leaq -0x17d(%rip), %rsi      # 0x1270
callq 0x1090
movl $0x12, %edi
leaq -0x11e(%rip), %rsi      # 0x12e0
callq 0x1090
movl $0x2, %edi
leaq -0x1ff(%rip), %rsi      # 0x1210
callq 0x1090
movl $0x3, %edi
leaq -0x210(%rip), %rsi      # 0x1210
callq 0x1090
movl $0xf, %edi
leaq -0x221(%rip), %rsi      # 0x1210
callq 0x1090
movl $0x1, %edi
leaq -0x232(%rip), %rsi      # 0x1210
callq 0x1090
movl 0x2c8f(%rip), %eax      # 0x40dc
andl $-0x9, %eax
movl %eax, 0x2c86(%rip)      # 0x40dc
xorl %esi, %esi
leaq 0x2c71(%rip), %rdx      # 0x40d0
movl %esi, %edi
callq 0x10e0
cmpl $-0x1, %eax
jne 0x147e
movl $0x1, %edi
leaq 0xbad(%rip), %rsi       # 0x2024
movb $0x0, %al
callq 0x10c0
jmp 0x1480
jmp 0x1482
jmp 0x1484
leaq -0x410(%rbp), %rsi
xorl %edi, %edi
movl $0x400, %edx            # imm = 0x400
callq 0x1080
movq %rax, -0x418(%rbp)
cmpq $-0x1, %rax
jne 0x14b7
movl $0x1, %edi
leaq 0xbe8(%rip), %rsi       # 0x2098
movb $0x0, %al
callq 0x10c0
jmp 0x14b9
cmpq $0x0, -0x418(%rbp)
jne 0x14c5
jmp 0x14df
leaq -0x410(%rbp), %rsi
movq -0x418(%rbp), %rdx
movl $0x1, %edi
callq 0x14f0
jmp 0x1482
movl -0x4(%rbp), %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcespie[P]unix-samples/chapter2/safe_write.c
// Function: safe_write
void
safe_write(int fd, 
    const void *buf,
    size_t sz)
{
	const char *b = buf;
	while (sz != 0) {
		ssize_t r;
		errwrap(r = write(fd, b, sz));
		assert(r <= sz);
		b += r;
		sz -= r;
		// loop invariant: we have to write [buf, buf+sz[ to fd
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x158b
jmp 0x1514
movl -0x4(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1050
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x1541
movl $0x1, %edi
leaq 0xb81(%rip), %rsi       # 0x20bb
movb $0x0, %al
callq 0x10c0
jmp 0x1543
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x154f
jmp 0x156e
leaq 0xb7a(%rip), %rdi       # 0x20d0
leaq 0xb7b(%rip), %rsi       # 0x20d8
movl $0x11, %edx
leaq 0xb7c(%rip), %rcx       # 0x20e5
callq 0x1070
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x150b
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_01/case.c
// Function: main
int main(int argc, char *argv[])
{
  if (!parse_arg_list(argc, argv))
  {
    puts("Error: invalid arguments.");
    return EXIT_FAILURE;
  }

  consume_input(convert);

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x11d0
cmpl $0x0, %eax
jne 0x11ac
leaq 0xe66(%rip), %rdi       # 0x2004
callq 0x1030
movl $0x1, -0x4(%rbp)
jmp 0x11bf
movq 0x2e9d(%rip), %rdi      # 0x4050
callq 0x1250
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_01/case.c
// Function: parse_arg_list
boolean parse_arg_list(int argc, char *argv[])
{
  if (strcmp(argv[0], "lower") == 0)
  {
    convert = tolower;
    return true;
  }
  else if (strcmp(argv[0], "upper") == 0)
  {
    convert = toupper;
    return true;
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xe31(%rip), %rsi       # 0x201e
callq 0x1050
cmpl $0x0, %eax
jne 0x120e
movq 0x2dea(%rip), %rax      # 0x3fe8
movq %rax, 0x2e4b(%rip)      # 0x4050
movl $0x1, -0x4(%rbp)
jmp 0x1246
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xe08(%rip), %rsi       # 0x2024
callq 0x1050
cmpl $0x0, %eax
jne 0x123d
movq 0x2da3(%rip), %rax      # 0x3fd0
movq %rax, 0x2e1c(%rip)      # 0x4050
movl $0x1, -0x4(%rbp)
jmp 0x1246
jmp 0x123f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/3-ProcessUser/fork_example_1.c
// Function: main
int main(void) {
	printf("Ready (PID = %d)\n", getpid());
	fork();
	printf("My PID is %d\n", getpid());
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
callq 0x1030
movl %eax, %esi
leaq 0xe87(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
callq 0x1050
callq 0x1030
movl %eax, %esi
leaq 0xe7f(%rip), %rdi       # 0x2016
movb $0x0, %al
callq 0x1040
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/teodorst[P]app-huffman/huffman_codification_pthreads.c
// Function: codification_thread
void *codification_thread(void *huffman_info_thread) {
	huffman_thread_struct* thread_arg = (huffman_thread_struct*) huffman_info_thread;
	
	unsigned long long int thread_size = thread_arg->input_buffer_size / NUM_THREADS;
	int index = (thread_arg->thread_id) * thread_size;
	int upper_limit = index + thread_size;
	
	int *output_buffer_contor = thread_arg->output_buffer_contors + thread_arg->thread_id;
	unsigned long long int *nbits = thread_arg->nbits_buffer + thread_arg->thread_id;

	
	char **codification = thread_arg->codification;

	char *input_buffer = thread_arg->input_buffer;
	char *output_buffer = thread_arg->output_buffer;

	printf("Hy! %d start %d, size %d !\n", thread_arg->thread_id, index, upper_limit);
	
	write_codification_for_chunk_pthreads(input_buffer, index, upper_limit, codification, output_buffer, output_buffer_contor, nbits);

	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq -0x18(%rbp), %rax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
addq -0x18(%rbp), %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq 0x1c5b(%rip), %rdi      # 0x3004
movb $0x0, %al
callq 0x1080
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x2130
xorl %eax, %eax
movl %eax, %edi
callq 0x10f0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./utf32.c
// Function: utf32_strlen
size_t utf32_strlen(const int32_t *utf32_str) {
  size_t length = 0;
  while (utf32_str[length] != 0) {
    length++;
  }
  return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x357c
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3560
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./utf32.c
// Function: utf32_strcmp
int utf32_strcmp(const int32_t *str1, const int32_t *str2) {
  while (*str1 && (*str1 == *str2)) {
    str1++;
    str2++;
  }
  return *str1 - *str2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x11(%rbp)
je 0x35fc
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x3605
jmp 0x361f
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x35dc
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
subl (%rcx), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./utf32.c
// Function: c_to_utf32
void c_to_utf32(const char *source, int32_t *dest, int max) {
  int i = 0;
  while (source[i] != '\0' && i < max - 1) {
    dest[i] = (int32_t)source[i];
    i++;
  }
  dest[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x366d
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x3676
jmp 0x3698
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %edx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3646
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./utf32.c
// Function: utf32_to_c
void utf32_to_c(const int32_t *source, char *dest, int max) {
  int i = 0;
  while (source[i] != 0 && i < max - 1) {
    if (source[i] <= 0x7F) {
      dest[i] = (char)source[i];
    } else {
      dest[i] = '?';
    }
    i++;
  }
  dest[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movslq -0x18(%rbp), %rdx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rdx,4)
movb %al, -0x19(%rbp)
je 0x36ea
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x36f3
jmp 0x3732
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x7f, (%rax,%rcx,4)
jg 0x371b
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x3727
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb $0x3f, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x36c6
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-error.c
// Function: handle_error
V handle_error(NgaState *vm, CELL error) {
  CELL saved_ip = vm->cpu[vm->active].ip;
  if (vm->ErrorHandlers[error] != 0) {
    printf("\nHandling %lld\n", (long long)error);
    execute(vm, vm->ErrorHandlers[error]);
  }
  vm->cpu[vm->active].ip = saved_ip;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, 0x2079c4(%rax,%rcx,4)
je 0x3900
movslq -0xc(%rbp), %rsi
leaq 0x9767(%rip), %rdi      # 0xd048
movb $0x0, %al
callq 0x3130
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x2079c4(%rax,%rcx,4), %esi
callq 0x3bb0
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rdx
movslq 0x2043a4(%rdx), %rdx
imulq $0x874, %rdx, %rdx      # imm = 0x874
addq %rdx, %rax
movl %ecx, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-ioctl.c
// Function: ioctl_get_terminal_size
void ioctl_get_terminal_size(NgaState *vm) {
  struct winsize size;
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &size);
  stack_push(vm, size.ws_row);
  stack_push(vm, size.ws_col);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x5413, %esi           # imm = 0x5413
leaq -0x10(%rbp), %rdx
movb $0x0, %al
callq 0x3190
movq -0x8(%rbp), %rdi
movzwl -0x10(%rbp), %esi
callq 0x3980
movq -0x8(%rbp), %rdi
movzwl -0xe(%rbp), %esi
callq 0x3980
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-ioctl.c
// Function: ioctl_set_character_breaking_mode
void ioctl_set_character_breaking_mode(NgaState *vm) {
  struct termios term;
  tcgetattr(STDIN_FILENO, &term);
  term.c_lflag &=(~ICANON & ECHO);
  tcsetattr(STDIN_FILENO, TCSANOW, &term);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
xorl %edi, %edi
leaq -0x44(%rbp), %rsi
callq 0x32f0
movl -0x38(%rbp), %eax
andl $0x8, %eax
movl %eax, -0x38(%rbp)
xorl %esi, %esi
leaq -0x44(%rbp), %rdx
movl %esi, %edi
callq 0x3300
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-ioctl.c
// Function: ioctl_set_line_buffered_mode
void ioctl_set_line_buffered_mode(NgaState *vm) {
  struct termios term;
  tcgetattr(STDIN_FILENO, &term);
  term.c_lflag |= ICANON;
  term.c_lflag |= ECHO;
  tcsetattr(STDIN_FILENO, TCSANOW, &term);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
xorl %edi, %edi
leaq -0x44(%rbp), %rsi
callq 0x32f0
movl -0x38(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x38(%rbp)
xorl %esi, %esi
leaq -0x44(%rbp), %rdx
movl %esi, %edi
callq 0x3300
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-error.c
// Function: register_error_handler
V register_error_handler(NgaState *vm) {
  CELL ErrorID = stack_pop(vm);
  CELL ErrorHandler = stack_pop(vm);
  vm->ErrorHandlers[ErrorID] = ErrorHandler;
  printf("Assigned %lld to %lld\n", (long long)ErrorID, (long long)ErrorHandler);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x2079c4(%rax,%rcx,4)
movslq -0xc(%rbp), %rsi
movslq -0x10(%rbp), %rdx
leaq 0x92c3(%rip), %rdi      # 0xd058
movb $0x0, %al
callq 0x3130
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-blocks.c
// Function: read_block
V read_block(NgaState *vm) {
  CELL buffer = stack_pop(vm);
  CELL block = stack_pop(vm);
  int32_t m[1024];
  int fp = open(vm->BlockFile, O_RDONLY, 0666);
  lseek(fp, 4096 * block, SEEK_SET);
  read(fp, m, 4096);
  for (int i = 0; i < 1024; i++) {
    vm->memory[buffer + i] = (CELL)m[i];
  }
  close(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x2075c0, %rdi         # imm = 0x2075C0
xorl %esi, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x3310
movl %eax, -0x1014(%rbp)
movl -0x1014(%rbp), %edi
movl -0x10(%rbp), %eax
shll $0xc, %eax
movslq %eax, %rsi
xorl %edx, %edx
callq 0x3170
movl -0x1014(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x3200
movl $0x0, -0x1018(%rbp)
cmpl $0x400, -0x1018(%rbp)   # imm = 0x400
jge 0x3ecb
movslq -0x1018(%rbp), %rax
movl -0x1010(%rbp,%rax,4), %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl -0x1018(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1018(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1018(%rbp)
jmp 0x3e8d
movl -0x1014(%rbp), %edi
callq 0x31b0
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-blocks.c
// Function: write_block
V write_block(NgaState *vm) {
  CELL buffer = stack_pop(vm);
  CELL block = stack_pop(vm);
  int32_t m[1024];
  int fp = open(vm->BlockFile, O_WRONLY, 0666);
  lseek(fp, 4096 * block, SEEK_SET);
  for (int i = 0; i < 1024; i++) {
    m[i] = (int32_t)vm->memory[buffer + i];
  }
  write(fp, m, 4096);
  close(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x2075c0, %rdi         # imm = 0x2075C0
movl $0x1, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x3310
movl %eax, -0x1014(%rbp)
movl -0x1014(%rbp), %edi
movl -0x10(%rbp), %eax
shll $0xc, %eax
movslq %eax, %rsi
xorl %edx, %edx
callq 0x3170
movl $0x0, -0x1018(%rbp)
cmpl $0x400, -0x1018(%rbp)   # imm = 0x400
jge 0x3f87
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl -0x1018(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x1018(%rbp), %rax
movl %ecx, -0x1010(%rbp,%rax,4)
movl -0x1018(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1018(%rbp)
jmp 0x3f49
movl -0x1014(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x30b0
movl -0x1014(%rbp), %edi
callq 0x31b0
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/retro.c
// Function: string_extract
char *string_extract(NgaState *vm, CELL at) {
  CELL starting = at, i = 0;
  while (vm->memory[starting] && i < 8192)
    vm->string_data[i++] = (char)vm->memory[starting++];
  vm->string_data[i] = 0;
  return (char *)vm->string_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rdx,4)
movb %al, -0x15(%rbp)
je 0x40f8
cmpl $0x2000, -0x14(%rbp)    # imm = 0x2000
setl %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x4101
jmp 0x4133
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x10(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movb %dl, 0x2045b8(%rax,%rcx)
jmp 0x40d8
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, 0x2045b8(%rax,%rcx)
movq -0x8(%rbp), %rax
addq $0x2045b8, %rax         # imm = 0x2045B8
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-blocks.c
// Function: io_blocks
V io_blocks(NgaState *vm) {
  switch (stack_pop(vm)) {
    case 0: read_block(vm); break;
    case 1: write_block(vm); break;
    case 2: set_block_file(vm); break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
testl %eax, %eax
je 0x4184
jmp 0x4170
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x418f
jmp 0x417a
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x419a
jmp 0x41a3
movq -0x8(%rbp), %rdi
callq 0x3e10
jmp 0x41a3
movq -0x8(%rbp), %rdi
callq 0x3ee0
jmp 0x41a3
movq -0x8(%rbp), %rdi
callq 0x3fc0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_open
V file_open(NgaState *vm) {
  CELL slot = files_get_handle(vm);
  CELL mode = stack_pop(vm);
  CELL name = stack_pop(vm);
  char *modes[] = {"rb", "w", "a", "rb+"};
  char *request = string_extract(vm, name);
  if (slot > 0) {
    vm->OpenFileHandles[slot] = fopen(request, modes[mode]);
  }
  if (vm->OpenFileHandles[slot] == NULL) {
    vm->OpenFileHandles[slot] = 0;
    slot = 0;
  }
  stack_push(vm, slot);
//  FILE *file = (slot > 0) ? fopen(request, modes[mode]) : NULL;
//  vm->OpenFileHandles[slot] = (file != NULL) ? file : 0;
//  stack_push(vm, slot);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x41e0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movq 0xcb29(%rip), %rax      # 0x10d90
movq %rax, -0x40(%rbp)
movq 0xcb26(%rip), %rax      # 0x10d98
movq %rax, -0x38(%rbp)
movq 0xcb23(%rip), %rax      # 0x10da0
movq %rax, -0x30(%rbp)
movq 0xcb20(%rip), %rax      # 0x10da8
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x40c0
movq %rax, -0x48(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x42c7
movq -0x48(%rbp), %rdi
movslq -0x10(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rsi
callq 0x3330
movq %rax, %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x288ef0(%rax,%rcx,8)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x42f5
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x288ef0(%rax,%rcx,8)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3980
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_read
V file_read(NgaState *vm) {
  CELL slot = stack_pop(vm);
  FILE *file = vm->OpenFileHandles[slot];
  if (slot <= 0 || slot > MAX_OPEN_FILES || file == 0) {
    printf("\nERROR (nga/file_read): Invalid file handle\n");
    exit(1);
  }
  stack_push(vm, feof(file) ? 0 : fgetc(file));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x434f
cmpl $0x20, -0xc(%rbp)
jg 0x434f
cmpq $0x0, -0x18(%rbp)
jne 0x4367
leaq 0x8d24(%rip), %rdi      # 0xd07a
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3270
cmpl $0x0, %eax
je 0x4384
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x4390
movq -0x18(%rbp), %rdi
callq 0x31a0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x3980
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_write
V file_write(NgaState *vm) {
  CELL slot = stack_pop(vm);
  FILE *file = vm->OpenFileHandles[slot];
  if (slot <= 0 || slot > MAX_OPEN_FILES || file == 0) {
    printf("\nERROR (nga/file_write): Invalid file handle\n");
    exit(1);
  }
  fputc(stack_pop(vm), file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x43ef
cmpl $0x20, -0xc(%rbp)
jg 0x43ef
cmpq $0x0, -0x18(%rbp)
jne 0x4407
leaq 0x8cb1(%rip), %rdi      # 0xd0a7
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, %edi
movq -0x18(%rbp), %rsi
callq 0x31e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_close
V file_close(NgaState *vm) {
  CELL slot = stack_pop(vm);
  FILE *file = vm->OpenFileHandles[slot];
  if (slot <= 0 || slot > MAX_OPEN_FILES || file == 0) {
    printf("\nERROR (nga/file_close): Invalid file handle\n");
    exit(1);
  }
  fclose(file);
  vm->OpenFileHandles[slot] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x446f
cmpl $0x20, -0xc(%rbp)
jg 0x446f
cmpq $0x0, -0x18(%rbp)
jne 0x4487
leaq 0x8c5f(%rip), %rdi      # 0xd0d5
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x18(%rbp), %rdi
callq 0x30f0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x288ef0(%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_get_position
V file_get_position(NgaState *vm) {
  CELL slot = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_get_position): Invalid file handle\n");
    exit(1);
  }
  stack_push(vm, (CELL) ftell(vm->OpenFileHandles[slot]));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x44e7
cmpl $0x20, -0xc(%rbp)
jg 0x44e7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x44ff
leaq 0x8c15(%rip), %rdi      # 0xd103
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x3260
movq -0x18(%rbp), %rdi
movl %eax, %esi
callq 0x3980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_set_position
V file_set_position(NgaState *vm) {
  CELL slot, pos;
  slot = stack_pop(vm);
  pos  = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_set_position): Invalid file handle\n");
    exit(1);
  }
  fseek(vm->OpenFileHandles[slot], pos, SEEK_SET);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x4573
cmpl $0x20, -0xc(%rbp)
jg 0x4573
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x458b
leaq 0x8bbe(%rip), %rdi      # 0xd138
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
movslq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x32e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_get_size
V file_get_size(NgaState *vm) {
  CELL slot, current, r, size;
  struct stat buffer;
  slot = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_get_size): Invalid file handle\n");
    exit(1);
  }
  fstat(fileno(vm->OpenFileHandles[slot]), &buffer);
  if (!S_ISDIR(buffer.st_mode)) {
    current = ftell(vm->OpenFileHandles[slot]);
    r = fseek(vm->OpenFileHandles[slot], 0, SEEK_END);
    size = ftell(vm->OpenFileHandles[slot]);
    fseek(vm->OpenFileHandles[slot], current, SEEK_SET);
  } else {
    r = -1;
    size = 0;
  }
  stack_push(vm, (r == 0) ? size : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x45ea
cmpl $0x20, -0xc(%rbp)
jg 0x45ea
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x4602
leaq 0x8b7c(%rip), %rdi      # 0xd16d
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x32a0
movl %eax, %edi
leaq -0xa8(%rbp), %rsi
callq 0x3400
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
je 0x46a5
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x3260
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x32e0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x3260
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
movslq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x32e0
jmp 0x46b3
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x46cf
movl -0x18(%rbp), %eax
movl %eax, -0xb4(%rbp)
jmp 0x46d9
xorl %eax, %eax
movl %eax, -0xb4(%rbp)
jmp 0x46d9
movq -0xb0(%rbp), %rdi
movl -0xb4(%rbp), %esi
callq 0x3980
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_delete
V file_delete(NgaState *vm) {
  char *request;
  CELL name = stack_pop(vm);
  request = string_extract(vm, name);
  unlink(request);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x40c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3070
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_flush
V file_flush(NgaState *vm) {
  CELL slot;
  slot = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_flush): Invalid file handle\n");
    exit(1);
  }
  fflush(vm->OpenFileHandles[slot]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x4777
cmpl $0x20, -0xc(%rbp)
jg 0x4777
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x478f
leaq 0x8a20(%rip), %rdi      # 0xd19e
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x32b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_read_bytes
V file_read_bytes(NgaState *vm) {
  CELL slot = stack_pop(vm);
  CELL size = stack_pop(vm);
  CELL dest = stack_pop(vm);
  CELL z = fread((char *)file_bytes, 1, size, vm->OpenFileHandles[slot]);
  for (CELL i = 0; i < size; i++) {
    CELL x = file_bytes[i];
    vm->memory[dest + i] = x;
  }
  stack_push(vm, z);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movslq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rcx
leaq 0x533a5(%rip), %rdi     # 0x57ba0
movl $0x1, %esi
callq 0x3090
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4847
movslq -0x1c(%rbp), %rcx
leaq 0x5337e(%rip), %rax     # 0x57ba0
movsbl (%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x480f
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_write_bytes
V file_write_bytes(NgaState *vm) {
  CELL slot = stack_pop(vm);
  CELL size = stack_pop(vm);
  CELL src  = stack_pop(vm);
  for (CELL i = 0; i < size; i++) {
    char x = vm->memory[src + i];
    file_bytes[i] = x;
  }
  CELL z = fwrite(&file_bytes, 1, size, vm->OpenFileHandles[slot]);
  stack_push(vm, z);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x48ce
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %dl
movslq -0x18(%rbp), %rcx
leaq 0x532e0(%rip), %rax     # 0x57ba0
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4897
movslq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rcx
leaq 0x532b7(%rip), %rdi     # 0x57ba0
movl $0x1, %esi
callq 0x33b0
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x3980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_read_character
V file_read_character(NgaState *vm) {
  CELL c;
  CELL slot = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_read): Invalid file handle\n");
    exit(1);
  }
  c = fread_character(vm->OpenFileHandles[slot]);
  stack_push(vm, feof(vm->OpenFileHandles[slot]) ? 0 : c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0x4947
cmpl $0x20, -0x10(%rbp)
jg 0x4947
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x495f
leaq 0x872c(%rip), %rdi      # 0xd07a
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x49c0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x3270
cmpl $0x0, %eax
je 0x49a0
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x49a6
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_write_character
V file_write_character(NgaState *vm) {
  unsigned char utf8_bytes[4];
  int num_bytes;
  CELL slot, c, r;
  utf32_to_utf8(stack_pop(vm), utf8_bytes, &num_bytes);
  slot = stack_pop(vm);
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_write): Invalid file handle\n");
    exit(1);
  }
  r = fwrite(&utf8_bytes, num_bytes, 1, vm->OpenFileHandles[slot]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, %edi
leaq -0xc(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x4c10
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x4bbf
cmpl $0x20, -0x14(%rbp)
jg 0x4bbf
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x4bd7
leaq 0x84e1(%rip), %rdi      # 0xd0a7
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movslq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rcx
leaq -0xc(%rbp), %rdi
movl $0x1, %edx
callq 0x33b0
movl %eax, -0x1c(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-files.c
// Function: file_read_line
V file_read_line(NgaState *vm) {
  CELL slot = stack_pop(vm);
  CELL targ = stack_pop(vm);
  CELL c;
  if (slot <= 0 || slot > MAX_OPEN_FILES || vm->OpenFileHandles[slot] == 0) {
    printf("\nERROR (nga/file_read): Invalid file handle\n");
    exit(1);
  }
  c = fread_character(vm->OpenFileHandles[slot]);
  vm->memory[targ] = c;
  targ++;
  while (c != 10 && c != 13 && c != 0) {
    c = fread_character(vm->OpenFileHandles[slot]);
    vm->memory[targ] = c;
    targ++;
  }
  vm->memory[targ - 1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x4d93
cmpl $0x20, -0xc(%rbp)
jg 0x4d93
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x288ef0(%rax,%rcx,8)
jne 0x4dab
leaq 0x82e0(%rip), %rdi      # 0xd07a
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x49c0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl $0xa, -0x14(%rbp)
movb %al, -0x15(%rbp)
je 0x4dfa
xorl %eax, %eax
cmpl $0xd, -0x14(%rbp)
movb %al, -0x15(%rbp)
je 0x4dfa
cmpl $0x0, -0x14(%rbp)
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x4e03
jmp 0x4e34
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x288ef0(%rax,%rcx,8), %rdi
callq 0x49c0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4dda
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-multicore.c
// Function: init_core
void init_core(NgaState *vm, CELL x) {
  int y;
  vm->cpu[x].sp = 0;
  vm->cpu[x].rp = 0;
  vm->cpu[x].ip = 0;
  vm->cpu[x].active = 0;
  vm->cpu[x].u = 0;
  for (y = 0; y < STACK_DEPTH; y++) { vm->cpu[x].data[y] = 0; };
  for (y = 0; y < ADDRESSES; y++) { vm->cpu[x].address[y] = 0; };
  for (y = 0; y < 24; y++) { vm->cpu[x].registers[y] = 0; };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movl $0x0, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jge 0x4fa4
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl $0x0, 0x14(%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4f6c
movl $0x0, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jge 0x4fe6
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl $0x0, 0x414(%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4fab
movl $0x0, -0x10(%rbp)
cmpl $0x18, -0x10(%rbp)
jge 0x5025
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movslq -0xc(%rbp), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl $0x0, 0x814(%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4fed
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-multicore.c
// Function: io_multicore
void io_multicore(NgaState *vm) {
  int x, y, z;
  x = stack_pop(vm);
  switch(x) {
    case 0: y = stack_pop(vm);
            init_core(vm, y);
            break;
    case 1: y = stack_pop(vm);
            z = stack_pop(vm);
            start_core(vm, y, z);
            break;
    case 2: y = stack_pop(vm);
            pause_core(vm, y);
            break;
    case 3: pause_core(vm, vm->active);
            break;
    case 4: y = stack_pop(vm);
            resume_core(vm, y);
            break;
    case 5: y = stack_pop(vm);
            stack_push(vm, vm->cpu[vm->active].registers[y]);
            break;
    case 6: y = stack_pop(vm);
            z = stack_pop(vm);
            vm->cpu[vm->active].registers[y] = z;
            break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x6, %rax
ja 0x52ce
movq -0x20(%rbp), %rax
leaq 0x7e60(%rip), %rcx      # 0xd004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4ec0
jmp 0x52ce
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x5030
jmp 0x52ce
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x50a0
jmp 0x52ce
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x2043a4(%rax), %esi
callq 0x50a0
jmp 0x52ce
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x50d0
jmp 0x52ce
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl 0x814(%rax,%rcx,4), %esi
callq 0x3980
jmp 0x52ce
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b30
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl %edx, 0x814(%rax,%rcx,4)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-float.c
// Function: float_guard
void float_guard(NgaState *vm) {
  if (vm->fsp < 0 || vm->fsp > 255) {
    printf("\nERROR (nga/float_guard): Float Stack Limits Exceeded!\n");
    printf("At %lld, fsp = %lld\n", (long long)vm->cpu[vm->active].ip, (long long)vm->fsp);
    exit(1);
  }
  if (vm->afsp < 0 || vm->afsp > 255) {
    printf("\nERROR (nga/float_guard): Alternate Float Stack Limits Exceeded!\n");
    printf("At %lld, afsp = %lld\n", (long long)vm->cpu[vm->active].ip, (long long)vm->afsp);
    exit(1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2075b8(%rax)
jl 0x5339
movq -0x8(%rbp), %rax
cmpl $0xff, 0x2075b8(%rax)
jle 0x538d
leaq 0x7e8c(%rip), %rdi      # 0xd1cc
movb $0x0, %al
callq 0x3130
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0x2075b8(%rax), %rdx
leaq 0x7e88(%rip), %rdi      # 0xd204
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2075bc(%rax)
jl 0x53aa
movq -0x8(%rbp), %rax
cmpl $0xff, 0x2075bc(%rax)
jle 0x53fe
leaq 0x7e68(%rip), %rdi      # 0xd219
movb $0x0, %al
callq 0x3130
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movslq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0x2075bc(%rax), %rdx
leaq 0x7e6e(%rip), %rdi      # 0xd25b
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x33a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/./dev-float.c
// Function: float_to_number
void float_to_number(NgaState *vm) {
  double a = float_pop(vm);
  if (a > 2147483647)
    a = 2147483647;
  if (a < -2147483648)
    a = -2147483648;
  stack_push(vm, (CELL)round(a));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5460
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0x77f1(%rip), %xmm1     # 0xd038
ucomisd %xmm1, %xmm0
jbe 0x585a
movsd 0x77e3(%rip), %xmm0     # 0xd038
movsd %xmm0, -0x10(%rbp)
movsd 0x77de(%rip), %xmm0     # 0xd040
ucomisd -0x10(%rbp), %xmm0
jbe 0x5876
movsd 0x77cf(%rip), %xmm0     # 0xd040
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x3080
movq -0x18(%rbp), %rdi
cvttsd2si %xmm0, %esi
callq 0x3980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)