// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x330, %rsp            # imm = 0x330
movq %rdi, %rbx
leaq 0x1a8(%rsp), %r14
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x33e0
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x3320
leaq 0x78(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
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 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x3190
leaq 0x84(%rsp), %rsi
movq %rax, %rdi
callq 0x3190
leaq 0x88(%rsp), %rsi
movq %rax, %rdi
callq 0x3320
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x1d0(%rbx)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x1d8(%rbx)
movsd 0x78(%rsp), %xmm0
leaq 0xe8(%rsp), %r14
movsd %xmm0, (%r14)
movsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x8(%r14)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x10(%r14)
leaq 0x1e0(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x52e8
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x8(%r14)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%r14)
leaq 0x210(%rbx), %r14
leaq 0xe8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x52e8
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%r12)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%r12)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%r12)
leaq 0x228(%rbx), %r12
leaq 0xe8(%rsp), %rsi
movq %r12, %rdi
callq 0x52e8
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
callq 0x5304
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x5806
leaq 0xe8(%rsp), %rdi
movq %r12, %rsi
callq 0x5304
leaq 0xe8(%rsp), %rsi
movq %r12, %rdi
callq 0x5806
leaq 0x1d0(%rbx), %rsi
leaq 0x180(%rsp), %rdi
movq %r14, %rdx
callq 0x5423
leaq 0x1d8(%rbx), %rsi
movsd 0x190(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x198(%rsp), %r13
leaq 0x158(%rsp), %rdi
movq %r12, %rdx
callq 0x5423
leaq 0xe8(%rsp), %rsi
movq %r15, 0x8(%rsi)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsi)
movq %r13, 0x28(%rsi)
movsd 0x168(%rsp), %xmm0
movsd %xmm0, 0x50(%rsi)
movq 0x170(%rsp), %rax
movq %rax, 0x58(%rsi)
leaq 0x1f8(%rbx), %rdi
callq 0x15563
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x53de
leaq 0x240(%rbx), %r14
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x52e8
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
callq 0x5304
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x5806
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x1c0(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x1c8(%rbx)
movsd 0x3d43(%rip), %xmm0     # 0x18030
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rbx)
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x3360
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x11994
leaq 0xa8(%rsp), %rdi
callq 0x3100
leaq 0x88(%rsp), %rdi
callq 0x3100
leaq 0xc8(%rsp), %rdi
callq 0x3100
leaq 0x1a8(%rsp), %rdi
callq 0x3200
addq $0x330, %rsp            # imm = 0x330
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3100
jmp 0x14386
jmp 0x14383
jmp 0x14383
jmp 0x14383
jmp 0x14383
jmp 0x14383
jmp 0x14383
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x3100
leaq 0xc8(%rsp), %rdi
callq 0x3100
leaq 0x1a8(%rsp), %rdi
callq 0x3200
movq %rbx, %rdi
callq 0x3490
nop