LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: Pair_new
int Pair_new(lua_State *L) {

  // Extract the x, y data from the stack.
  luaL_checktype(L, 2, LUA_TTABLE);
      // stack = [self, p]
  lua_rawgeti(L, 2, 1);  // 2, 1 = idx in stack, idx in table
      // stack = [self, p, p[1]]
  lua_rawgeti(L, 2, 2);
      // stack = [self, p, p[1], p[2]]
  lua_Number x = lua_tonumber(L, -2);  // p[1]
  lua_Number y = lua_tonumber(L, -1);  // p[2]
  lua_settop(L, 0);
      // stack = []

  // Create a Pair instance and set its metatable.
  Pair *pair = (Pair *)lua_newuserdata(L, sizeof(Pair));
      // stack = [pair]
  luaL_getmetatable(L, Pair_metatable);
      // stack = [pair, mt]
  lua_setmetatable(L, 1);
      // stack = [pair]

  // Set up the C data.
  pair->x = x;
  pair->y = y;

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x203e0
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x74c0
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x2, %edx
callq 0x74c0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %eax, %eax
movl %eax, %edx
callq 0x6650
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x6650
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5dc0
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x8990
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0xe35(%rip), %rdx       # 0x34095
callq 0x72f0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7ef0
movsd -0x10(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: push_new_pair
void push_new_pair(lua_State *L, lua_Number x, lua_Number y) {

  // Clear the stack.
  lua_settop(L, 0);
    // stack = []

  // Set up the new resulting Pair instance.
  lua_newtable(L);
    // stack = [t (the new table)]
  lua_pushnumber(L, x);
    // stack = [t, x]
  lua_rawseti(L, -2, 1);  // t[1] = x
    // stack = [t]
  lua_pushnumber(L, y);
    // stack = [t, y]
  lua_rawseti(L, -2, 2);  // t[2] = y
    // stack = [t]
  lua_pushvalue(L, -1);
    // stack = [t, t]
  Pair_new(L);
    // stack = [new Pair from t]
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5dc0
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x75e0
movq -0x8(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0x6b90
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x7d60
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x6b90
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %edx
callq 0x7d60
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6190
movq -0x8(%rbp), %rdi
callq 0x331c0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: Pair_mt_index
int Pair_mt_index(lua_State *L) {

  // Expected: stack = [self, key]
  Pair *pair = (Pair *)luaL_checkudata(L, 1, Pair_metatable);

  // Find the key value as either 1 (x) or 2 (y).
  int key = 0;
  int t = lua_type(L, 2);
  if (t == LUA_TNUMBER) {
    int ok;
    key = (int)lua_tointegerx(L, 2, &ok);
    if (!ok || (key != 1 && key != 2)) key = 0;
  } else if (t == LUA_TSTRING) {
    const char *str_key = lua_tostring(L, 2);
    if (strcmp(str_key, "x") == 0) key = 1;
    if (strcmp(str_key, "y") == 0) key = 2;
  }

  // Push the value.
  if (key) {
    lua_pushnumber(L, key == 1 ? pair->x : pair->y);
  } else {
    lua_pushnil(L);
  }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0xd49(%rip), %rdx       # 0x34095
callq 0x20120
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x61f0
movl %eax, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jne 0x333a3
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq -0x1c(%rbp), %rdx
callq 0x66e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x3339a
cmpl $0x1, -0x14(%rbp)
je 0x333a1
cmpl $0x2, -0x14(%rbp)
je 0x333a1
movl $0x0, -0x14(%rbp)
jmp 0x333fb
cmpl $0x4, -0x18(%rbp)
jne 0x333f9
movq -0x8(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x67d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x3483(%rip), %rsi      # 0x3684d
callq 0x5270
cmpl $0x0, %eax
jne 0x333db
movl $0x1, -0x14(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x35d7(%rip), %rsi      # 0x369bd
callq 0x5270
cmpl $0x0, %eax
jne 0x333f7
movl $0x2, -0x14(%rbp)
jmp 0x333f9
jmp 0x333fb
cmpl $0x0, -0x14(%rbp)
je 0x3343c
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x3341e
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x3342c
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x6b90
jmp 0x33445
movq -0x8(%rbp), %rdi
callq 0x6b60
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: Pair_mt_add
int Pair_mt_add(lua_State *L) {

  // Expected: stack = [self, other]
  // other may be a Pair or a table of the form {x, y}.
  
  // Extract the pairs p, q from the stack.
  Pair *pair = (Pair *)luaL_checkudata(L, 1, Pair_metatable);
  lua_Number p[2] = {pair->x, pair->y};
  lua_Number q[2];
  for (int i = 0; i < 2; ++i) {
    lua_pushnumber(L, i + 1);
      // stack = [self, other, i + 1]
    lua_gettable(L, 2);
      // stack = [self, other, other[i + 1]]
    if (lua_type(L, -1) != LUA_TNUMBER) {
      return luaL_argerror(L, 2, "bad 2nd addend");
    }
    q[i] = lua_tonumber(L, -1);
    lua_pop(L, 1);
      // stack = [self, other]
  }
  lua_settop(L, 0);
    // stack = []

  // Set up a new table with the sum.
  push_new_pair(L, p[0] + q[0], p[1] + q[1]);

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0xc29(%rip), %rdx       # 0x34095
callq 0x20120
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jge 0x33527
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm0
callq 0x6b90
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x7220
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x61f0
cmpl $0x3, %eax
je 0x334ef
movq -0x10(%rbp), %rdi
movl $0x2, %esi
leaq 0x41f7(%rip), %rdx      # 0x376dc
callq 0x1fab0
movl %eax, -0x4(%rbp)
jmp 0x33556
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x6650
movslq -0x44(%rbp), %rax
movsd %xmm0, -0x40(%rbp,%rax,8)
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5dc0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x33497
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5dc0
movq -0x10(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
addsd -0x38(%rbp), %xmm1
callq 0x332a0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: Pair_mt_mul
int Pair_mt_mul(lua_State *L) {

  // Expected: stack = [self, scalar]

  // Extract the needed values.
  Pair *pair = (Pair *)luaL_checkudata(L, 1, Pair_metatable);
  lua_Number scalar = luaL_checknumber(L, 2);

  // Set up the new resulting Pair instance.
  push_new_pair(L, pair->x * scalar, pair->y * scalar);

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0xb19(%rip), %rdx       # 0x34095
callq 0x20120
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x204b0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
mulsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm1
mulsd -0x18(%rbp), %xmm1
callq 0x332a0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch4/Pair.c
// Function: Pair_mt_eq
int Pair_mt_eq(lua_State *L) {

  // Expected: stack = [self (p), other (q)]

  // Extract the pairs p, q from the stack.
  Pair *p = (Pair *)luaL_checkudata(L, 1, Pair_metatable);
  Pair *q = (Pair *)luaL_testudata(L, 2, Pair_metatable);

  // Push true or false onto the stack.
  if (q == NULL) {
    lua_pushboolean(L, 0);  // If q is not a Pair, return false.
  } else {
    lua_pushboolean(L, p->x == q->x && p->y == q->y);
  }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0xaa9(%rip), %rdx       # 0x34095
callq 0x20120
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0xa90(%rip), %rdx       # 0x34095
callq 0x20080
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x33622
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x6fc0
jmp 0x33671
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x18(%rbp), %rcx
xorl %eax, %eax
ucomisd (%rcx), %xmm0
movb %al, -0x19(%rbp)
jne 0x33660
jp 0x33660
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomisd 0x8(%rax), %xmm0
sete %al
setnp %cl
andb %cl, %al
movb %al, -0x19(%rbp)
movq -0x28(%rbp), %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x6fc0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/macro11.c
// Function: print_version
static void print_version(
    FILE *strm)
{
    fprintf(strm, "macro11 - portable MACRO11 assembler for DEC PDP-11\n");
    fprintf(strm, "  Version %s\n", VERSIONSTR);
    fprintf(strm, "  Copyright 2001 Richard Krehbiel,\n");
    fprintf(strm, "  modified 2009 by Joerg Hoppe,\n");
    fprintf(strm, "  modified 2015 by Olaf 'Rhialto' Seibert.\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x11504(%rip), %rsi     # 0x1495b
movb $0x0, %al
callq 0x21c0
movq -0x8(%rbp), %rdi
leaq 0x11527(%rip), %rsi     # 0x14990
leaq 0x1152e(%rip), %rdx     # 0x1499e
movb $0x0, %al
callq 0x21c0
movq -0x8(%rbp), %rdi
leaq 0x1152f(%rip), %rsi     # 0x149b1
movb $0x0, %al
callq 0x21c0
movq -0x8(%rbp), %rdi
leaq 0x11541(%rip), %rsi     # 0x149d5
movb $0x0, %al
callq 0x21c0
movq -0x8(%rbp), %rdi
leaq 0x11550(%rip), %rsi     # 0x149f6
movb $0x0, %al
callq 0x21c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/macro11.c
// Function: enable_tf
static void enable_tf(
    char *opt,
    int tf)
{
    if (strcmp(opt, "AMA") == 0)
        enabl_ama = tf;
    else if (strcmp(opt, "GBL") == 0)
        enabl_gbl = tf;
    else if (strcmp(opt, "ME") == 0)
        list_me = tf;
    else if (strcmp(opt, "BEX") == 0)
        list_bex = tf;
    else if (strcmp(opt, "MD") == 0)
        list_md = tf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x11548(%rip), %rsi     # 0x14a22
callq 0x21b0
cmpl $0x0, %eax
jne 0x34f5
movl -0xc(%rbp), %ecx
leaq 0x166ae(%rip), %rax     # 0x19b9c
movl %ecx, (%rax)
jmp 0x3587
movq -0x8(%rbp), %rdi
leaq 0x11526(%rip), %rsi     # 0x14a26
callq 0x21b0
cmpl $0x0, %eax
jne 0x3518
movl -0xc(%rbp), %ecx
leaq 0x15c84(%rip), %rax     # 0x19198
movl %ecx, (%rax)
jmp 0x3585
movq -0x8(%rbp), %rdi
leaq 0x11507(%rip), %rsi     # 0x14a2a
callq 0x21b0
cmpl $0x0, %eax
jne 0x353b
movl -0xc(%rbp), %ecx
leaq 0x16531(%rip), %rax     # 0x19a68
movl %ecx, (%rax)
jmp 0x3583
movq -0x8(%rbp), %rdi
leaq 0x114e7(%rip), %rsi     # 0x14a2d
callq 0x21b0
cmpl $0x0, %eax
jne 0x355e
movl -0xc(%rbp), %ecx
leaq 0x16512(%rip), %rax     # 0x19a6c
movl %ecx, (%rax)
jmp 0x3581
movq -0x8(%rbp), %rdi
leaq 0x114c8(%rip), %rsi     # 0x14a31
callq 0x21b0
cmpl $0x0, %eax
jne 0x357f
movl -0xc(%rbp), %ecx
leaq 0x164e7(%rip), %rax     # 0x19a64
movl %ecx, (%rax)
jmp 0x3581
jmp 0x3583
jmp 0x3585
jmp 0x3587
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/macro11.c
// Function: append_env
static void append_env(
    char *envname,
    char *value)
{
    char           *env = getenv(envname);
    char           *temp;

    if (env == NULL)
        env = "";

    temp = memcheck(malloc(strlen(envname) +
                           1 +
                           strlen(env) +
                           1 +
                           strlen(value) +
                           1));
    strcpy(temp, envname);
    strcat(temp, "=");
    strcat(temp, env);
    strcat(temp, PATHSEP);
    strcat(temp, value);
    putenv(temp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2030
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x35bf
leaq 0x12744(%rip), %rax     # 0x15cff
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20c0
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20c0
movq -0x28(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x136a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2070
movq -0x20(%rbp), %rdi
leaq 0x1140c(%rip), %rsi     # 0x14a34
callq 0x2290
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2290
movq -0x20(%rbp), %rdi
leaq 0x113f1(%rip), %rsi     # 0x14a36
callq 0x2290
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2290
movq -0x20(%rbp), %rdi
callq 0x21a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble.c
// Function: get_next_lsb
int get_next_lsb(
    void)
{
    if (lsb_used) {
        lsb_used = 0;
        if (enabl_debug && lstfile) {
            fprintf(lstfile, "get_next_lsb: lsb: %d becomes %d (= next_lsb)\n", lsb, next_lsb);
        }
        return next_lsb++;
    } else {
        if (enabl_debug && lstfile) {
            fprintf(lstfile, "get_next_lsb: lsb: stays %d\n", lsb);
        }
        return lsb;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1650d(%rip), %rax     # 0x19b8c
cmpl $0x0, (%rax)
je 0x36f0
leaq 0x16501(%rip), %rax     # 0x19b8c
movl $0x0, (%rax)
leaq 0x16500(%rip), %rax     # 0x19b98
cmpl $0x0, (%rax)
je 0x36d4
leaq 0x17fdc(%rip), %rax     # 0x1b680
cmpq $0x0, (%rax)
je 0x36d4
leaq 0x17fcf(%rip), %rax     # 0x1b680
movq (%rax), %rdi
leaq 0x164cd(%rip), %rax     # 0x19b88
movl (%rax), %edx
leaq 0x164cc(%rip), %rax     # 0x19b90
movl (%rax), %ecx
leaq 0x114f3(%rip), %rsi     # 0x14bc0
movb $0x0, %al
callq 0x21c0
leaq 0x164b5(%rip), %rax     # 0x19b90
movl (%rax), %eax
movl %eax, %edx
addl $0x1, %edx
leaq 0x164a7(%rip), %rcx     # 0x19b90
movl %edx, (%rcx)
movl %eax, -0x4(%rbp)
jmp 0x3736
leaq 0x164a1(%rip), %rax     # 0x19b98
cmpl $0x0, (%rax)
je 0x372a
leaq 0x17f7d(%rip), %rax     # 0x1b680
cmpq $0x0, (%rax)
je 0x372a
leaq 0x17f70(%rip), %rax     # 0x1b680
movq (%rax), %rdi
leaq 0x1646e(%rip), %rax     # 0x19b88
movl (%rax), %edx
leaq 0x114cc(%rip), %rsi     # 0x14bef
movb $0x0, %al
callq 0x21c0
leaq 0x16457(%rip), %rax     # 0x19b88
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble.c
// Function: assemble_stack
int assemble_stack(
    STACK *stack,
    TEXT_RLD *tr)
{
    int             res;
    int             errcount = 0;

    while ((res = assemble(stack, tr)) >= 0) {
        list_flush();
        if (res == 0)
            errcount++;                   /* Count an error */
    }

    return errcount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3790
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x3782
callq 0xa5d0
cmpl $0x0, -0x14(%rbp)
jne 0x3780
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3757
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: new_section
SECTION        *new_section(
    void)
{
    SECTION        *sect = memcheck(malloc(sizeof(SECTION)));

    sect->flags = 0;
    sect->size = 0;
    sect->pc = 0;
    sect->type = 0;
    sect->sector = 0;
    sect->label = NULL;
    return sect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x2220
movq %rax, %rdi
callq 0x136a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: change_dot
void change_dot(
    TEXT_RLD *tr,
    int size)
{
    if (size > 0) {
        if (last_dot_section != current_pc->section) {
            text_define_location(tr, current_pc->section->label, &current_pc->value);
            last_dot_section = current_pc->section;
            last_dot_addr = current_pc->value;
        }
        if (last_dot_addr != current_pc->value) {
            text_modify_location(tr, &current_pc->value);
            last_dot_addr = current_pc->value;
        }

        /* Update for next time */
        last_dot_addr += size;
    }

    if (DOT + size > current_pc->section->size)
        current_pc->section->size = DOT + size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x7793
leaq 0x13fa8(%rip), %rax     # 0x1b678
movq (%rax), %rax
leaq 0x13f8e(%rip), %rcx     # 0x1b668
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0x7739
movq -0x8(%rbp), %rdi
leaq 0x13f7a(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
leaq 0x13f69(%rip), %rax     # 0x1b668
movq (%rax), %rdx
addq $0x8, %rdx
callq 0x11fe0
leaq 0x13f56(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq 0x18(%rax), %rcx
leaq 0x13f58(%rip), %rax     # 0x1b678
movq %rcx, (%rax)
leaq 0x13f3e(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %ecx
leaq 0x13f39(%rip), %rax     # 0x1b670
movl %ecx, (%rax)
leaq 0x13f30(%rip), %rax     # 0x1b670
movl (%rax), %eax
leaq 0x13f1f(%rip), %rcx     # 0x1b668
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
je 0x777e
movq -0x8(%rbp), %rdi
leaq 0x13f0c(%rip), %rax     # 0x1b668
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x120e0
leaq 0x13ef9(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %ecx
leaq 0x13ef4(%rip), %rax     # 0x1b670
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
leaq 0x13ee8(%rip), %rax     # 0x1b670
addl (%rax), %ecx
leaq 0x13edf(%rip), %rax     # 0x1b670
movl %ecx, (%rax)
leaq 0x13ece(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %eax
addl -0xc(%rbp), %eax
leaq 0x13ebe(%rip), %rcx     # 0x1b668
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x14(%rcx), %eax
jbe 0x77d7
leaq 0x13eab(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %ecx
addl -0xc(%rbp), %ecx
leaq 0x13e9b(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x14(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: store_limits
int store_limits(
    STREAM *str,
    TEXT_RLD *tr)
{
    change_dot(tr, 4);
    list_word(str, DOT, 0, 2, "");
    list_word(str, DOT + 2, 0, 2, "");
    return text_limits(tr, &DOT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x76b0
movq -0x8(%rbp), %rdi
leaq 0x13def(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %esi
xorl %edx, %edx
movl $0x2, %ecx
leaq 0xe472(%rip), %r8       # 0x15cff
callq 0xa6b0
movq -0x8(%rbp), %rdi
leaq 0x13dcb(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %esi
addl $0x2, %esi
xorl %edx, %edx
movl $0x2, %ecx
leaq 0xe44b(%rip), %r8       # 0x15cff
callq 0xa6b0
movq -0x10(%rbp), %rdi
leaq 0x13da4(%rip), %rax     # 0x1b668
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x12180
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: get_register
unsigned get_register(
    EX_TREE *expr)
{
    unsigned        reg;

    if (expr->type == EX_LIT && expr->data.lit <= 7) {
        reg = expr->data.lit;
        return reg;
    }

    if (expr->type == EX_SYM && expr->data.symbol->section->type == SECTION_REGISTER) {
        reg = expr->data.symbol->value;
        return reg;
    }

    return NO_REG;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x794d
movq -0x10(%rbp), %rax
cmpl $0x7, 0x10(%rax)
ja 0x794d
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7985
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x797e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x5, 0x8(%rax)
jne 0x797e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7985
movl $0x1ff, -0x4(%rbp)      # imm = 0x1FF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: implicit_gbl
void implicit_gbl(
    EX_TREE *value)
{
    if (pass)
        return;                        /* Only do this in first pass */

    if (!enabl_gbl)
        return;                        /* Option not enabled, don't do it. */

    switch (value->type) {
    case EX_UNDEFINED_SYM:
        {
            if (!(value->data.symbol->flags & SYMBOLFLAG_LOCAL)) {      /* Unless it's a
                                                                           local symbol, */
                add_sym(value->data.symbol->label, 0, SYMBOLFLAG_GLOBAL, &absolute_section, &implicit_st);
            }
        }
        break;
    case EX_LIT:
    case EX_SYM:
    case EX_TEMP_SYM: // Impossible on this pass
        return;
    case EX_ADD:
    case EX_SUB:
    case EX_MUL:
    case EX_DIV:
    case EX_AND:
    case EX_OR:
        implicit_gbl(value->data.child.right);
        /* falls into... */
    case EX_COM:
    case EX_NEG:
        implicit_gbl(value->data.child.left);
        break;
    case EX_ERR:
        if (value->data.child.left)
            implicit_gbl(value->data.child.left);
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x121dd(%rip), %rax     # 0x19b80
cmpl $0x0, (%rax)
je 0x79ad
jmp 0x7a5b
leaq 0x117e4(%rip), %rax     # 0x19198
cmpl $0x0, (%rax)
jne 0x79be
jmp 0x7a5b
movq -0x8(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0xc, %eax
ja 0x7a5b
movq -0x10(%rbp), %rax
leaq 0xd86c(%rip), %rcx      # 0x1524c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x7a21
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
leaq 0x1180b(%rip), %rcx     # 0x19220
leaq 0x1bcb4(%rip), %r8      # 0x236d0
callq 0xe1e0
jmp 0x7a5b
jmp 0x7a5b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x7990
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x7990
jmp 0x7a5b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x7a59
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x7990
jmp 0x7a5b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: migrate_implicit
void migrate_implicit(
    void)
{
    SYMBOL_ITER     iter;
    SYMBOL         *isym,
                   *sym;

    for (isym = first_sym(&implicit_st, &iter); isym != NULL; isym = next_sym(&implicit_st, &iter)) {
        sym = lookup_sym(isym->label, &symbol_st);
        if (sym) {
            continue;                  // It's already in there.  Great.
        }
        isym->flags |= SYMBOLFLAG_IMPLICIT_GLOBAL;
        sym = add_sym(isym->label, isym->value, isym->flags, isym->section, &symbol_st);
        // Just one other thing - migrate the stmtno
        sym->stmtno = isym->stmtno;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x1bc51(%rip), %rdi     # 0x236d0
leaq -0x10(%rbp), %rsi
callq 0xe150
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7b18
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x13c0b(%rip), %rsi     # 0x1b6b0
callq 0xe040
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7ab7
jmp 0x7aff
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x13bc8(%rip), %r8      # 0x1b6b0
callq 0xe1e0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
leaq 0x1bbca(%rip), %rdi     # 0x236d0
leaq -0x10(%rbp), %rsi
callq 0xe0c0
movq %rax, -0x18(%rbp)
jmp 0x7a8c
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: express_sym_offset
int express_sym_offset(
    EX_TREE *value,
    SYMBOL **sym,
    unsigned *offset)
{
    implicit_gbl(value);               /* Translate tree's undefined syms
                                          into global syms */

    /* Internally relocatable symbols will have been summed down into
       EX_TEMP_SYM's. */

    if (value->type == EX_SYM || value->type == EX_TEMP_SYM) {
        *sym = value->data.symbol;
        *offset = 0;
        return 1;
    }

    /* What remains is external symbols. */

    if (value->type == EX_ADD) {
        EX_TREE        *left = value->data.child.left;
        EX_TREE        *right = value->data.child.right;

        if ((left->type != EX_SYM && left->type != EX_UNDEFINED_SYM) || right->type != EX_LIT)
            return 0;                  /* Failed. */
        *sym = left->data.symbol;
        *offset = right->data.lit;
        return 1;
    }

    if (value->type == EX_SUB) {
        EX_TREE        *left = value->data.child.left;
        EX_TREE        *right = value->data.child.right;

        if ((left->type != EX_SYM && left->type != EX_UNDEFINED_SYM) || right->type != EX_LIT)
            return 0;                  /* Failed. */
        *sym = left->data.symbol;
        *offset = (unsigned) -(int) (right->data.lit);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7990
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0x7b4f
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x7b74
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7c54
movq -0x10(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x7be1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x2, (%rax)
je 0x7ba7
movq -0x28(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x7bb0
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
je 0x7bbc
movl $0x0, -0x4(%rbp)
jmp 0x7c54
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7c54
movq -0x10(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x7c4d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x2, (%rax)
je 0x7c14
movq -0x38(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x7c1d
movq -0x40(%rbp), %rax
cmpl $0x1, (%rax)
je 0x7c26
movl $0x0, -0x4(%rbp)
jmp 0x7c54
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
xorl %ecx, %ecx
subl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7c54
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: store_complex_displaced
static void store_complex_displaced(
    STREAM *refstr,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    TEXT_COMPLEX    tx;

    change_dot(tr, size);

    implicit_gbl(value);               /* Turn undefined symbols into globals */

    text_complex_begin(&tx);

    if (!complex_tree(&tx, value)) {
        report(refstr, "Invalid expression\n");
        store_word(refstr, tr, size, 0);
    } else {
        list_word(refstr, DOT, 0, size, "C");
        text_complex_commit_displaced(tr, &DOT, size, &tx, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x76b0
movq -0x20(%rbp), %rdi
callq 0x7990
leaq -0xa4(%rbp), %rdi
callq 0x124f0
movq -0x20(%rbp), %rsi
leaq -0xa4(%rbp), %rdi
callq 0x7c60
cmpl $0x0, %eax
jne 0x84c6
movq -0x8(%rbp), %rdi
leaq 0xcf1b(%rip), %rsi      # 0x153c6
movb $0x0, %al
callq 0xa890
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
xorl %ecx, %ecx
callq 0x77e0
jmp 0x850c
movq -0x8(%rbp), %rdi
leaq 0x13197(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %esi
movl -0x14(%rbp), %ecx
xorl %edx, %edx
leaq 0xd51a(%rip), %r8       # 0x159fd
callq 0xa6b0
movq -0x10(%rbp), %rdi
leaq 0x13175(%rip), %rax     # 0x1b668
movq (%rax), %rsi
addq $0x8, %rsi
movl -0x14(%rbp), %edx
leaq -0xa4(%rbp), %rcx
xorl %r8d, %r8d
callq 0x129f0
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: store_complex
static void store_complex(
    STREAM *refstr,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    TEXT_COMPLEX    tx;

    change_dot(tr, size);              /* About to store - update DOT */

    implicit_gbl(value);               /* Turn undefined symbols into globals */

    text_complex_begin(&tx);           /* Open complex expression */

    if (!complex_tree(&tx, value)) {   /* Translate */
        report(refstr, "Invalid expression\n");
        store_word(refstr, tr, size, 0);
    } else {
        list_word(refstr, DOT, 0, size, "C");
        text_complex_commit(tr, &DOT, size, &tx, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x76b0
movq -0x20(%rbp), %rdi
callq 0x7990
leaq -0xa4(%rbp), %rdi
callq 0x124f0
movq -0x20(%rbp), %rsi
leaq -0xa4(%rbp), %rdi
callq 0x7c60
cmpl $0x0, %eax
jne 0x8596
movq -0x8(%rbp), %rdi
leaq 0xce4b(%rip), %rsi      # 0x153c6
movb $0x0, %al
callq 0xa890
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
xorl %ecx, %ecx
callq 0x77e0
jmp 0x85dc
movq -0x8(%rbp), %rdi
leaq 0x130c7(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %esi
movl -0x14(%rbp), %ecx
xorl %edx, %edx
leaq 0xd44a(%rip), %r8       # 0x159fd
callq 0xa6b0
movq -0x10(%rbp), %rdi
leaq 0x130a5(%rip), %rax     # 0x1b668
movq (%rax), %rsi
addq $0x8, %rsi
movl -0x14(%rbp), %edx
leaq -0xa4(%rbp), %rcx
xorl %r8d, %r8d
callq 0x128e0
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: eval_defined
int eval_defined(
    EX_TREE *value)
{
    switch (value->type) {
    case EX_LIT:
        return 1;
    case EX_SYM:
        return 1;
    case EX_UNDEFINED_SYM:
        return 0;
    case EX_AND:
        return eval_defined(value->data.child.left) && eval_defined(value->data.child.right);
    case EX_OR:
        return eval_defined(value->data.child.left) || eval_defined(value->data.child.right);
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xc, %eax
ja 0x86c0
movq -0x18(%rbp), %rax
leaq 0xcc96(%rip), %rcx      # 0x152b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x86c7
movl $0x1, -0x4(%rbp)
jmp 0x86c7
movl $0x0, -0x4(%rbp)
jmp 0x86c7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x85f0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x8677
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x85f0
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x86c7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x85f0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x1a(%rbp)
jne 0x86b3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x85f0
cmpl $0x0, %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x86c7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: eval_undefined
int eval_undefined(
    EX_TREE *value)
{
    switch (value->type) {
    case EX_UNDEFINED_SYM:
        return 1;
    case EX_SYM:
        return 0;
    case EX_AND:
        return eval_undefined(value->data.child.left) && eval_undefined(value->data.child.right);
    case EX_OR:
        return eval_undefined(value->data.child.left) || eval_undefined(value->data.child.right);
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xb, %eax
ja 0x8795
movq -0x18(%rbp), %rax
leaq 0xcbe9(%rip), %rcx      # 0x152e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x879c
movl $0x0, -0x4(%rbp)
jmp 0x879c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x86d0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x874c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x86d0
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x879c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x86d0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x1a(%rbp)
jne 0x8788
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x86d0
cmpl $0x0, %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x879c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: push_cond
void push_cond(
    int ok,
    STREAM *str)
{
    last_cond++;
    assert(last_cond < MAX_CONDS);
    conds[last_cond].ok = ok;
    conds[last_cond].file = memcheck(strdup(str->name));
    conds[last_cond].line = str->line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x12d0a(%rip), %rax     # 0x1b4d0
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x12cfe(%rip), %rax     # 0x1b4d0
movl %ecx, (%rax)
leaq 0x12cf5(%rip), %rax     # 0x1b4d0
cmpl $0x100, (%rax)          # imm = 0x100
jge 0x87e5
jmp 0x8804
leaq 0xcb2c(%rip), %rdi      # 0x15318
leaq 0xcb3b(%rip), %rsi      # 0x1532e
movl $0x233, %edx            # imm = 0x233
leaq 0xcb3e(%rip), %rcx      # 0x1533d
callq 0x2100
movl -0x4(%rbp), %ecx
leaq 0x12cc2(%rip), %rax     # 0x1b4d0
movslq (%rax), %rdx
leaq 0x114b8(%rip), %rax     # 0x19cd0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x22d0
movq %rax, %rdi
callq 0x136a0
movq %rax, %rcx
leaq 0x12c90(%rip), %rax     # 0x1b4d0
movslq (%rax), %rdx
leaq 0x11486(%rip), %rax     # 0x19cd0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x12c6d(%rip), %rax     # 0x1b4d0
movslq (%rax), %rdx
leaq 0x11463(%rip), %rax     # 0x19cd0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: go_section
void go_section(
    TEXT_RLD *tr,
    SECTION *sect)
{
    (void)tr;

    if (current_pc->section == sect)
        return;                        /* This is too easy */

    /* save current PC value for old section */
    current_pc->section->pc = DOT;

    /* Set current section and PC value */
    current_pc->section = sect;
    DOT = sect->pc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x12d75(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x8902
jmp 0x8946
leaq 0x12d5f(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %ecx
leaq 0x12d52(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
leaq 0x12d3d(%rip), %rax     # 0x1b668
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x12d28(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl %ecx, 0x8(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: store_value
void store_value(
    STACK *stack,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    SYMBOL         *sym;
    unsigned        offset;

    implicit_gbl(value);               /* turn undefined symbols into globals */

    if (value->type == EX_LIT) {
        store_word(stack->top, tr, size, value->data.lit);
    } else if (!express_sym_offset(value, &sym, &offset)) {
        store_complex(stack->top, tr, size, value);
    } else {
        if ((sym->flags & (SYMBOLFLAG_GLOBAL | SYMBOLFLAG_DEFINITION)) == SYMBOLFLAG_GLOBAL) {
            store_global_offset_word(stack->top, tr, size, sym->value + offset, sym->label);
        } else if (sym->section != current_pc->section) {
            store_psect_offset_word(stack->top, tr, size, sym->value + offset, sym->section->label);
        } else {
            store_internal_word(stack->top, tr, size, sym->value + offset);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x7990
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x8998
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
callq 0x77e0
jmp 0x8a64
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x7b20
cmpl $0x0, %eax
jne 0x89ca
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x8520
jmp 0x8a62
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xa, %eax
cmpl $0x2, %eax
jne 0x89ff
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
addl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %r8
callq 0x8290
jmp 0x8a60
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x12c5a(%rip), %rcx     # 0x1b668
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0x8a41
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
addl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %r8
callq 0x83e0
jmp 0x8a5e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
addl -0x2c(%rbp), %ecx
callq 0x8300
jmp 0x8a60
jmp 0x8a62
jmp 0x8a64
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: do_word
int do_word(
    STACK *stack,
    TEXT_RLD *tr,
    char *cp,
    int size)
{
    int comma;

    if (size == 2 && (DOT & 1)) {
        report(stack->top, ".WORD on odd boundary\n");
        store_word(stack->top, tr, 1, 0);       /* Align it */
    }

    cp = skipwhite(cp);

    do {
        if (cp[0] == ',') {
            /* Empty expressions count as 0 */
            store_word(stack->top, tr, size, 0);
        } else {
            EX_TREE        *value = parse_expr(cp, 0);

            if (value->cp > cp) {
                store_value(stack, tr, size, value);

                cp = value->cp;
            } else {
                report(stack->top, "Invalid expression in .WORD\n");
                cp = "";                /* force loop to end */
            }

            free_tree(value);
        }
    } while (cp = skipdelim_comma(cp, &comma), !EOL(*cp));

    if (comma) {
        /* Trailing empty expressions count as 0 */
        store_word(stack->top, tr, size, 0);
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x8ace
leaq 0x12bd4(%rip), %rax     # 0x1b668
movq (%rax), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8ace
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xc4f9(%rip), %rsi      # 0x14fa9
movb $0x0, %al
callq 0xa890
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x77e0
movq -0x18(%rbp), %rdi
callq 0xb9e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x8afe
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x77e0
jmp 0x8b66
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xc7b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x8b3d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x8950
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8b5d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xc810(%rip), %rsi      # 0x1535b
movb $0x0, %al
callq 0xa890
leaq 0xd1a6(%rip), %rax      # 0x15cff
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x9390
jmp 0x8b68
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xba70
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movb $0x1, %al
cmpb $0x0, (%rcx)
movb %al, -0x29(%rbp)
je 0x8ba8
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0xa, %ecx
movb %al, -0x29(%rbp)
je 0x8ba8
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x8adb
cmpl $0x0, -0x20(%rbp)
je 0x8bd0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x77e0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: check_branch
int check_branch(
    STACK *stack,
    unsigned offset,
    int min,
    int max)
{
    int             s_offset;

    /* Sign-extend */
    if (offset & 0100000)
        s_offset = offset | ~0177777;
    else
        s_offset = offset & 077777;
    if (s_offset > max || s_offset < min) {
        char            temp[16];

        /* printf can't do signed octal. */
        my_ltoa(s_offset, temp, 8);
        report(stack->top, "Branch target out of range (distance=%s)\n", temp);
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x14(%rbp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x8c0f
movl -0x14(%rbp), %eax
orl $0xffff0000, %eax       # imm = 0xFFFF0000
movl %eax, -0x20(%rbp)
jmp 0x8c1a
movl -0x14(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x8c2a
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x8c5e
movslq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x8, %edx
callq 0x134e0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x30(%rbp), %rdx
leaq 0xc72a(%rip), %rsi      # 0x15378
movb $0x0, %al
callq 0xa890
movl $0x0, -0x4(%rbp)
jmp 0x8c65
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: free_tree
void free_tree(
    EX_TREE *tp)
{
    switch (tp->type) {
    case EX_UNDEFINED_SYM:
    case EX_TEMP_SYM:
        free(tp->data.symbol->label);
        free(tp->data.symbol);
        break;

    case EX_LIT:
    case EX_SYM:
        break;

    case EX_COM:
    case EX_NEG:
        free_tree(tp->data.child.left);
        break;

    case EX_ERR:
        if (tp->data.child.left)
            free_tree(tp->data.child.left);
        break;

    case EX_ADD:
    case EX_SUB:
    case EX_MUL:
    case EX_DIV:
    case EX_AND:
    case EX_OR:
        free_tree(tp->data.child.left);
        free_tree(tp->data.child.right);
        break;
    }
    free(tp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0xc, %eax
ja 0x9427
movq -0x10(%rbp), %rax
leaq 0xc056(%rip), %rcx      # 0x15410
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2040
jmp 0x9427
jmp 0x9427
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9390
jmp 0x9427
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x940b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9390
jmp 0x9427
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9390
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x9390
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)