// File: IsaacLaw12[P]RayTracer/./src/AnimatedObject.cpp
// Function: AnimatedObject::load_animation()
void AnimatedObject::load_animation(){
    std::vector<std::string> animation_steps = extract_file_lines(animation_file);
    int section_start = 0;
    int section_end = 0;
    for (std::string animation_step:animation_steps){
        std::stringstream driver(animation_step);
        driver >> section_end;
        std::vector<double> transform_floats;
        double temp = 0;
        while (driver >> temp){
            transform_floats.push_back(temp);
        }
        add_animation_section(section_start, section_end, transform_floats);
        section_start = section_end;
    }
}

// Assembly:
subq $0x288, %rsp            # imm = 0x288
movq %rdi, 0x280(%rsp)
movq 0x280(%rsp), %rsi
movq %rsi, 0x28(%rsp)
addq $0x10, %rsi
leaq 0x248(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x4130
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x268(%rsp), %rdi
callq 0x170d0
jmp 0x16d6b
leaq 0x248(%rsp), %rdi
callq 0x4200
movl $0x0, 0x238(%rsp)
movl $0x0, 0x234(%rsp)
leaq 0x268(%rsp), %rax
movq %rax, 0x228(%rsp)
movq 0x228(%rsp), %rdi
callq 0x17920
movq %rax, 0x220(%rsp)
movq 0x228(%rsp), %rdi
callq 0x17950
movq %rax, 0x218(%rsp)
leaq 0x220(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x17980
testb $0x1, %al
jne 0x16de6
jmp 0x16fff
leaq 0x220(%rsp), %rdi
callq 0x179c0
movq %rax, %rsi
leaq 0x1f8(%rsp), %rdi
callq 0x4130
jmp 0x16e05
movl $0x10, %edi
movl $0x8, %esi
callq 0x11e40
movl %eax, 0x24(%rsp)
jmp 0x16e1a
movl 0x24(%rsp), %edx
leaq 0x70(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x4520
jmp 0x16e32
leaq 0x70(%rsp), %rdi
leaq 0x234(%rsp), %rsi
callq 0x41f0
jmp 0x16e46
leaq 0x58(%rsp), %rdi
callq 0x179d0
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x42e0
movq %rax, 0x18(%rsp)
jmp 0x16e6f
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4440
movb %al, 0x17(%rsp)
jmp 0x16e89
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x16e96
jmp 0x16f33
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x179e0
jmp 0x16ea7
jmp 0x16e59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
leaq 0x248(%rsp), %rdi
callq 0x4200
jmp 0x17021
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
jmp 0x17014
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
jmp 0x16ff0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
jmp 0x16fe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
jmp 0x16fdc
movl 0x238(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x234(%rsp), %eax
movl %eax, 0x10(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x17a50
jmp 0x16f5a
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x17210
jmp 0x16f73
leaq 0x38(%rsp), %rdi
callq 0x116d0
movl 0x234(%rsp), %eax
movl %eax, 0x238(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x116d0
leaq 0x70(%rsp), %rdi
callq 0x4290
leaq 0x1f8(%rsp), %rdi
callq 0x4200
leaq 0x220(%rsp), %rdi
callq 0x17b50
jmp 0x16dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x240(%rsp)
movl %eax, 0x23c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x116d0
leaq 0x58(%rsp), %rdi
callq 0x116d0
leaq 0x70(%rsp), %rdi
callq 0x4290
leaq 0x1f8(%rsp), %rdi
callq 0x4200
jmp 0x17014
leaq 0x268(%rsp), %rdi
callq 0x17b70
addq $0x288, %rsp            # imm = 0x288
retq
leaq 0x268(%rsp), %rdi
callq 0x17b70
movq 0x240(%rsp), %rdi
callq 0x45e0
nop