// File: IsaacLaw12[P]RayTracer/./src/Scene.cpp
// Function: Scene::load_scene()
void Scene::load_scene(){
    std::ifstream in(orig_driver_file);
    std::string driver_line;
    // load line identifiers
    std::string light = "light";
    std::string model = "model";
    std::string ambient = "ambient";
    std::string sphere = "sphere";
    std::string wave = "wave";

    while (std::getline(in, driver_line)){
        if (!driver_line.compare(0, light.size(), light))
            add_light(driver_line);
        else if(!driver_line.compare(0, model.size(), model))
            add_model(driver_line);
        else if (!driver_line.compare(0, sphere.size(), sphere))
            add_sphere(driver_line);
        else if (!driver_line.compare(0, ambient.size(), ambient))
            edit_ambient(driver_line);
        else if (!driver_line.compare(0, wave.size(), wave))
            add_wave(driver_line);
        else if(valid_driver_line(driver_line)){
            // The only other driver lines should be camera specs
            edit_camera(driver_line);
        }
    }
    scene_camera.calculate_axis();
    in.close();
}

// Assembly:
subq $0x478, %rsp            # imm = 0x478
movq %rdi, 0x470(%rsp)
movq 0x470(%rsp), %rsi
movq %rsi, 0x80(%rsp)
leaq 0x268(%rsp), %rdi
movl $0x8, %edx
callq 0x4530
leaq 0x248(%rsp), %rdi
callq 0x4490
leaq 0x227(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x45f0
movq 0x88(%rsp), %rdx
leaq 0x2d0d7(%rip), %rsi     # 0x6bf89
leaq 0x228(%rsp), %rdi
callq 0x11e60
jmp 0x3eec1
leaq 0x227(%rsp), %rdi
callq 0x43c0
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x45f0
movq 0x78(%rsp), %rdx
leaq 0x2d0a3(%rip), %rsi     # 0x6bf8f
leaq 0x1f0(%rsp), %rdi
callq 0x11e60
jmp 0x3eefb
leaq 0x1ef(%rsp), %rdi
callq 0x43c0
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x45f0
movq 0x70(%rsp), %rdx
leaq 0x2d06f(%rip), %rsi     # 0x6bf95
leaq 0x1c8(%rsp), %rdi
callq 0x11e60
jmp 0x3ef35
leaq 0x1c7(%rsp), %rdi
callq 0x43c0
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x45f0
movq 0x68(%rsp), %rdx
leaq 0x2d03d(%rip), %rsi     # 0x6bf9d
leaq 0x1a0(%rsp), %rdi
callq 0x11e60
jmp 0x3ef6f
leaq 0x19f(%rsp), %rdi
callq 0x43c0
leaq 0x177(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x45f0
movq 0x60(%rsp), %rdx
leaq 0x2d00a(%rip), %rsi     # 0x6bfa4
leaq 0x178(%rsp), %rdi
callq 0x11e60
jmp 0x3efa9
leaq 0x177(%rsp), %rdi
callq 0x43c0
leaq 0x268(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4090
movq %rax, 0x58(%rsp)
jmp 0x3efd2
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4440
movb %al, 0x57(%rsp)
jmp 0x3efec
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x3eff9
jmp 0x3f4d8
leaq 0x228(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x4260
movq 0x48(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0x4460
movl %eax, 0x50(%rsp)
jmp 0x3f02a
movl 0x50(%rsp), %eax
cmpl $0x0, %eax
jne 0x3f174
leaq 0x150(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f04e
movq 0x80(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x3f910
jmp 0x3f065
leaq 0x150(%rsp), %rdi
callq 0x4200
jmp 0x3f4d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x227(%rsp), %rdi
callq 0x43c0
jmp 0x3f59e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1ef(%rsp), %rdi
callq 0x43c0
jmp 0x3f591
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1c7(%rsp), %rdi
callq 0x43c0
jmp 0x3f584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x19f(%rsp), %rdi
callq 0x43c0
jmp 0x3f577
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x177(%rsp), %rdi
callq 0x43c0
jmp 0x3f56a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x3f55d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
leaq 0x1f0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4260
movq 0x38(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0x4460
movl %eax, 0x44(%rsp)
jmp 0x3f1a5
movl 0x44(%rsp), %eax
cmpl $0x0, %eax
jne 0x3f214
leaq 0x130(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f1c5
movq 0x80(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x3f9a0
jmp 0x3f1dc
leaq 0x130(%rsp), %rdi
callq 0x4200
jmp 0x3f4d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
leaq 0x1a0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x4260
movq 0x28(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0x4460
movl %eax, 0x34(%rsp)
jmp 0x3f245
movl 0x34(%rsp), %eax
cmpl $0x0, %eax
jne 0x3f2b4
leaq 0x110(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f265
movq 0x80(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x3fb10
jmp 0x3f27c
leaq 0x110(%rsp), %rdi
callq 0x4200
jmp 0x3f4cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4260
movq 0x18(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0x4460
movl %eax, 0x24(%rsp)
jmp 0x3f2e5
movl 0x24(%rsp), %eax
cmpl $0x0, %eax
jne 0x3f354
leaq 0xf0(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f305
movq 0x80(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x3fc90
jmp 0x3f31c
leaq 0xf0(%rsp), %rdi
callq 0x4200
jmp 0x3f4cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
leaq 0x178(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4260
movq 0x8(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0x4460
movl %eax, 0x14(%rsp)
jmp 0x3f385
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jne 0x3f3f4
leaq 0xd0(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f3a5
movq 0x80(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3fe10
jmp 0x3f3bc
leaq 0xd0(%rsp), %rdi
callq 0x4200
jmp 0x3f4cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
leaq 0xb0(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f40b
movq 0x80(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x3ff00
movb %al, 0x7(%rsp)
jmp 0x3f426
leaq 0xb0(%rsp), %rdi
callq 0x4200
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x3f440
jmp 0x3f4c9
leaq 0x90(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x4130
jmp 0x3f457
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x3ff90
jmp 0x3f46e
leaq 0x90(%rsp), %rdi
callq 0x4200
jmp 0x3f4c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x4200
jmp 0x3f55d
jmp 0x3f4cb
jmp 0x3f4cd
jmp 0x3f4cf
jmp 0x3f4d1
jmp 0x3f4d3
jmp 0x3efb6
movq 0x80(%rsp), %rdi
addq $0x20, %rdi
callq 0x9930
jmp 0x3f4eb
leaq 0x268(%rsp), %rdi
callq 0x40a0
jmp 0x3f4fa
leaq 0x178(%rsp), %rdi
callq 0x4200
leaq 0x1a0(%rsp), %rdi
callq 0x4200
leaq 0x1c8(%rsp), %rdi
callq 0x4200
leaq 0x1f0(%rsp), %rdi
callq 0x4200
leaq 0x228(%rsp), %rdi
callq 0x4200
leaq 0x248(%rsp), %rdi
callq 0x4200
leaq 0x268(%rsp), %rdi
callq 0x40c0
addq $0x478, %rsp            # imm = 0x478
retq
leaq 0x178(%rsp), %rdi
callq 0x4200
leaq 0x1a0(%rsp), %rdi
callq 0x4200
leaq 0x1c8(%rsp), %rdi
callq 0x4200
leaq 0x1f0(%rsp), %rdi
callq 0x4200
leaq 0x228(%rsp), %rdi
callq 0x4200
leaq 0x248(%rsp), %rdi
callq 0x4200
leaq 0x268(%rsp), %rdi
callq 0x40c0
movq 0x218(%rsp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)