// File: /workspace/github_cpp_makefile_star2_O2/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 $0x208, %rsp            # imm = 0x208
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x73b4(%rip), %r14      # 0x191ce
leaq 0x80(%rsp), %rdx
movq %r14, %rsi
callq 0x61f6
leaq 0x20(%rbx), %rdi
leaq 0x80(%rsp), %rdx
movq %rdi, 0x8(%rsp)
movq %r14, %rsi
callq 0x61f6
leaq 0x80(%rsp), %rdi
callq 0x127aa
leaq 0x50(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0x128f0
leaq 0x80(%rsp), %rdi
callq 0x127aa
leaq 0xd0(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0x128f0
leaq 0x80(%rsp), %rdi
callq 0x127aa
leaq 0x150(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0x128f0
leaq 0x80(%rsp), %rdi
callq 0x127aa
leaq 0x1d0(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0x128f0
leaq 0x80(%rsp), %rdi
callq 0x127cc
leaq 0x250(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0x12a36
movb $0x1, 0x2d0(%rbx)
leaq 0x2d8(%rbx), %r12
leaq 0x72d4(%rip), %rsi      # 0x191ce
leaq 0x80(%rsp), %rdx
movq %r12, %rdi
callq 0x61f6
andl $0x0, 0x2f8(%rbx)
leaq 0x80(%rsp), %rdi
pushq $0x18
popq %rdx
movq %r15, %rsi
callq 0x33e0
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
leaq 0x728c(%rip), %rsi      # 0x191ce
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x61f6
movq %r15, 0x18(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3320
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x2f8(%rbx), %r13
xorl %r15d, %r15d
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x31b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x11fae
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp,%r15,8)
incq %r15
jmp 0x11f83
cmpq $0x8, %r15
jne 0x12056
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x12106
movq %rbx, %rdi
callq 0x124a8
movq 0x80(%rsp), %rax
addq -0x18(%rax), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3440
leaq 0x80(%rsp), %rdi
movq %r12, %rsi
callq 0x3320
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x3320
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x3190
leaq 0x80(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3320
cmpq $0x0, 0x8(%rbx)
jne 0x1207f
movq 0x17f8d(%rip), %rdi     # 0x29fc0
leaq 0x91ae(%rip), %rsi      # 0x1b1e8
callq 0x32a0
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x3280
movq %rax, %rdi
callq 0x3120
jmp 0x1207f
movq 0x17f63(%rip), %rdi     # 0x29fc0
leaq 0x915c(%rip), %rsi      # 0x1b1c0
callq 0x32a0
leaq 0x715d(%rip), %rsi      # 0x191cd
movq %rax, %rdi
callq 0x32a0
movb $0x0, 0x2d0(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x3100
leaq 0x80(%rsp), %rdi
callq 0x3200
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x120ca
movq %rax, %r15
jmp 0x120d7
movq %rax, %r15
jmp 0x120e4
jmp 0x120c3
movq %rax, %r15
jmp 0x120f6
jmp 0x120c3
jmp 0x120c3
jmp 0x120c3
jmp 0x120c3
movq %rax, %r15
jmp 0x120ec
jmp 0x120ca
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x3100
leaq 0x80(%rsp), %rdi
callq 0x3200
movq %r12, %rdi
callq 0x3100
movq 0x8(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3100
movq %r15, %rdi
callq 0x3490