// File: /workspace/github_cpp_makefile_star2_O3/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::extract_wave_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void WaveObject::extract_wave_info(std::string driver_line){
    // wave  corner1 side_length side_length dir1 dir2 res height  num_waves material
    std::stringstream d_line(driver_line);
    std::string line_type, material_file;
    double c1x, c1y, c1z, len_one, len_two, d1x, d1y, d1z, d2x, d2y, d2z, res, height;
    int n_waves, seed;
    d_line >>line_type>>c1x>>c1y>>c1z>>len_one>>len_two>>d1x>>d1y>>d1z>>d2x>>d2y>>d2z>>res>>height>>n_waves>>seed>>material_file;

    side_len_one = len_one;
    side_len_two = len_two;
    first_corner = Eigen::Vector3d(c1x, c1y, c1z);
    direction_one = Eigen::Vector3d(d1x, d1y, d1z);
    direction_two = Eigen::Vector3d(d2x, d2y, d2z);
    direction_one = direction_one.normalized();
    direction_two = direction_two.normalized();
    second_corner = first_corner + side_len_one * direction_one + side_len_two * direction_two;

    surface_normal = direction_one.cross(direction_two);
    surface_normal = surface_normal.normalized();

    wave_height = height;
    num_waves = n_waves;
    search_step = 1 / res;

    load_material(material_file);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x3400
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0xc0(%rsp), %rsi
movq %r14, %rdi
callq 0x3340
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x68(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x58(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x3190
leaq 0x9c(%rsp), %rsi
movq %rax, %rdi
callq 0x3190
leaq 0x78(%rsp), %rsi
movq %rax, %rdi
callq 0x3340
movsd 0x58(%rsp), %xmm4
movsd %xmm4, 0x1d0(%rbx)
movsd 0x50(%rsp), %xmm3
movsd %xmm3, 0x1d8(%rbx)
movsd 0x70(%rsp), %xmm7
movhpd 0x68(%rsp), %xmm7       # xmm7 = xmm7[0],mem[0]
movsd 0x60(%rsp), %xmm6
movupd %xmm7, 0x1e0(%rbx)
movsd %xmm6, 0x1f0(%rbx)
movsd 0x48(%rsp), %xmm0
movhpd 0x40(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
movsd 0x38(%rsp), %xmm2
movupd %xmm0, 0x210(%rbx)
movsd %xmm2, 0x220(%rbx)
movsd 0x30(%rsp), %xmm1
movhpd 0x28(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movsd 0x20(%rsp), %xmm5
movupd %xmm1, 0x228(%rbx)
movsd %xmm5, 0x238(%rbx)
movapd %xmm0, %xmm8
mulpd %xmm0, %xmm8
movapd %xmm8, %xmm10
unpckhpd %xmm8, %xmm10           # xmm10 = xmm10[1],xmm8[1]
addsd %xmm8, %xmm10
movapd %xmm2, %xmm9
mulsd %xmm2, %xmm9
addsd %xmm10, %xmm9
xorpd %xmm8, %xmm8
ucomisd %xmm8, %xmm9
jbe 0x12983
movq %xmm9, %xmm9            # xmm9 = xmm9[0],zero
sqrtpd %xmm9, %xmm9
divsd %xmm9, %xmm2
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
divpd %xmm9, %xmm0
movupd %xmm0, 0x210(%rbx)
movsd %xmm2, 0x220(%rbx)
movapd %xmm1, %xmm9
mulpd %xmm1, %xmm9
movapd %xmm9, %xmm10
unpckhpd %xmm9, %xmm10           # xmm10 = xmm10[1],xmm9[1]
addsd %xmm9, %xmm10
movapd %xmm5, %xmm9
mulsd %xmm5, %xmm9
addsd %xmm10, %xmm9
ucomisd %xmm8, %xmm9
movapd %xmm0, %xmm8
unpckhpd %xmm0, %xmm8            # xmm8 = xmm8[1],xmm0[1]
jbe 0x129e5
movq %xmm9, %xmm9            # xmm9 = xmm9[0],zero
sqrtpd %xmm9, %xmm9
divsd %xmm9, %xmm5
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
divpd %xmm9, %xmm1
movupd %xmm1, 0x228(%rbx)
movsd %xmm5, 0x238(%rbx)
movapd %xmm4, %xmm9
unpcklpd %xmm4, %xmm9            # xmm9 = xmm9[0],xmm4[0]
mulpd %xmm0, %xmm9
addpd %xmm9, %xmm7
movapd %xmm3, %xmm9
unpcklpd %xmm3, %xmm9            # xmm9 = xmm9[0],xmm3[0]
mulpd %xmm1, %xmm9
addpd %xmm7, %xmm9
movupd %xmm9, 0x1f8(%rbx)
mulsd %xmm2, %xmm4
addsd %xmm4, %xmm6
mulsd %xmm5, %xmm3
addsd %xmm6, %xmm3
movsd %xmm3, 0x208(%rbx)
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
movapd %xmm3, %xmm6
mulsd %xmm2, %xmm6
movapd %xmm8, %xmm4
mulsd %xmm5, %xmm4
subsd %xmm6, %xmm4
mulsd %xmm0, %xmm5
mulsd %xmm1, %xmm2
subsd %xmm5, %xmm2
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
mulsd %xmm8, %xmm1
mulsd %xmm0, %xmm3
subsd %xmm1, %xmm3
movupd %xmm4, 0x240(%rbx)
movsd %xmm3, 0x250(%rbx)
movapd %xmm4, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x12ac6
movq %xmm0, %xmm0            # xmm0 = xmm0[0],zero
sqrtpd %xmm0, %xmm0
divsd %xmm0, %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm4
movupd %xmm4, 0x240(%rbx)
movsd %xmm3, 0x250(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x1c0(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x1c8(%rbx)
movsd 0x353a(%rip), %xmm0     # 0x16030
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rbx)
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x5756
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1081c
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x12b5a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x12b74
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x12b91
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xd400(%rip), %rsi      # 0x1ff98
leaq 0xe0(%rsp), %rdi
callq 0x3210
leaq 0x160(%rsp), %rdi
callq 0x30e0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x12be6
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x12be6
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x12c00
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x12c1d
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xd374(%rip), %rsi      # 0x1ff98
leaq 0xe0(%rsp), %rdi
callq 0x3210
leaq 0x160(%rsp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x34b0