// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_print_state
void af_print_state(af_global_t* global, af_task_t* task) {
  af_byte_t length = AF_WORD_NAME_LEN(task->current_word);
  af_byte_t* buffer = malloc((length + 1) * sizeof(af_byte_t));
  af_cell_t* data_stack = task->data_stack_current;
  af_cell_t return_count = task->return_stack_base - task->return_stack_current;
  af_cell_t stack_count = 4;
  memcpy(buffer, AF_WORD_NAME_DATA(task->current_word),
	 length * sizeof(af_byte_t));
  buffer[length] = 0;
  fprintf(stderr, "Entering: ");
  while(return_count--) {
    fprintf(stderr, "  ");
  }
  fprintf(stderr, "%s", buffer);
  while(stack_count && data_stack < task->data_stack_base) {
    fprintf(stderr, " %lld", *data_stack++);
    stack_count--;
  }
  if(!stack_count && data_stack != task->data_stack_base) {
    fprintf(stderr, " ...");
  }
  fprintf(stderr, "\n");
  free(buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movb -0x1(%rax), %al
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x21f0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rsi
addq $-0x1, %rsi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movzbl -0x1(%rax), %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movzbl -0x11(%rbp), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x21c0
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq 0x2aadf(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x16ae1(%rip), %rsi     # 0x1a004
movb $0x0, %al
callq 0x21b0
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rbp)
cmpq $0x0, %rax
je 0x3559
movq 0x2aab2(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x16abf(%rip), %rsi     # 0x1a00f
movb $0x0, %al
callq 0x21b0
jmp 0x352a
movq 0x2aa98(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x16aa4(%rip), %rsi     # 0x1a012
movb $0x0, %al
callq 0x21b0
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x39(%rbp)
je 0x3596
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x90(%rcx), %rax
setb %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x359f
jmp 0x35d7
movq 0x2aa52(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movq (%rax), %rdx
leaq 0x16a53(%rip), %rsi     # 0x1a015
movb $0x0, %al
callq 0x21b0
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3575
cmpq $0x0, -0x38(%rbp)
jne 0x3607
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x90(%rcx), %rax
je 0x3607
movq 0x2aa02(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x16a1b(%rip), %rsi     # 0x1a01b
movb $0x0, %al
callq 0x21b0
movq 0x2a9ea(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
leaq 0x16b1c(%rip), %rsi     # 0x1a134
movb $0x0, %al
callq 0x21b0
movq -0x20(%rbp), %rdi
callq 0x2040
addq $0x40, %rsp
popq %rbp
retq
nop