// File: /workspace/github_c_makefile_star2_O0/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_register_prim
af_word_t* af_register_prim(af_global_t* global, af_task_t* task,
			    af_byte_t* name, af_prim_t prim,
			    af_cell_t flags, af_wordlist_t* wordlist) {
  void* word_space;
  af_word_t* word;
  af_cell_t name_length;
  size_t data_space_current = (size_t)task->data_space_current;
  size_t name_size;
  size_t pad_size;
  if(name) {
    name_length = strlen(name);
  } else {
    name_length = 0;
  }
  name_size = (name_length + 1) * sizeof(af_byte_t);
  pad_size = ((data_space_current + name_size) % sizeof(af_cell_t)) == 0 ?
    0 * sizeof(af_byte_t) :
    sizeof(af_cell_t) - ((data_space_current + name_size) % sizeof(af_cell_t));
  word_space = af_allocate(global, task,
			   sizeof(af_word_t) + name_size + pad_size);
  word = word_space + name_size + pad_size;
  word->flags = flags;
  AF_WORD_NAME_LEN(word) = (af_byte_t)name_length;
  if(name) {
    memcpy(AF_WORD_NAME_DATA(word), name, name_length);
    word->next_word = wordlist->first_word;
    wordlist->first_word = word;
  } else {
    word->next_word = NULL;
  }
  word->next_of_all_words = global->first_of_all_words;
  global->first_of_all_words = word;
  task->most_recent_word = word;
  word->code = prim;
  word->secondary = NULL;
  return word;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5a85
movq -0x18(%rbp), %rdi
callq 0x2110
movq %rax, -0x48(%rbp)
jmp 0x5a8d
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
shlq $0x0, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
addq -0x58(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x5ab7
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x5acf
movq -0x50(%rbp), %rcx
addq -0x58(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rdx
addq $0x28, %rdx
addq -0x60(%rbp), %rdx
callq 0x4790
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq -0x58(%rbp), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, -0x1(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x5b68
movq -0x40(%rbp), %rdi
addq $-0x1, %rdi
movq -0x40(%rbp), %rax
movzbl -0x1(%rax), %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x21c0
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5b74
movq -0x40(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x190(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x40(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)