// File: sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::load_tool_table()
int Interp::load_tool_table()
{
  int n;

  CHKS((_setup.pockets_max > CANON_POCKETS_MAX), NCE_POCKET_MAX_TOO_LARGE);
  for (n = 0; n < _setup.pockets_max; n++) {
    _setup.tool_table[n] = GET_EXTERNAL_TOOL_TABLE(n);
  }
  for (; n < CANON_POCKETS_MAX; n++) {
    _setup.tool_table[n].toolno = -1;
    ZERO_EMC_POSE(_setup.tool_table[n].offset);
    _setup.tool_table[n].diameter = 0;
    _setup.tool_table[n].orientation = 0;
    _setup.tool_table[n].frontangle = 0;
    _setup.tool_table[n].backangle = 0;
  }
  set_tool_parameters();
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0x1165f(%rip), %rax     # 0x86f60
cmpl $0x38, 0xd6c0(%rax)
jle 0x759e6
jmp 0x75910
leaq 0xa413(%rip), %rdi      # 0x7fd2a
callq 0x10380
movq -0x90(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x1162c(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x1161b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x1160d(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0xa3d7(%rip), %rsi      # 0x7fd3f
movl $0x50, %edx
callq 0x10840
movq 0x115e7(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x115d9(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x115c1(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x115b1(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x115a4(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x11596(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x75c2f
jmp 0x759e8
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x11567(%rip), %rcx     # 0x86f60
cmpl 0xd6c0(%rcx), %eax
jge 0x75a45
movl -0x14(%rbp), %esi
leaq -0x88(%rbp), %rdi
callq 0x11f30
movslq -0x14(%rbp), %rax
movq 0x11545(%rip), %rdi     # 0x86f60
addq $0xd6c8, %rdi           # imm = 0xD6C8
imulq $0x70, %rax, %rax
addq %rax, %rdi
leaq -0x88(%rbp), %rsi
movl $0x70, %edx
callq 0x10e60
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x759ef
jmp 0x75a47
cmpl $0x38, -0x14(%rbp)
jge 0x75c1c
movslq -0x14(%rbp), %rcx
movq 0x11504(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movslq -0x14(%rbp), %rcx
movq 0x114e6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movslq -0x14(%rbp), %rcx
movq 0x114c6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
movslq -0x14(%rbp), %rcx
movq 0x114a6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11486(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11466(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11446(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11426(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11406(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rax)
movslq -0x14(%rbp), %rcx
movq 0x113e6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rax)
movslq -0x14(%rbp), %rcx
movq 0x113c6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rax)
movslq -0x14(%rbp), %rcx
movq 0x113a6(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x68(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11387(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x58(%rax)
movslq -0x14(%rbp), %rcx
movq 0x11367(%rip), %rax     # 0x86f60
addq $0xd6c8, %rax           # imm = 0xD6C8
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x75a47
movq -0x90(%rbp), %rdi
callq 0x119a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)