// File: sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_STRAIGHT_TRAVERSE(setup_struct*, int, double, double, double, double, double, double, double, double, double, double, double, double)
int enqueue_STRAIGHT_TRAVERSE(setup_pointer settings, int l, 
                               double dx, double dy, double dz,
                               double x, double y, double z, 
                               double a, double b, double c, 
                               double u, double v, double w) {
    queued_canon q;
    q.type = QSTRAIGHT_TRAVERSE;
    q.data.straight_traverse.line_number = l;
    switch(settings->plane) {
    case CANON_PLANE_XY:
        q.data.straight_traverse.dx = dx;
        q.data.straight_traverse.dy = dy;
        q.data.straight_traverse.dz = dz;
        q.data.straight_traverse.x = x;
        q.data.straight_traverse.y = y;
        q.data.straight_traverse.z = z;
        break;
    case CANON_PLANE_XZ:
        q.data.straight_traverse.dz = dx;
        q.data.straight_traverse.dx = dy;
        q.data.straight_traverse.dy = dz;
        q.data.straight_traverse.z = x;
        q.data.straight_traverse.x = y;
        q.data.straight_traverse.y = z;
        break;
    default:
        ;
    }        
    q.data.straight_traverse.a = a;
    q.data.straight_traverse.b = b;
    q.data.straight_traverse.c = c;
    q.data.straight_traverse.u = u;
    q.data.straight_traverse.v = v;
    q.data.straight_traverse.w = w;
    if(debug_qc) printf("enqueue straight traverse lineno %d to %f %f %f direction %f %f %f\n", l, x,y,z, dx, dy, dz);
    qc().push_back(q);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movsd 0x28(%rbp), %xmm8
movsd 0x20(%rbp), %xmm8
movsd 0x18(%rbp), %xmm8
movsd 0x10(%rbp), %xmm8
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movsd %xmm3, -0x30(%rbp)
movsd %xmm4, -0x38(%rbp)
movsd %xmm5, -0x40(%rbp)
movsd %xmm6, -0x48(%rbp)
movsd %xmm7, -0x50(%rbp)
movl $0x0, -0xc8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq -0x8(%rbp), %rax
movl 0xc67c(%rax), %eax
movl %eax, -0xcc(%rbp)
subl $0x1, %eax
je 0x34e1c
jmp 0x34e0c
movl -0xcc(%rbp), %eax
subl $0x3, %eax
je 0x34e6c
jmp 0x34ebc
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
jmp 0x34ebe
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x34ebe
jmp 0x34ebe
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd 0x10(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd 0x18(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd 0x20(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0x28(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
cmpl $0x0, 0x71b0c(%rip)     # 0xa6a10
je 0x34f35
movl -0xc(%rbp), %esi
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
movsd -0x18(%rbp), %xmm3
movsd -0x20(%rbp), %xmm4
movsd -0x28(%rbp), %xmm5
leaq 0x468cf(%rip), %rdi     # 0x7b7fd
movb $0x6, %al
callq 0x10060
callq 0x103d0
movq %rax, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x10320
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)