// File: /workspace/github_cpp_makefile_star2_O3/IsaacLaw12[P]RayTracer/./src/Transformation.cpp
// Function: Transformation::Transformation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Transformation::Transformation(std::string driver_string){
    // driver_string "model wx wy wz angle scale tx ty tz cube.obj"
    std::stringstream driver(driver_string);
    double transform_floats[8] = {};
    std::string driver_type = "";
    driver >> driver_type;

    double temp = 0;
    int counter = 0;
    while (driver >> temp){
        transform_floats[counter++] = temp;
    }
    if (counter != 8){
        // The correct transform numbers were not found
        std::cout << "WRONG NUMBERS OF MODEL ATTRIBUTES FOUND" << "\n";
        load_successful = false;
        return;
    }
    create_transform_matrix(transform_floats);
    generate_transform_matrix();

    driver.clear();
    driver >> smoothing;
    driver >> asset_name;
    driver >> lighting_group;
    driver >> animation_file;
    if (asset_name.length() == 0)
        std::cout << "Invalid driver_string: " << driver_string << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rdi)
leaq 0x601e(%rip), %r14      # 0x16c74
movq %r14, %rsi
movq %r14, %rdx
callq 0x5bde
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x20(%rbx)
movq %rdi, 0x20(%rsp)
movq %r14, %rsi
movq %r14, %rdx
callq 0x5bde
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rax, 0x78(%rbx)
movaps %xmm0, 0x80(%rbx)
movaps %xmm0, 0x90(%rbx)
movq %rax, 0xa0(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movaps 0x6227(%rip), %xmm1     # 0x16ef0
movups %xmm1, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movq %rax, 0xf8(%rbx)
movaps %xmm0, 0x100(%rbx)
movaps %xmm0, 0x110(%rbx)
movq %rax, 0x120(%rbx)
movups %xmm0, 0x128(%rbx)
movups %xmm0, 0x138(%rbx)
movups %xmm1, 0x148(%rbx)
movups %xmm0, 0x168(%rbx)
movups %xmm0, 0x158(%rbx)
movq %rax, 0x178(%rbx)
movaps %xmm0, 0x180(%rbx)
movaps %xmm0, 0x190(%rbx)
movq %rax, 0x1a0(%rbx)
movups %xmm0, 0x1a8(%rbx)
movups %xmm0, 0x1b8(%rbx)
movups %xmm1, 0x1c8(%rbx)
movups %xmm0, 0x1e8(%rbx)
movups %xmm0, 0x1d8(%rbx)
movq %rax, 0x1f8(%rbx)
movaps %xmm0, 0x200(%rbx)
movaps %xmm0, 0x210(%rbx)
movq %rax, 0x220(%rbx)
movups %xmm0, 0x228(%rbx)
movups %xmm0, 0x238(%rbx)
movq %rax, 0x248(%rbx)
movaps %xmm0, 0x2c0(%rbx)
movaps %xmm0, 0x2b0(%rbx)
movaps %xmm0, 0x2a0(%rbx)
movaps %xmm0, 0x290(%rbx)
movaps %xmm0, 0x280(%rbx)
movaps %xmm0, 0x270(%rbx)
movaps %xmm0, 0x260(%rbx)
movaps %xmm0, 0x250(%rbx)
movb $0x1, 0x2d0(%rbx)
leaq 0x2d8(%rbx), %rdi
leaq 0x2e8(%rbx), %rax
movq %rax, (%rsp)
movq %rax, 0x2d8(%rbx)
leaq 0x5e88(%rip), %rdx      # 0x16c74
movq %rdi, 0x18(%rsp)
movq %rdx, %rsi
callq 0x5bde
movl $0x0, 0x2f8(%rbx)
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x3400
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5e32(%rip), %rdx      # 0x16c74
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x5bde
leaq 0x90(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3340
leaq 0x2f8(%rbx), %r13
leaq 0x48(%rsp), %r14
movq $0x0, (%r14)
xorl %r15d, %r15d
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x31b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x10eaa
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp,%r15,8)
incq %r15
jmp 0x10e7f
cmpq $0x8, %r15
jne 0x10f87
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x110c4
movq %rbx, %rdi
callq 0x11586
movq 0x90(%rsp), %rax
addq -0x18(%rax), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3460
leaq 0x90(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3340
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x3340
leaq 0x90(%rsp), %rdi
movq %r13, %rsi
callq 0x3190
leaq 0x90(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3340
cmpq $0x0, 0x8(%rbx)
jne 0x10fbe
movq 0xf093(%rip), %rdi      # 0x1ffc8
leaq 0x6fe4(%rip), %rsi      # 0x17f20
movl $0x17, %edx
callq 0x32f0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0xf072(%rip), %rdi      # 0x1ffc8
callq 0x32f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31d0
jmp 0x10fbe
movq 0xf03a(%rip), %rdi      # 0x1ffc8
leaq 0x6f63(%rip), %rsi      # 0x17ef8
movl $0x27, %edx
callq 0x32f0
movq 0xf022(%rip), %rdi      # 0x1ffc8
leaq 0x5cc6(%rip), %rsi      # 0x16c73
movl $0x1, %edx
callq 0x32f0
movb $0x0, 0x2d0(%rbx)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x10fda
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xefb7(%rip), %rsi      # 0x1ff98
leaq 0x90(%rsp), %rdi
callq 0x3210
leaq 0x110(%rsp), %rdi
callq 0x30e0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11025
movq %rax, %r12
jmp 0x11044
movq %rax, %r12
jmp 0x11065
movq %rax, %r12
jmp 0x11082
movq %rax, %r12
jmp 0x110a1
jmp 0x11025
movq %rax, %r12
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x11044
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xef4d(%rip), %rsi      # 0x1ff98
leaq 0x90(%rsp), %rdi
callq 0x3210
leaq 0x110(%rsp), %rdi
callq 0x30e0
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq (%rsp), %rdi
je 0x11082
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x110a1
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x110bb
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq %r12, %rdi
callq 0x34b0
nop