// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_find.cc
// Function: Interp::find_ends(block_struct*, setup_struct*, double*, double*, double*, double*, double*, double*, double*, double*, double*)
int Interp::find_ends(block_pointer block,       //!< pointer to a block of RS274/NGC instructions
                      setup_pointer s,    //!< pointer to machine settings                 
                      double *px,        //!< pointer to end_x                            
                      double *py,        //!< pointer to end_y                            
                      double *pz,        //!< pointer to end_z                            
                      double *AA_p,      //!< pointer to end_a                      
                      double *BB_p,      //!< pointer to end_b                      
                      double *CC_p,      //!< pointer to end_c                      
                      double *u_p, double *v_p, double *w_p)
{
    int middle;
    int comp;

    middle = s->cutter_comp_firstmove == OFF;
    comp = (s->cutter_comp_side != OFF);

    if (block->g_modes[0] == G_53) {      /* distance mode is absolute in this case */
#ifdef DEBUG_EMC
        COMMENT("interpreter: offsets temporarily suspended");
#endif
        CHKS((block->radius_flag || block->theta_flag), _("Cannot use polar coordinates with G53"));

        double cx = s->current_x;
        double cy = s->current_y;
        rotate(&cx, &cy, s->rotation_xy);

        if(block->x_flag == ON) {
            *px = block->x_number - s->origin_offset_x - s->axis_offset_x - s->tool_offset.tran.x;
        } else {
            *px = cx;
        }

        if(block->y_flag == ON) {
            *py = block->y_number - s->origin_offset_y - s->axis_offset_y - s->tool_offset.tran.y;
        } else {
            *py = cy;
        }

        rotate(px, py, -s->rotation_xy);

        if(block->z_flag == ON) {
            *pz = block->z_number - s->origin_offset_z - s->axis_offset_z - s->tool_offset.tran.z;
        } else {
            *pz = s->current_z;
        }

        if(block->a_flag == ON) {
            if(s->a_axis_wrapped) {
                CHP(unwrap_rotary(AA_p, block->a_number, 
                                  block->a_number - s->AA_origin_offset - s->AA_axis_offset - s->tool_offset.a,
                                  s->AA_current, 'A'));
            } else {
                *AA_p = block->a_number - s->AA_origin_offset - s->AA_axis_offset;
            }
        } else {
            *AA_p = s->AA_current;
        }

        if(block->b_flag == ON) {
            if(s->b_axis_wrapped) {
                CHP(unwrap_rotary(BB_p, block->b_number, 
                                  block->b_number - s->BB_origin_offset - s->BB_axis_offset - s->tool_offset.b,
                                  s->BB_current, 'B'));
            } else {
                *BB_p = block->b_number - s->BB_origin_offset - s->BB_axis_offset;
            }
        } else {
            *BB_p = s->BB_current;
        }

        if(block->c_flag == ON) {
            if(s->c_axis_wrapped) {
                CHP(unwrap_rotary(CC_p, block->c_number, 
                                  block->c_number - s->CC_origin_offset - s->CC_axis_offset - s->tool_offset.c,
                                  s->CC_current, 'C'));
            } else {
                *CC_p = block->c_number - s->CC_origin_offset - s->CC_axis_offset;
            }
        } else {
            *CC_p = s->CC_current;
        }

        if(block->u_flag == ON) {
            *u_p = block->u_number - s->u_origin_offset - s->u_axis_offset - s->tool_offset.u;
        } else {
            *u_p = s->u_current;
        }

        if(block->v_flag == ON) {
            *v_p = block->v_number - s->v_origin_offset - s->v_axis_offset - s->tool_offset.v;
        } else {
            *v_p = s->v_current;
        }

        if(block->w_flag == ON) {
            *w_p = block->w_number - s->w_origin_offset - s->w_axis_offset - s->tool_offset.w;
        } else {
            *w_p = s->w_current;
        }
    } else if (s->distance_mode == MODE_ABSOLUTE) {

        if(block->x_flag == ON) {
            *px = block->x_number;
        } else {
            // both cutter comp planes affect X ...
            *px = (comp && middle) ? s->program_x : s->current_x;
        }

        if(block->y_flag == ON) {
            *py = block->y_number;
        } else {
            // but only XY affects Y ...
            *py = (comp && middle && s->plane == CANON_PLANE_XY) ? s->program_y : s->current_y;
        }

        if(block->radius_flag == ON && block->theta_flag == ON) {
            CHKS((block->x_flag == ON || block->y_flag == ON), _("Cannot specify X or Y words with polar coordinate"));
            *px = block->radius * cos(D2R(block->theta));
            *py = block->radius * sin(D2R(block->theta));
        } else if(block->radius_flag == ON) {
            double theta;
            CHKS((block->x_flag == ON || block->y_flag == ON), _("Cannot specify X or Y words with polar coordinate"));
            CHKS((*py == 0 && *px == 0), _("Must specify angle in polar coordinate if at the origin"));
            theta = atan2(*py, *px);
            *px = block->radius * cos(theta);
            *py = block->radius * sin(theta);
        } else  if(block->theta_flag == ON) {
            double radius;
            CHKS((block->x_flag == ON || block->y_flag == ON), _("Cannot specify X or Y words with polar coordinate"));
            radius = hypot(*py, *px);
            *px = radius * cos(D2R(block->theta));
            *py = radius * sin(D2R(block->theta));
        }

        if(block->z_flag == ON) {
            *pz = block->z_number;
        } else {
            // and only XZ affects Z.
            *pz = (comp && middle && s->plane == CANON_PLANE_XZ) ? s->program_z : s->current_z;
        }

        if(block->a_flag == ON) {
            if(s->a_axis_wrapped) {
                CHP(unwrap_rotary(AA_p, block->a_number, block->a_number, s->AA_current, 'A'));
            } else {
                *AA_p = block->a_number;
            }
        } else {
            *AA_p = s->AA_current;
        }

        if(block->b_flag == ON) {
            if(s->b_axis_wrapped) {
                CHP(unwrap_rotary(BB_p, block->b_number, block->b_number, s->BB_current, 'B'));
            } else {
                *BB_p = block->b_number;
            }
        } else {
            *BB_p = s->BB_current;
        }

        if(block->c_flag == ON) {
            if(s->c_axis_wrapped) {
                CHP(unwrap_rotary(CC_p, block->c_number, block->c_number, s->CC_current, 'C'));
            } else {
                *CC_p = block->c_number;
            }
        } else {
            *CC_p = s->CC_current;
        }

        *u_p = (block->u_flag == ON) ? block->u_number : s->u_current;
        *v_p = (block->v_flag == ON) ? block->v_number : s->v_current;
        *w_p = (block->w_flag == ON) ? block->w_number : s->w_current;

    } else {                      /* mode is MODE_INCREMENTAL */

        // both cutter comp planes affect X ...
        *px = (comp && middle) ? s->program_x: s->current_x;
        if(block->x_flag == ON) *px += block->x_number;

        // but only XY affects Y ...
        *py = (comp && middle && s->plane == CANON_PLANE_XY) ? s->program_y: s->current_y;
        if(block->y_flag == ON) *py += block->y_number;

        if(block->radius_flag == ON) {
            double radius, theta;
            CHKS((block->x_flag == ON || block->y_flag == ON), _("Cannot specify X or Y words with polar coordinate"));
            CHKS((*py == 0 && *px == 0), _("Incremental motion with polar coordinates is indeterminate when at the origin"));
            theta = atan2(*py, *px);
            radius = hypot(*py, *px) + block->radius;
            *px = radius * cos(theta);
            *py = radius * sin(theta);
        }

        if(block->theta_flag == ON) {
            double radius, theta;
            CHKS((block->x_flag == ON || block->y_flag == ON), _("Cannot specify X or Y words with polar coordinate"));
            CHKS((*py == 0 && *px == 0), _("G91 motion with polar coordinates is indeterminate when at the origin"));
            theta = atan2(*py, *px) + D2R(block->theta);
            radius = hypot(*py, *px);
            *px = radius * cos(theta);
            *py = radius * sin(theta);
        }

        // and only XZ affects Z.
        *pz = (comp && middle && s->plane == CANON_PLANE_XZ) ? s->program_z: s->current_z;
        if(block->z_flag == ON) *pz += block->z_number;

        *AA_p = s->AA_current;
        if(block->a_flag == ON) *AA_p += block->a_number;

        *BB_p = s->BB_current;
        if(block->b_flag == ON) *BB_p += block->b_number;

        *CC_p = s->CC_current;
        if(block->c_flag == ON) *CC_p += block->c_number;

        *u_p = s->u_current;
        if(block->u_flag == ON) *u_p += block->u_number;

        *v_p = s->v_current;
        if(block->v_flag == ON) *v_p += block->v_number;

        *w_p = s->w_current;
        if(block->w_flag == ON) *w_p += block->w_number;
    }
    return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq 0x38(%rbp), %rsi
movq 0x30(%rbp), %rdi
movq 0x28(%rbp), %r8
movq 0x20(%rbp), %rdx
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %r11
cmpl $0x212, 0x150(%r14) # imm = 0x212
jne 0x21dab
cmpl $0x0, 0x2a0(%r14)
jne 0x21d97
cmpl $0x0, 0x2b0(%r14)
je 0x21f10
leaq 0x11a9a(%rip), %rdi     # 0x33838
callq 0xb220
movq %r12, %rdi
jmp 0x222cd
movq %r9, -0x48(%rbp)
movq %r12, -0x30(%rbp)
movb 0xc689(%rbx), %al
movl 0x624(%rbx), %ecx
cmpl $0x0, 0x668(%rbx)
je 0x21e9d
testl %ecx, %ecx
setne %cl
testb %al, %al
sete %r12b
andb %cl, %r12b
leaq 0x600(%rbx), %rax
leaq 0xc690(%rbx), %rcx
testb %r12b, %r12b
cmovneq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, (%r13)
movb 0x270(%r14), %al
cmpb $0x1, %al
jne 0x21e13
addsd 0x278(%r14), %xmm0
movsd %xmm0, (%r13)
testb %r12b, %r12b
je 0x21e26
movl $0xc698, %ecx           # imm = 0xC698
cmpl $0x1, 0xc67c(%rbx)
je 0x21e2b
movl $0x608, %ecx            # imm = 0x608
movsd (%rbx,%rcx), %xmm0
movsd %xmm0, (%r15)
movb 0x280(%r14), %cl
cmpb $0x1, %cl
jne 0x21e4f
addsd 0x288(%r14), %xmm0
movsd %xmm0, (%r15)
cmpl $0x1, 0x2a0(%r14)
jne 0x22297
orb %cl, %al
cmpb $0x1, %al
je 0x222bd
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd (%r13), %xmm1
jne 0x2222e
jp 0x2222e
ucomisd %xmm2, %xmm1
jne 0x2222e
jp 0x2222e
leaq 0x11265(%rip), %rdi     # 0x330fd
jmp 0x222c4
movq %rdx, %r9
testl %ecx, %ecx
setne %cl
testb %al, %al
sete %r12b
movb 0x270(%r14), %al
andb %cl, %r12b
leaq 0x600(%rbx), %rcx
leaq 0xc690(%rbx), %rdx
testb %r12b, %r12b
cmovneq %rdx, %rcx
leaq 0x278(%r14), %rdx
testb %al, %al
cmoveq %rcx, %rdx
movsd (%rdx), %xmm0
movsd %xmm0, (%r13)
movb 0x280(%r14), %cl
cmpb $0x1, %cl
jne 0x21ef9
leaq 0x288(%r14), %rdx
jmp 0x21f7f
testb %r12b, %r12b
je 0x21f78
cmpl $0x1, 0xc67c(%rbx)
jne 0x21f78
leaq 0xc698(%rbx), %rdx
jmp 0x21f7f
movq %r9, -0x48(%rbp)
movq %r12, %rdi
movsd 0x600(%rbx), %xmm0
leaq -0x58(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd 0x608(%rbx), %xmm0
leaq -0x50(%rbp), %rdx
movsd %xmm0, (%rdx)
movsd 0x17b8(%rbx), %xmm0
callq 0xc300
cmpb $0x1, 0x270(%r14)
jne 0x2231c
movsd 0x278(%r14), %xmm0
subsd 0x17a0(%rbx), %xmm0
subsd 0x118(%rbx), %xmm0
subsd 0xd678(%rbx), %xmm0
jmp 0x22321
leaq 0x608(%rbx), %rdx
movsd (%rdx), %xmm0
movsd %xmm0, (%r15)
movl 0x2b0(%r14), %edx
cmpl $0x1, 0x2a0(%r14)
jne 0x21ffb
orb %cl, %al
cmpl $0x1, %edx
jne 0x220b1
testb %al, %al
jne 0x222bd
movsd 0x2a8(%r14), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x2b8(%r14), %xmm0
mulsd 0xdf0d(%rip), %xmm0     # 0x2fed8
divsd 0xdf0d(%rip), %xmm0     # 0x2fee0
callq 0xc6c0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd 0xdeed(%rip), %xmm0     # 0x2fed8
movsd 0x2a8(%r14), %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x2204f
cmpl $0x1, %edx
jne 0x22087
orb %cl, %al
cmpb $0x1, %al
je 0x222bd
movsd (%r13), %xmm1
callq 0xb2c0
movsd %xmm0, -0x38(%rbp)
movsd 0x2b8(%r14), %xmm0
mulsd 0xdea9(%rip), %xmm0     # 0x2fed8
divsd 0xdea9(%rip), %xmm0     # 0x2fee0
callq 0xc6c0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd 0xde89(%rip), %xmm0     # 0x2fed8
mulsd 0x2b8(%r14), %xmm0
divsd 0xde80(%rip), %xmm0     # 0x2fee0
callq 0xb200
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r15)
movq 0x38(%rbp), %rsi
movq 0x30(%rbp), %rdi
movq 0x28(%rbp), %r8
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %r11
cmpb $0x1, 0x290(%r14)
jne 0x2209a
leaq 0x298(%r14), %rax
jmp 0x220f6
testb %r12b, %r12b
je 0x220ef
cmpl $0x3, 0xc67c(%rbx)
jne 0x220ef
leaq 0xc6a0(%rbx), %rax
jmp 0x220f6
testb %al, %al
jne 0x222bd
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd (%r13), %xmm1
jne 0x22825
jp 0x22825
ucomisd %xmm2, %xmm1
jne 0x22825
jp 0x22825
leaq 0x11834(%rip), %rdi     # 0x3391e
jmp 0x222c4
leaq 0x610(%rbx), %rax
movq -0x30(%rbp), %rcx
movsd (%rax), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, (%rax)
cmpb $0x1, (%r14)
jne 0x2215a
cmpl $0x0, 0x1e6cc(%rbx)
movsd 0x8(%r14), %xmm0
je 0x2215f
movsd 0x8(%rbx), %xmm2
movq %r9, %r12
pushq $0x41
popq %rdx
movq %rcx, %rdi
movq %r11, %rsi
movapd %xmm0, %xmm1
movq %r8, %r13
movq %r10, %r15
callq 0xbd80
movq %r15, %r10
movq %r12, %r9
movq -0x30(%rbp), %rcx
movq %r13, %r8
movq 0x30(%rbp), %rdi
movq 0x38(%rbp), %rsi
testl %eax, %eax
jne 0x2220a
jmp 0x22164
movsd 0x8(%rbx), %xmm0
movsd %xmm0, (%r11)
cmpb $0x1, 0x10(%r14)
jne 0x221b1
cmpl $0x0, 0x1e6d0(%rbx)
movsd 0x18(%r14), %xmm0
je 0x221b6
movsd 0x20(%rbx), %xmm2
movq %r9, %r12
pushq $0x42
popq %rdx
movq %rcx, %rdi
movq %rsi, %r15
movq %r10, %rsi
movapd %xmm0, %xmm1
movq %r8, %r13
callq 0xbd80
movq %r12, %r9
movq -0x30(%rbp), %rcx
movq %r13, %r8
movq 0x30(%rbp), %rdi
movq %r15, %rsi
testl %eax, %eax
jne 0x2220a
jmp 0x221bb
movsd 0x20(%rbx), %xmm0
movsd %xmm0, (%r10)
cmpb $0x1, 0x20(%r14)
jne 0x22496
cmpl $0x0, 0x1e6d4(%rbx)
movsd 0x28(%r14), %xmm0
je 0x2249b
movsd 0x38(%rbx), %xmm2
movq %rsi, %r15
movq %r9, %rsi
pushq $0x43
popq %rdx
movq %rdi, %r12
movq %rcx, %rdi
movapd %xmm0, %xmm1
movq %r8, %r13
callq 0xbd80
movq %r13, %r8
movq %r12, %rdi
movq %r15, %rsi
testl %eax, %eax
je 0x224a0
movl %eax, %r15d
movq 0x1ad4c(%rip), %rbx     # 0x3cf60
movslq 0xd670(%rbx), %rax
cmpq $0x30, %rax
jg 0x2230a
imulq $0x50, %rax, %rax
jmp 0x2258b
callq 0xb110
movsd %xmm0, -0x38(%rbp)
movsd (%r15), %xmm0
movsd (%r13), %xmm1
callq 0xb2c0
addsd 0x2a8(%r14), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x38(%rbp), %xmm0
callq 0xc6c0
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd -0x38(%rbp), %xmm0
callq 0xb200
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rdx
movq 0x28(%rbp), %r8
movq 0x30(%rbp), %rdi
movq 0x38(%rbp), %rsi
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, (%r15)
cmpl $0x1, 0x2b0(%r14)
jne 0x22727
cmpb $0x0, 0x270(%r14)
jne 0x222bd
cmpb $0x1, 0x280(%r14)
jne 0x225cd
leaq 0x11628(%rip), %rdi     # 0x338ec
callq 0xb220
movq -0x30(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x1ac82(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x11572(%rip), %rsi     # 0x3385e
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %r15
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd -0x58(%rbp), %xmm0
movsd %xmm0, (%r13)
cmpb $0x1, 0x280(%r14)
jne 0x22354
movsd 0x288(%r14), %xmm0
subsd 0x17a8(%rbx), %xmm0
subsd 0x120(%rbx), %xmm0
subsd 0xd680(%rbx), %xmm0
jmp 0x22359
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%r15)
movsd 0x17b8(%rbx), %xmm0
xorps 0xdba3(%rip), %xmm0     # 0x2ff10
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xc300
cmpb $0x1, 0x290(%r14)
jne 0x223a8
movsd 0x298(%r14), %xmm0
subsd 0x17b0(%rbx), %xmm0
subsd 0x128(%rbx), %xmm0
subsd 0xd688(%rbx), %xmm0
jmp 0x223b0
movsd 0x610(%rbx), %xmm0
movq 0x38(%rbp), %rcx
movq 0x30(%rbp), %rdx
movq 0x28(%rbp), %rdi
movq 0x20(%rbp), %rsi
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %rax
movq -0x48(%rbp), %r9
movsd %xmm0, (%r9)
cmpb $0x1, (%r14)
jne 0x2242c
cmpl $0x0, 0x1e6cc(%rbx)
movsd 0x8(%r14), %xmm0
movapd %xmm0, %xmm1
subsd 0x10(%rbx), %xmm1
subsd (%rbx), %xmm1
je 0x22431
subsd 0xd690(%rbx), %xmm1
movsd 0x8(%rbx), %xmm2
pushq $0x41
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0xbd80
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdi
movq 0x30(%rbp), %rdx
movq 0x38(%rbp), %rcx
testl %eax, %eax
jne 0x22565
jmp 0x22435
movsd 0x8(%rbx), %xmm1
movsd %xmm1, (%rax)
cmpb $0x1, 0x10(%r14)
jne 0x22503
cmpl $0x0, 0x1e6d0(%rbx)
movsd 0x18(%r14), %xmm0
movapd %xmm0, %xmm1
subsd 0x28(%rbx), %xmm1
subsd 0x18(%rbx), %xmm1
je 0x22508
subsd 0xd698(%rbx), %xmm1
movsd 0x20(%rbx), %xmm2
pushq $0x42
popq %rdx
movq %r12, %rdi
movq %r8, %rsi
callq 0xbd80
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdi
movq 0x30(%rbp), %rdx
movq 0x38(%rbp), %rcx
testl %eax, %eax
jne 0x22565
jmp 0x2250d
movsd 0x38(%rbx), %xmm0
movsd %xmm0, (%r9)
leaq 0x248(%r14), %rax
leaq 0x50(%rbx), %rcx
cmpb $0x0, 0x244(%r14)
cmovneq %rax, %rcx
movsd (%rcx), %xmm0
movsd %xmm0, (%r8)
leaq 0x258(%r14), %rax
leaq 0x68(%rbx), %rcx
cmpb $0x0, 0x250(%r14)
cmovneq %rax, %rcx
movsd (%rcx), %xmm0
movsd %xmm0, (%rdi)
leaq 0x268(%r14), %rax
subq $-0x80, %rbx
cmpb $0x0, 0x260(%r14)
cmovneq %rax, %rbx
movsd (%rbx), %xmm0
movsd %xmm0, (%rsi)
jmp 0x226a2
movsd 0x20(%rbx), %xmm1
movsd %xmm1, (%r8)
cmpb $0x1, 0x20(%r14)
jne 0x22603
cmpl $0x0, 0x1e6d4(%rbx)
movsd 0x28(%r14), %xmm0
movapd %xmm0, %xmm1
subsd 0x40(%rbx), %xmm1
subsd 0x30(%rbx), %xmm1
je 0x22608
subsd 0xd6a0(%rbx), %xmm1
movsd 0x38(%rbx), %xmm2
pushq $0x43
popq %rdx
movq %r12, %rdi
callq 0xbd80
movq 0x28(%rbp), %rdi
movq 0x30(%rbp), %rdx
movq 0x38(%rbp), %rcx
testl %eax, %eax
je 0x2260c
movl %eax, %r15d
movq 0x1a9f1(%rip), %rax     # 0x3cf60
movl 0xd670(%rax), %eax
cmpl $0x31, %eax
jge 0x2230a
cltq
imulq $0x50, %rax, %rax
movq 0x1a9d5(%rip), %rbx     # 0x3cf60
leaq (%rbx,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x112c1(%rip), %rsi     # 0x3385e
pushq $0x50
popq %rdx
callq 0xb940
movslq 0xd670(%rbx), %rax
imulq $0x50, %rax, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%rbx,%rcx)
incl %eax
movl %eax, 0xd670(%rbx)
movb %dl, 0xc720(%rbx,%rcx)
jmp 0x2230a
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd (%r13), %xmm1
jne 0x226aa
jp 0x226aa
ucomisd %xmm2, %xmm1
jne 0x226aa
jp 0x226aa
leaq 0x11358(%rip), %rdi     # 0x33956
jmp 0x222c4
movsd 0x38(%rbx), %xmm1
movsd %xmm1, (%rsi)
cmpb $0x1, 0x244(%r14)
jne 0x22633
movsd 0x248(%r14), %xmm0
subsd 0x58(%rbx), %xmm0
subsd 0x48(%rbx), %xmm0
subsd 0xd6a8(%rbx), %xmm0
jmp 0x22638
movsd 0x50(%rbx), %xmm0
movsd %xmm0, (%rdi)
cmpb $0x1, 0x250(%r14)
jne 0x22663
movsd 0x258(%r14), %xmm0
subsd 0x70(%rbx), %xmm0
subsd 0x60(%rbx), %xmm0
subsd 0xd6b0(%rbx), %xmm0
jmp 0x22668
movsd 0x68(%rbx), %xmm0
movsd %xmm0, (%rdx)
cmpb $0x1, 0x260(%r14)
jne 0x22696
movsd 0x268(%r14), %xmm0
subsd 0x88(%rbx), %xmm0
subsd 0x78(%rbx), %xmm0
subsd 0xd6b8(%rbx), %xmm0
jmp 0x2269e
movsd 0x80(%rbx), %xmm0
movsd %xmm0, (%rcx)
xorl %r15d, %r15d
jmp 0x2230a
callq 0xb110
movsd 0x2b8(%r14), %xmm1
mulsd 0xd818(%rip), %xmm1     # 0x2fed8
divsd 0xd818(%rip), %xmm1     # 0x2fee0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd (%r15), %xmm0
movsd (%r13), %xmm1
callq 0xb2c0
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xc6c0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd -0x30(%rbp), %xmm0
callq 0xb200
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rdx
movq 0x28(%rbp), %r8
movq 0x30(%rbp), %rdi
movq 0x38(%rbp), %rsi
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r15)
testb %r12b, %r12b
je 0x2273a
movl $0xc6a0, %eax           # imm = 0xC6A0
cmpl $0x3, 0xc67c(%rbx)
je 0x2273f
movl $0x610, %eax            # imm = 0x610
movsd (%rbx,%rax), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, (%rax)
cmpb $0x1, 0x290(%r14)
jne 0x22763
addsd 0x298(%r14), %xmm0
movsd %xmm0, (%rax)
movsd 0x8(%rbx), %xmm0
movsd %xmm0, (%r11)
cmpb $0x1, (%r14)
jne 0x2277e
addsd 0x8(%r14), %xmm0
movsd %xmm0, (%r11)
movsd 0x20(%rbx), %xmm0
movsd %xmm0, (%r10)
cmpb $0x1, 0x10(%r14)
jne 0x2279a
addsd 0x18(%r14), %xmm0
movsd %xmm0, (%r10)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, (%rdx)
cmpb $0x1, 0x20(%r14)
jne 0x227b4
addsd 0x28(%r14), %xmm0
movsd %xmm0, (%rdx)
movsd 0x50(%rbx), %xmm0
movsd %xmm0, (%r8)
cmpb $0x1, 0x244(%r14)
jne 0x227d6
addsd 0x248(%r14), %xmm0
movsd %xmm0, (%r8)
movsd 0x68(%rbx), %xmm0
movsd %xmm0, (%rdi)
cmpb $0x1, 0x250(%r14)
jne 0x227f6
addsd 0x258(%r14), %xmm0
movsd %xmm0, (%rdi)
movsd 0x80(%rbx), %xmm0
movsd %xmm0, (%rsi)
xorl %r15d, %r15d
cmpb $0x1, 0x260(%r14)
jne 0x2230a
addsd 0x268(%r14), %xmm0
movsd %xmm0, (%rsi)
jmp 0x2230a
callq 0xb110
movsd %xmm0, -0x40(%rbp)
movsd 0x2a8(%r14), %xmm1
movsd %xmm1, -0x38(%rbp)
callq 0xc6c0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd -0x40(%rbp), %xmm0
movsd 0x2a8(%r14), %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x22060
nop