// File: ynilu[P]elastic/simulator.cpp
// Function: build_light_path(Phy_graph&, LightPath*, Aux_node*, Aux_node*, Event&)
void build_light_path(Phy_graph& p_graph, LightPath* candidate_path, Aux_node* aux_source, Aux_node* aux_destination, Event& event)
{
    Phy_node& src_node = p_graph.get_node(aux_source->phy_id);
    Phy_node& dst_node = p_graph.get_node(aux_destination->phy_id);
    LightPath* new_path = new LightPath();

    request2lightpath[event.request_id].push_back(new_path);
    new_path->requests.insert(event.request_id);
    new_path->modulation_level = candidate_path->modulation_level;
    new_path->available_bitrate = candidate_path->available_bitrate;
    new_path->weight = candidate_path->weight;
    new_path->spectrum = candidate_path->spectrum;
    new_path->p_path = candidate_path->p_path;
    new_path->type = candidate_path->type;


    int slot_st = new_path->spectrum.slot_st;
    int slot_ed = new_path->spectrum.slot_ed;
    Path& path = new_path->p_path;
    double used_bandwidth;
    double wasted_bandwidth;
    double guardband_bandwidth;
    double total_bandwidth;
    double num_links;

    switch(candidate_path->type)
    {
    case LightPath::OTDM:

        new_path->transmitter_index.resize(path.size(), -1);
        new_path->receiver_index.resize(path.size(), -1);
        new_path->transmitter_index.front() = 1;
        new_path->receiver_index.back() = 1;
        src_node.num_available_transmitter--;
        dst_node.num_available_receiver--;

        for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
        {
            int from = path[node_i];
            int to = path[node_i + 1];
            Phy_link& link = p_graph.get_link(from, to);

            link.slot[slot_st] = 0;
            link.slot[slot_ed] = 0;

            for(int i = slot_st + 1; i <= slot_ed - 1; i++)
            {
                link.slot[i] = 1;
            }
        }
        exist_OTDM_light_path_list.push_back(new_path);
        num_OTDM_lightpath_use++;
        num_OTDM_lightpath_use_BM[(int)event.request_id/(num_requests/num_batch)]++;

        num_links = 1.0 * new_path->p_path.size() - 1;
        used_bandwidth = num_links * event.bandwidth / new_path->modulation_level;
        wasted_bandwidth = 0;
        guardband_bandwidth = num_links * 2 * slot_capacity;
        total_bandwidth = used_bandwidth + wasted_bandwidth + guardband_bandwidth;
        total_bandwidth_utilization += total_bandwidth * event.holding_time;
        used_bandwidth_utilization += used_bandwidth * event.holding_time;
        wasted_bandwidth_utilization += wasted_bandwidth * event.holding_time;
        guardband_bandwidth_utilization += guardband_bandwidth * event.holding_time;
        break;

    case LightPath:: OFDM:
        new_path->transmitter_index.resize(path.size(), -1);
        new_path->receiver_index.resize(path.size(), -1);
        new_path->transmitter_index.front() = get_available_OFDM_transceiver(src_node.OFDMtransmitter);
        src_node.num_available_OFDM_transmitter--;
        new_path->receiver_index.back() = get_available_OFDM_transceiver(dst_node.OFDMreceiver);
        dst_node.num_available_OFDM_receiver--;
        src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum = candidate_path->spectrum;
        src_node.OFDMtransmitter[new_path->transmitter_index.front()].num_available_sub_transceiver--;
        src_node.OFDMtransmitter[new_path->transmitter_index.front()].in_used = true;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum = candidate_path->spectrum;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].num_available_sub_transceiver--;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].in_used = true;

        for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
        {
            int from = path[node_i];
            int to = path[node_i + 1];
            Phy_link& link = p_graph.get_link(from, to);

            link.slot[slot_st] = 0;
            link.slot[slot_ed] = 0;
            for(int i = slot_st + 1; i <= slot_ed - 1; i++)
            {
                link.slot[i] = 1;
            }
        }
        exist_OFDM_light_path_list.push_back(new_path);
        num_OFDM_lightpath_use++;
        num_OFDM_lightpath_use_BM[(int)event.request_id/(num_requests/num_batch)]++;

        num_links = 1.0 * new_path->p_path.size() - 1;
        used_bandwidth = num_links * event.bandwidth / new_path->modulation_level;
        wasted_bandwidth = num_links * (slot_capacity - (used_bandwidth - slot_capacity * ((int)used_bandwidth / slot_capacity)));
        guardband_bandwidth = num_links * 2 * slot_capacity;
        total_bandwidth = used_bandwidth + wasted_bandwidth + guardband_bandwidth;
        total_bandwidth_utilization += total_bandwidth * event.holding_time;
        used_bandwidth_utilization += used_bandwidth * event.holding_time;
        wasted_bandwidth_utilization += wasted_bandwidth * event.holding_time;
        guardband_bandwidth_utilization += guardband_bandwidth * event.holding_time;
        break;

    case LightPath:: OFDM_WB:
        new_path->transmitter_index = candidate_path->transmitter_index;
        new_path->receiver_index.resize(path.size(), -1);
        new_path->receiver_index.back() = get_available_OFDM_transceiver(dst_node.OFDMreceiver);
        dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum = candidate_path->spectrum;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].num_available_sub_transceiver--;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].in_used = true;
        dst_node.num_available_OFDM_receiver--;
        src_node.OFDMtransmitter[new_path->transmitter_index.front()].num_available_sub_transceiver--;
        if(src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_st > slot_st)
        {
            src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_st = slot_st;
        }
        if(src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_ed < slot_ed)
        {
            src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_ed = slot_ed;
        }
        for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
        {
            int from = path[node_i];
            int to = path[node_i + 1];
            Phy_link& link = p_graph.get_link(from, to);

            link.slot[slot_st] = 0;
            link.slot[slot_ed] = 0;
            for(int i = slot_st + 1; i <= slot_ed - 1; i++)
            {
                link.slot[i] = 1;
            }
        }
        exist_OFDM_light_path_list.push_back(new_path);
        num_OFDM_lightpath_use++;
        num_OFDM_lightpath_use_BM[(int)event.request_id/(num_requests/num_batch)]++;

        num_links = 1.0 * new_path->p_path.size() - 1;
        used_bandwidth = num_links * event.bandwidth / new_path->modulation_level;
        wasted_bandwidth = num_links * (slot_capacity - (used_bandwidth - slot_capacity * ((int)used_bandwidth / slot_capacity)));
        guardband_bandwidth = num_links * slot_capacity;
        total_bandwidth = used_bandwidth + wasted_bandwidth + guardband_bandwidth;
        total_bandwidth_utilization += total_bandwidth * event.holding_time;
        used_bandwidth_utilization += used_bandwidth * event.holding_time;
        wasted_bandwidth_utilization += wasted_bandwidth * event.holding_time;
        guardband_bandwidth_utilization += guardband_bandwidth * event.holding_time;
        break;

    case LightPath:: OFDM_WOB:
        new_path->transmitter_index = candidate_path->transmitter_index;
        new_path->receiver_index = candidate_path->receiver_index;
        src_node.OFDMtransmitter[new_path->transmitter_index.front()].num_available_sub_transceiver--;
        dst_node.OFDMreceiver[new_path->receiver_index.back()].num_available_sub_transceiver--;
        if(src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_st > slot_st)
        {
            src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_st = slot_st;
        }
        if(src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_ed < slot_ed)
        {
            src_node.OFDMtransmitter[new_path->transmitter_index.front()].spectrum.slot_ed = slot_ed;
        }
        if(dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum.slot_st > slot_st)
        {
            dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum.slot_st = slot_st;
        }
        if(dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum.slot_ed < slot_ed)
        {
            dst_node.OFDMreceiver[new_path->receiver_index.back()].spectrum.slot_ed = slot_ed;
        }

        for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
        {
            int from = path[node_i];
            int to = path[node_i + 1];
            Phy_link& link = p_graph.get_link(from, to);

            link.slot[slot_st] = 0;
            link.slot[slot_ed] = 0;
            for(int i = slot_st + 1; i <= slot_ed - 1; i++)
            {
                link.slot[i] = 1;
            }
        }
        exist_OFDM_light_path_list.push_back(new_path);
        num_OFDM_lightpath_use++;
        num_OFDM_lightpath_use_BM[(int)event.request_id/(num_requests/num_batch)]++;

        num_links = 1.0 * new_path->p_path.size() - 1;
        used_bandwidth = num_links * event.bandwidth / new_path->modulation_level;
        wasted_bandwidth = num_links * (slot_capacity - (used_bandwidth - slot_capacity * ((int)used_bandwidth / slot_capacity)));
        guardband_bandwidth = num_links * slot_capacity;
        total_bandwidth = used_bandwidth + wasted_bandwidth + guardband_bandwidth;
        total_bandwidth_utilization += total_bandwidth * event.holding_time;
        used_bandwidth_utilization += used_bandwidth * event.holding_time;
        wasted_bandwidth_utilization += wasted_bandwidth * event.holding_time;
        guardband_bandwidth_utilization += guardband_bandwidth * event.holding_time;
        break;

    default:
        cerr << "light path type error\n";
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x1b450
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x1b450
movq %rax, -0x38(%rbp)
movl $0xf8, %edi
callq 0x3200
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x120(%rbp)
callq 0x2be50
jmp 0x8e65
movq -0x120(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movslq 0xc(%rax), %rsi
leaq 0x3a5d1(%rip), %rdi     # 0x43450
callq 0xb250
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0xbb90
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq -0x28(%rbp), %rsi
addq $0xc, %rsi
callq 0xbc00
movq %rax, -0x60(%rbp)
movb %dl, -0x58(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x10(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x48(%rax)
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movq -0x40(%rbp), %rdi
addq $0x50, %rdi
callq 0xbc50
movq -0x10(%rbp), %rsi
addq $0x68, %rsi
movq -0x40(%rbp), %rdi
addq $0x68, %rdi
callq 0xbc80
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x40(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x128(%rbp)
subq $0x3, %rax
ja 0xa3d0
movq -0x128(%rbp), %rax
leaq 0x24148(%rip), %rcx     # 0x2d0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x120(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0xf8, %esi
callq 0x3210
jmp 0xa3ec
movq -0x40(%rbp), %rax
addq $0xc8, %rax
movq %rax, -0x138(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq -0x138(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, -0x9c(%rbp) # imm = 0xFFFFFFFF
leaq -0x9c(%rbp), %rdx
callq 0xb010
movq -0x40(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0x130(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq -0x130(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, -0xa0(%rbp) # imm = 0xFFFFFFFF
leaq -0xa0(%rbp), %rdx
callq 0xb010
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movl $0x1, (%rax)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
movl 0x28(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movq %rax, -0x140(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x140(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x915b
movq -0x70(%rbp), %rdi
movl -0xa4(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xa8(%rbp)
movq -0x70(%rbp), %rdi
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xac(%rbp)
movq -0x8(%rbp), %rdi
movl -0xa8(%rbp), %esi
movl -0xac(%rbp), %edx
callq 0x1a730
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x64(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movq -0xb8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x68(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl -0x68(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x9145
movq -0xb8(%rbp), %rdi
addq $0x18, %rdi
movslq -0xbc(%rbp), %rsi
callq 0xb210
movl $0x1, (%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x9107
jmp 0x9147
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x9047
leaq 0x3a2be(%rip), %rdi     # 0x43420
leaq -0x40(%rbp), %rsi
callq 0xbb50
movl 0x3a1a7(%rip), %eax     # 0x43318
incl %eax
movl %eax, 0x3a19f(%rip)     # 0x43318
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x144(%rbp)
movl 0x3a050(%rip), %eax     # 0x431dc
movl 0x3a03e(%rip), %ecx     # 0x431d0
cltd
idivl %ecx
movl %eax, %ecx
movl -0x144(%rbp), %eax
cltd
idivl %ecx
movslq %eax, %rsi
leaq 0x3a1f6(%rip), %rdi     # 0x433a0
callq 0xb210
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
addq $0x68, %rdi
callq 0xb380
movq %rax, %xmm0
movaps 0x23e82(%rip), %xmm1    # 0x2d050
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x23e86(%rip), %xmm1    # 0x2d060
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x23e47(%rip), %xmm1    # 0x2d038
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl 0x4c(%rax), %xmm1
mulsd %xmm1, %xmm0
movq -0x40(%rbp), %rax
cvtsi2sdl 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd 0x23e0c(%rip), %xmm0    # 0x2d040
mulsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x39fb4(%rip), %xmm1 # 0x431f8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x78(%rbp), %xmm0
addsd -0x80(%rbp), %xmm0
addsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3a131(%rip), %xmm1    # 0x433b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3a121(%rip)    # 0x433b8
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3a10f(%rip), %xmm1    # 0x433c0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3a0ff(%rip)    # 0x433c0
movsd -0x80(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3a0ed(%rip), %xmm1    # 0x433c8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3a0dd(%rip)    # 0x433c8
movsd -0x88(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3a0c8(%rip), %xmm1    # 0x433d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3a0b8(%rip)    # 0x433d0
jmp 0xa3e3
movq -0x40(%rbp), %rax
addq $0xc8, %rax
movq %rax, -0x1a0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq -0x1a0(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, -0xc0(%rbp) # imm = 0xFFFFFFFF
leaq -0xc0(%rbp), %rdx
callq 0xb010
movq -0x40(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0x198(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq -0x198(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, -0xc4(%rbp) # imm = 0xFFFFFFFF
leaq -0xc4(%rbp), %rdx
callq 0xb010
movq -0x30(%rbp), %rdi
addq $0x68, %rdi
callq 0xa400
movl %eax, -0x190(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movl -0x190(%rbp), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x38(%rbp), %rdi
addq $0x80, %rdi
callq 0xa400
movl %eax, -0x18c(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movl -0x18c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movl 0x34(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x34(%rax)
movq -0x10(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x180(%rbp)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x188(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x188(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movq -0x180(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rdi
callq 0xbc50
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x178(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x178(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x170(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x170(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movb $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x160(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x168(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x168(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movq -0x160(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rdi
callq 0xbc50
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x158(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x158(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x150(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x150(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movb $0x1, 0x8(%rax)
movl $0x0, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movq %rax, -0x1a8(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x1a8(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x969a
movq -0x70(%rbp), %rdi
movl -0xc8(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xcc(%rbp)
movq -0x70(%rbp), %rdi
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xd0(%rbp)
movq -0x8(%rbp), %rdi
movl -0xcc(%rbp), %esi
movl -0xd0(%rbp), %edx
callq 0x1a730
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x64(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movq -0xd8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x68(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movl -0x68(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x9684
movq -0xd8(%rbp), %rdi
addq $0x18, %rdi
movslq -0xdc(%rbp), %rsi
callq 0xb210
movl $0x1, (%rax)
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x9646
jmp 0x9686
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0x9586
leaq 0x39d97(%rip), %rdi     # 0x43438
leaq -0x40(%rbp), %rsi
callq 0xbb50
movl 0x39c64(%rip), %eax     # 0x43314
incl %eax
movl %eax, 0x39c5c(%rip)     # 0x43314
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1b0(%rbp)
movl 0x39b11(%rip), %eax     # 0x431dc
movl 0x39aff(%rip), %ecx     # 0x431d0
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1b0(%rbp), %eax
cltd
idivl %ecx
movslq %eax, %rsi
leaq 0x39c9f(%rip), %rdi     # 0x43388
callq 0xb210
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
addq $0x68, %rdi
callq 0xb380
movq %rax, %xmm0
movaps 0x23943(%rip), %xmm1    # 0x2d050
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x23947(%rip), %xmm1    # 0x2d060
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x23908(%rip), %xmm1    # 0x2d038
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl 0x4c(%rax), %xmm1
mulsd %xmm1, %xmm0
movq -0x40(%rbp), %rax
cvtsi2sdl 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x39a85(%rip), %xmm1 # 0x431f8
movsd -0x78(%rbp), %xmm2
movl 0x39a7a(%rip), %eax     # 0x431f8
movl %eax, -0x1ac(%rbp)
cvttsd2si -0x78(%rbp), %eax
cltd
idivl 0x39a68(%rip)           # 0x431f8
movl %eax, %ecx
movl -0x1ac(%rbp), %eax
imull %ecx, %eax
cvtsi2sd %eax, %xmm3
subsd %xmm3, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd 0x23888(%rip), %xmm0    # 0x2d040
mulsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x39a30(%rip), %xmm1 # 0x431f8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x78(%rbp), %xmm0
addsd -0x80(%rbp), %xmm0
addsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39bad(%rip), %xmm1    # 0x433b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39b9d(%rip)    # 0x433b8
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39b8b(%rip), %xmm1    # 0x433c0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39b7b(%rip)    # 0x433c0
movsd -0x80(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39b69(%rip), %xmm1    # 0x433c8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39b59(%rip)    # 0x433c8
movsd -0x88(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39b44(%rip), %xmm1    # 0x433d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39b34(%rip)    # 0x433d0
jmp 0xa3e3
movq -0x10(%rbp), %rsi
addq $0xc8, %rsi
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xbc80
movq -0x40(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0x1f0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq -0x1f0(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, -0xe0(%rbp) # imm = 0xFFFFFFFF
leaq -0xe0(%rbp), %rdx
callq 0xb010
movq -0x38(%rbp), %rdi
addq $0x80, %rdi
callq 0xa400
movl %eax, -0x1e4(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movl -0x1e4(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x1d8(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x1e0(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x1e0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movq -0x1d8(%rbp), %rsi
movq %rax, %rdi
addq $0x40, %rdi
callq 0xbc50
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x1d0(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x1d0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x1c8(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x1c8(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movb $0x1, 0x8(%rax)
movq -0x38(%rbp), %rax
movl 0x34(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x34(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x1c0(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x1c0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x1b8(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x1b8(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x48(%rax), %eax
cmpl -0x64(%rbp), %eax
jle 0x9a9d
movl -0x64(%rbp), %eax
movl %eax, -0x1f4(%rbp)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x200(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x200(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x1f4(%rbp), %ecx
movl %ecx, 0x48(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x208(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x208(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x4c(%rax), %eax
cmpl -0x68(%rbp), %eax
jge 0x9b13
movl -0x68(%rbp), %eax
movl %eax, -0x20c(%rbp)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x218(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x218(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x20c(%rbp), %ecx
movl %ecx, 0x4c(%rax)
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movq %rax, -0x220(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x220(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x9c31
movq -0x70(%rbp), %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0x70(%rbp), %rdi
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0xec(%rbp)
movq -0x8(%rbp), %rdi
movl -0xe8(%rbp), %esi
movl -0xec(%rbp), %edx
callq 0x1a730
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x64(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movq -0xf8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x68(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movl -0x68(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x9c1b
movq -0xf8(%rbp), %rdi
addq $0x18, %rdi
movslq -0xfc(%rbp), %rsi
callq 0xb210
movl $0x1, (%rax)
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x9bdd
jmp 0x9c1d
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x9b1d
leaq 0x39800(%rip), %rdi     # 0x43438
leaq -0x40(%rbp), %rsi
callq 0xbb50
movl 0x396cd(%rip), %eax     # 0x43314
incl %eax
movl %eax, 0x396c5(%rip)     # 0x43314
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x228(%rbp)
movl 0x3957a(%rip), %eax     # 0x431dc
movl 0x39568(%rip), %ecx     # 0x431d0
cltd
idivl %ecx
movl %eax, %ecx
movl -0x228(%rbp), %eax
cltd
idivl %ecx
movslq %eax, %rsi
leaq 0x39708(%rip), %rdi     # 0x43388
callq 0xb210
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
addq $0x68, %rdi
callq 0xb380
movq %rax, %xmm0
movaps 0x233ac(%rip), %xmm1    # 0x2d050
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x233b0(%rip), %xmm1    # 0x2d060
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x23371(%rip), %xmm1    # 0x2d038
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl 0x4c(%rax), %xmm1
mulsd %xmm1, %xmm0
movq -0x40(%rbp), %rax
cvtsi2sdl 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x394ee(%rip), %xmm1 # 0x431f8
movsd -0x78(%rbp), %xmm2
movl 0x394e3(%rip), %eax     # 0x431f8
movl %eax, -0x224(%rbp)
cvttsd2si -0x78(%rbp), %eax
cltd
idivl 0x394d1(%rip)           # 0x431f8
movl %eax, %ecx
movl -0x224(%rbp), %eax
imull %ecx, %eax
cvtsi2sd %eax, %xmm3
subsd %xmm3, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x394a1(%rip), %xmm1 # 0x431f8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x78(%rbp), %xmm0
addsd -0x80(%rbp), %xmm0
addsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3961e(%rip), %xmm1    # 0x433b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3960e(%rip)    # 0x433b8
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x395fc(%rip), %xmm1    # 0x433c0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x395ec(%rip)    # 0x433c0
movsd -0x80(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x395da(%rip), %xmm1    # 0x433c8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x395ca(%rip)    # 0x433c8
movsd -0x88(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x395b5(%rip), %xmm1    # 0x433d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x395a5(%rip)    # 0x433d0
jmp 0xa3e3
movq -0x10(%rbp), %rsi
addq $0xc8, %rsi
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xbc80
movq -0x10(%rbp), %rsi
addq $0xe0, %rsi
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xbc80
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x240(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x240(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x238(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x238(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x230(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x230(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x48(%rax), %eax
cmpl -0x64(%rbp), %eax
jle 0x9f4c
movl -0x64(%rbp), %eax
movl %eax, -0x244(%rbp)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x250(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x250(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x244(%rbp), %ecx
movl %ecx, 0x48(%rax)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x258(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x258(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x4c(%rax), %eax
cmpl -0x68(%rbp), %eax
jge 0x9fc2
movl -0x68(%rbp), %eax
movl %eax, -0x25c(%rbp)
movq -0x30(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x268(%rbp)
movq -0x40(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb480
movq -0x268(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x25c(%rbp), %ecx
movl %ecx, 0x4c(%rax)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x270(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x270(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x48(%rax), %eax
cmpl -0x64(%rbp), %eax
jle 0xa03c
movl -0x64(%rbp), %eax
movl %eax, -0x274(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x280(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x280(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x274(%rbp), %ecx
movl %ecx, 0x48(%rax)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x288(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x288(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl 0x4c(%rax), %eax
cmpl -0x68(%rbp), %eax
jge 0xa0b6
movl -0x68(%rbp), %eax
movl %eax, -0x28c(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x298(%rbp)
movq -0x40(%rbp), %rdi
addq $0xe0, %rdi
callq 0xb4b0
movq -0x298(%rbp), %rdi
movslq (%rax), %rsi
callq 0xb4f0
movl -0x28c(%rbp), %ecx
movl %ecx, 0x4c(%rax)
movl $0x0, -0x100(%rbp)
movl -0x100(%rbp), %eax
movq %rax, -0x2a0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xa1d4
movq -0x70(%rbp), %rdi
movl -0x100(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x70(%rbp), %rdi
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x108(%rbp)
movq -0x8(%rbp), %rdi
movl -0x104(%rbp), %esi
movl -0x108(%rbp), %edx
callq 0x1a730
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
addq $0x18, %rdi
movslq -0x64(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movq -0x110(%rbp), %rdi
addq $0x18, %rdi
movslq -0x68(%rbp), %rsi
callq 0xb210
movl $0x0, (%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %eax
movl -0x68(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0xa1be
movq -0x110(%rbp), %rdi
addq $0x18, %rdi
movslq -0x114(%rbp), %rsi
callq 0xb210
movl $0x1, (%rax)
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0xa180
jmp 0xa1c0
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x100(%rbp)
jmp 0xa0c0
leaq 0x3925d(%rip), %rdi     # 0x43438
leaq -0x40(%rbp), %rsi
callq 0xbb50
movl 0x3912a(%rip), %eax     # 0x43314
incl %eax
movl %eax, 0x39122(%rip)     # 0x43314
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2a8(%rbp)
movl 0x38fd7(%rip), %eax     # 0x431dc
movl 0x38fc5(%rip), %ecx     # 0x431d0
cltd
idivl %ecx
movl %eax, %ecx
movl -0x2a8(%rbp), %eax
cltd
idivl %ecx
movslq %eax, %rsi
leaq 0x39165(%rip), %rdi     # 0x43388
callq 0xb210
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
addq $0x68, %rdi
callq 0xb380
movq %rax, %xmm0
movaps 0x22e09(%rip), %xmm1    # 0x2d050
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x22e0d(%rip), %xmm1    # 0x2d060
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x22dce(%rip), %xmm1    # 0x2d038
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl 0x4c(%rax), %xmm1
mulsd %xmm1, %xmm0
movq -0x40(%rbp), %rax
cvtsi2sdl 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x38f4b(%rip), %xmm1 # 0x431f8
movsd -0x78(%rbp), %xmm2
movl 0x38f40(%rip), %eax     # 0x431f8
movl %eax, -0x2a4(%rbp)
cvttsd2si -0x78(%rbp), %eax
cltd
idivl 0x38f2e(%rip)           # 0x431f8
movl %eax, %ecx
movl -0x2a4(%rbp), %eax
imull %ecx, %eax
cvtsi2sd %eax, %xmm3
subsd %xmm3, %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x98(%rbp), %xmm0
cvtsi2sdl 0x38efe(%rip), %xmm1 # 0x431f8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x78(%rbp), %xmm0
addsd -0x80(%rbp), %xmm0
addsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x3907b(%rip), %xmm1    # 0x433b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3906b(%rip)    # 0x433b8
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39059(%rip), %xmm1    # 0x433c0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39049(%rip)    # 0x433c0
movsd -0x80(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39037(%rip), %xmm1    # 0x433c8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39027(%rip)    # 0x433c8
movsd -0x88(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss 0x54(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x39012(%rip), %xmm1    # 0x433d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x39002(%rip)    # 0x433d0
jmp 0xa3e3
movq 0x38c19(%rip), %rdi     # 0x42ff0
leaq 0x22e25(%rip), %rsi     # 0x2d203
callq 0x31f0
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3340
nopw %cs:(%rax,%rax)