// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f4a(%rip), %r14      # 0x16c74
movq %r14, %rsi
movq %r14, %rdx
callq 0x5be2
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 0x5be2
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 0x6153(%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 0x5db4(%rip), %rdx      # 0x16c74
movq %rdi, 0x18(%rsp)
movq %rdx, %rsi
callq 0x5be2
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 0x5d5e(%rip), %rdx      # 0x16c74
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x5be2
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 0x10f7e
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp,%r15,8)
incq %r15
jmp 0x10f53
cmpq $0x8, %r15
jne 0x1105b
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x11198
movq %rbx, %rdi
callq 0x1161c
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 0x11092
movq 0xefbf(%rip), %rdi      # 0x1ffc8
leaq 0x6f10(%rip), %rsi      # 0x17f20
movl $0x17, %edx
callq 0x32f0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0xef9e(%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 0x11092
movq 0xef66(%rip), %rdi      # 0x1ffc8
leaq 0x6e8f(%rip), %rsi      # 0x17ef8
movl $0x27, %edx
callq 0x32f0
movq 0xef4e(%rip), %rdi      # 0x1ffc8
leaq 0x5bf2(%rip), %rsi      # 0x16c73
movl $0x1, %edx
callq 0x32f0
movb $0x0, 0x2d0(%rbx)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x110ae
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xeee3(%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 0x110f9
movq %rax, %r12
jmp 0x11118
movq %rax, %r12
jmp 0x11139
movq %rax, %r12
jmp 0x11156
movq %rax, %r12
jmp 0x11175
jmp 0x110f9
movq %rax, %r12
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x11118
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xee79(%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 0x11156
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x11175
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x1118f
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq %r12, %rdi
callq 0x34b0
nop