// File: /workspace/github_cpp_makefile_star2_O1/logicx24[P]RayTracer/raytracer.cpp
// Function: parseObj(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<Polygon*, std::allocator<Polygon*>>*, std::vector<mat4, std::allocator<mat4>>*, Material&)
void parseObj(string fileName, vector<Polygon*> *sceneObjects, vector<mat4> *transforms, Material &curMat) {
	vector<vec3> verts;
	vector<vec3>normals;
	verts.push_back(vec3(0, 0, 0)); // Kill index 0, since vertices are numbered 1 ... n
	normals.push_back(vec3(0, 0, 0)); // Kill index 0, since normals are numbered 1 ... n
	ifstream objFile(fileName);
	string currentLine;
	string argument;
    if (!objFile.is_open()) {
    	cerr << "Error opening obj file" << endl;
    	return;
    }
    while (getline(objFile, currentLine)) {
    	istringstream iss;
    	iss.str(currentLine);
    	iss >> argument;
        if (currentLine.empty() || argumentMatches(argument, "#")) {
        	continue;
        } else if (argumentMatches(argument, "v")) {
        	float args[3];
            parseArgs(args, &iss, 3, "Incorrect number of arguments for vertex in obj file.");
            verts.push_back(vec3(args[0], args[1], args[2]));
        } else if (argumentMatches(argument, "vn")) {
        	float args[3];
            parseArgs(args, &iss, 3, "Incorrect number of arguments for vertex normal in obj file.");
            vec3 norm = vec3(args[0], args[1], args[2]);
            normals.push_back(norm);
        } else if (argumentMatches(argument, "f")) {
        	bool normalSpecified = false;
            int vertArgs[3];
            int normalArgs[3];
            string temp;
            int index = 0;
            while (iss >> temp) {
            	normalSpecified = (temp.find("//") != string::npos);
                /*
            	std::string s = "scott>=tiger>=mushroom";
            	std::string delimiter = ">=";

            	size_t pos = 0;
            	std::string token;
                while ((pos = s.find(delimiter)) != std::string::npos) {
                	    token = s.substr(0, pos);
                	        std::cout << token << std::endl;
                	            s.erase(0, pos + delimiter.length());

                }
                std::cout << s << std::endl;
                */
                if (normalSpecified) {
                	string delimeter = "//";
                	int pos = temp.find(delimeter);
                    string face = temp.substr(0, pos);
                    vertArgs[index] = stoi(face);
                    temp.erase(0, pos + delimeter.length());
                    normalArgs[index] = stoi(temp);
                } else {
                    vertArgs[index] = atoi(temp.c_str());
                }
                index++;
            }
            Triangle *t;
            mat4 currentTransform = reduceTransforms(transforms);
            if (normalSpecified) {
            	vec3 n1 = normals[normalArgs[0]];
            	vec3 n2 = normals[normalArgs[1]];
            	vec3 n3 = normals[normalArgs[2]];
                t = new Triangle(verts[vertArgs[0]], verts[vertArgs[1]], verts[vertArgs[2]], 
                              curMat, currentTransform, n1, n2, n3);
            } else {
                t = new Triangle(verts[vertArgs[0]], verts[vertArgs[1]], verts[vertArgs[2]], 
                                    curMat, currentTransform);
            }
            sceneObjects->push_back(t);
        } else {
        	cerr << "Unknown input in obj file: " << fileName << "." << endl;
        }
    }
    objFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp            # imm = 0x6F8
movq %rcx, -0xd8(%rbp)
movq %rdx, -0x1b8(%rbp)
movq %rsi, -0x1b0(%rbp)
movq %rdi, -0xe0(%rbp)
xorps %xmm0, %xmm0
leaq -0x100(%rbp), %rdi
movaps %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rax, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
leaq -0x720(%rbp), %rsi
movq %rax, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0xa2d8
leaq -0x720(%rbp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0xd0(%rbp), %rdi
callq 0xa2d8
leaq -0x720(%rbp), %rbx
movq %rbx, %rdi
movq -0xe0(%rbp), %rsi
movl $0x8, %edx
callq 0x33d0
leaq -0xa8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x6a8(%rbp), %rdi
callq 0x30a0
testb %al, %al
je 0x4bfa
leaq -0x38(%rbp), %r12
leaq -0xb8(%rbp), %r13
leaq -0x510(%rbp), %r14
movq -0x720(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3490
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4c42
movq %r14, %rdi
callq 0x3180
leaq -0x500(%rbp), %rdi
movq %r13, %rsi
callq 0x3370
movq %r14, %rdi
leaq -0x78(%rbp), %rsi
callq 0x32c0
movq -0xb0(%rbp), %rbx
testq %rbx, %rbx
je 0x43b4
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0xa23e
movq -0x218(%rbp), %rdi
leaq 0x12d16(%rip), %rsi     # 0x170bd
callq 0x3300
testl %eax, %eax
sete %r14b
jmp 0x43b7
movb $0x1, %r14b
testq %rbx, %rbx
je 0x43de
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x43de
movq -0x208(%rbp), %rsi
incq %rsi
callq 0x3220
testb %r14b, %r14b
leaq -0x510(%rbp), %r14
jne 0x4bd3
leaq -0x268(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x278(%rbp), %rdi
callq 0xa23e
movq -0x278(%rbp), %r15
movq %r15, %rdi
leaq 0x12c9b(%rip), %rsi     # 0x170bf
callq 0x3300
movl %eax, %r13d
leaq -0x268(%rbp), %rax
cmpq %rax, %r15
je 0x444a
movq -0x268(%rbp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x3220
testl %r13d, %r13d
je 0x4599
leaq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x258(%rbp), %rdi
callq 0xa23e
movq -0x258(%rbp), %r15
movq %r15, %rdi
leaq 0x12c6e(%rip), %rsi     # 0x170f7
callq 0x3300
movl %eax, %r13d
leaq -0x248(%rbp), %rax
cmpq %rax, %r15
je 0x44af
movq -0x248(%rbp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x3220
testl %r13d, %r13d
je 0x4639
leaq -0x228(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x238(%rbp), %rdi
callq 0xa23e
movq -0x238(%rbp), %r15
movq %r15, %rdi
leaq 0x12c49(%rip), %rsi     # 0x17137
callq 0x3300
movl %eax, %r13d
leaq -0x228(%rbp), %rax
cmpq %rax, %r15
je 0x4514
movq -0x228(%rbp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x3220
testl %r13d, %r13d
je 0x46d9
movl $0x1b, %edx
movq 0x19ac7(%rip), %rdi     # 0x1dff0
leaq 0x12c0c(%rip), %rsi     # 0x1713c
callq 0x3260
leaq -0xb8(%rbp), %r13
movq -0xe0(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x19a9f(%rip), %rdi     # 0x1dff0
callq 0x3260
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x12e76(%rip), %rsi     # 0x173de
callq 0x3260
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
jmp 0x4bd3
leaq -0x1e8(%rbp), %rbx
movq %rbx, -0x1f8(%rbp)
leaq -0x1f8(%rbp), %r15
movq %r15, %rdi
leaq 0x12b09(%rip), %rsi     # 0x170c1
leaq 0x12b37(%rip), %rdx     # 0x170f6
callq 0xa4ce
leaq -0xb8(%rbp), %r13
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movl $0x3, %edx
movq %r15, %rcx
callq 0x3944
movq -0x1f8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x45fa
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x3220
cvtss2sd -0x48(%rbp), %xmm0
cvtss2sd -0x44(%rbp), %xmm1
cvtss2sd -0x40(%rbp), %xmm2
movsd %xmm0, -0x1a8(%rbp)
movsd %xmm1, -0x1a0(%rbp)
movsd %xmm2, -0x198(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xa2d8
jmp 0x4bd3
leaq -0x1c8(%rbp), %rbx
movq %rbx, -0x1d8(%rbp)
leaq -0x1d8(%rbp), %r15
movq %r15, %rdi
leaq 0x12aa2(%rip), %rsi     # 0x170fa
leaq 0x12ad7(%rip), %rdx     # 0x17136
callq 0xa4ce
leaq -0xb8(%rbp), %r13
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movl $0x3, %edx
movq %r15, %rcx
callq 0x3944
movq -0x1d8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x469a
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x3220
cvtss2sd -0x48(%rbp), %xmm0
cvtss2sd -0x44(%rbp), %xmm1
cvtss2sd -0x40(%rbp), %xmm2
movsd %xmm0, -0x1a8(%rbp)
movsd %xmm1, -0x1a0(%rbp)
movsd %xmm2, -0x198(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x6b24
jmp 0x4bd3
movq %r12, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
xorl %r12d, %r12d
movq $0x0, -0xe8(%rbp)
leaq -0x48(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x48e9
movl $0x2, %ecx
movq %rbx, %rdi
leaq 0x12a12(%rip), %r15     # 0x17139
movq %r15, %rsi
xorl %edx, %edx
callq 0x3430
cmpq $-0x1, %rax
setne %al
movq %rax, -0xe8(%rbp)
je 0x48d2
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %rdi
movq %r15, %rsi
leaq 0x129d7(%rip), %rdx     # 0x1713b
callq 0xa4ce
movq -0x1a8(%rbp), %rsi
movq -0x1a0(%rbp), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3430
movslq %eax, %r15
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq -0x98(%rbp), %r14
callq 0x3050
movq %rax, %r13
movl (%rax), %ebx
movl $0x0, (%rax)
movq %r14, %rdi
leaq -0x118(%rbp), %rsi
movl $0xa, %edx
callq 0x3310
cmpq %r14, -0x118(%rbp)
je 0x4cdd
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x4ce9
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x4ce9
testl %ecx, %ecx
jne 0x47ff
movl %ebx, (%r13)
movl %eax, -0x54(%rbp,%r12)
addq -0x1a0(%rbp), %r15
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3090
movq -0x48(%rbp), %r14
movl (%r13), %ebx
movl $0x0, (%r13)
movq %r14, %rdi
leaq -0x118(%rbp), %rsi
movl $0xa, %edx
callq 0x3310
cmpq %r14, -0x118(%rbp)
je 0x4cf5
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq -0x510(%rbp), %r14
jb 0x4d01
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x4d01
testl %ecx, %ecx
jne 0x4880
movl %ebx, (%r13)
movl %eax, -0x124(%rbp,%r12)
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x48aa
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
leaq -0x48(%rbp), %rbx
je 0x48e0
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x48e0
movq -0x48(%rbp), %rdi
callq 0x33b0
movl %eax, -0x54(%rbp,%r12)
addq $0x4, %r12
jmp 0x46fb
leaq -0x1a8(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0x3b49
testb $0x1, -0xe8(%rbp)
je 0x4ab7
movslq -0x124(%rbp), %rax
movq -0xd0(%rbp), %rcx
leaq (%rax,%rax,2), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd 0x8(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x10(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x88(%rbp)
movslq -0x120(%rbp), %rax
leaq (%rax,%rax,2), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x118(%rbp)
movsd 0x8(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x110(%rbp)
movsd 0x10(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x108(%rbp)
movslq -0x11c(%rbp), %rax
leaq (%rax,%rax,2), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x290(%rbp)
movsd 0x8(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x288(%rbp)
movsd 0x10(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x280(%rbp)
movl $0x2b8, %edi            # imm = 0x2B8
leaq -0x38(%rbp), %r12
callq 0x3210
movq %rax, %r13
movslq -0x54(%rbp), %rax
movq -0x100(%rbp), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rsi
movslq -0x50(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdx
movslq -0x4c(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rcx
movsd -0x1a8(%rbp), %xmm0
movsd %xmm0, -0x390(%rbp)
movups -0x1a0(%rbp), %xmm0
movups %xmm0, -0x388(%rbp)
movups -0x190(%rbp), %xmm0
movups %xmm0, -0x378(%rbp)
movups -0x180(%rbp), %xmm0
movups %xmm0, -0x368(%rbp)
movups -0x170(%rbp), %xmm0
movups %xmm0, -0x358(%rbp)
movsd -0x160(%rbp), %xmm0
movsd %xmm0, -0x348(%rbp)
movsd -0x158(%rbp), %xmm0
movsd %xmm0, -0x340(%rbp)
movsd -0x150(%rbp), %xmm0
movsd %xmm0, -0x338(%rbp)
movups -0x148(%rbp), %xmm0
movups %xmm0, -0x330(%rbp)
movups -0x138(%rbp), %xmm0
movups %xmm0, -0x320(%rbp)
subq $0x8, %rsp
movq %r13, %rdi
movq -0xd8(%rbp), %r8
leaq -0x390(%rbp), %r9
leaq -0x290(%rbp), %rax
pushq %rax
leaq -0x118(%rbp), %rax
pushq %rax
leaq -0x98(%rbp), %rax
pushq %rax
callq 0x6b62
addq $0x20, %rsp
jmp 0x4b9d
movl $0x2b8, %edi            # imm = 0x2B8
leaq -0x38(%rbp), %r12
callq 0x3210
movq %rax, %r13
movslq -0x54(%rbp), %rax
movq -0x100(%rbp), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rsi
movslq -0x50(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdx
movslq -0x4c(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rcx
movsd -0x1a8(%rbp), %xmm0
movsd %xmm0, -0x310(%rbp)
movups -0x1a0(%rbp), %xmm0
movups %xmm0, -0x308(%rbp)
movups -0x190(%rbp), %xmm0
movups %xmm0, -0x2f8(%rbp)
movups -0x180(%rbp), %xmm0
movups %xmm0, -0x2e8(%rbp)
movups -0x170(%rbp), %xmm0
movups %xmm0, -0x2d8(%rbp)
movsd -0x160(%rbp), %xmm0
movsd %xmm0, -0x2c8(%rbp)
movsd -0x158(%rbp), %xmm0
movsd %xmm0, -0x2c0(%rbp)
movsd -0x150(%rbp), %xmm0
movsd %xmm0, -0x2b8(%rbp)
movups -0x148(%rbp), %xmm0
movups %xmm0, -0x2b0(%rbp)
movups -0x138(%rbp), %xmm0
movups %xmm0, -0x2a0(%rbp)
movq %r13, %rdi
movq -0xd8(%rbp), %r8
leaq -0x310(%rbp), %r9
callq 0x6cf2
movq %r13, -0x98(%rbp)
movq -0x1b0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xa6b6
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
leaq -0xb8(%rbp), %r13
je 0x4bd3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
movq %r14, %rdi
movq 0x193eb(%rip), %rsi     # 0x1dfc8
callq 0x3320
leaq -0x498(%rbp), %rdi
callq 0x30d0
leaq -0x720(%rbp), %rbx
jmp 0x430d
movq 0x193ef(%rip), %rbx     # 0x1dff0
leaq 0x1249e(%rip), %rsi     # 0x170a6
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3260
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq 0x193bd(%rip), %rdi     # 0x1dff0
callq 0x3040
movq %rax, %rdi
callq 0x3160
jmp 0x4c4e
leaq -0x720(%rbp), %rdi
callq 0x3070
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4c67
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c89
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3220
leaq -0x720(%rbp), %rdi
callq 0x30b0
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x4cb0
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x4ccb
movq -0xf0(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
addq $0x6f8, %rsp            # imm = 0x6F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12719(%rip), %rdi     # 0x173fd
callq 0x3140
leaq 0x1270d(%rip), %rdi     # 0x173fd
callq 0x3330
leaq 0x12701(%rip), %rdi     # 0x173fd
callq 0x3140
leaq 0x126f5(%rip), %rdi     # 0x173fd
callq 0x3330
jmp 0x4d0f
movq %rax, %r14
movl $0x2b8, %esi            # imm = 0x2B8
movq %r13, %rdi
callq 0x3220
jmp 0x4da0
jmp 0x4d9d
jmp 0x4d9d
jmp 0x4d29
jmp 0x4d29
movq %rax, %r14
jmp 0x4e7e
jmp 0x4d9d
jmp 0x4e15
jmp 0x4e15
movq %rax, %r14
movq -0x1d8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4e18
movq -0x1c8(%rbp), %rsi
jmp 0x4e0b
jmp 0x4d95
jmp 0x4e15
movq %rax, %r14
movq -0x1f8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4e18
movq -0x1e8(%rbp), %rsi
jmp 0x4e0b
jmp 0x4e15
jmp 0x4d95
jmp 0x4d9d
movq %rax, %r14
jmp 0x4dd8
movq %rax, %r14
jmp 0x4db6
movq %rax, %r14
jmp 0x4e37
movq %rax, %r14
leaq -0x38(%rbp), %rbx
jmp 0x4dfe
jmp 0x4da8
movq %rax, %r14
cmpl $0x0, (%r13)
jne 0x4db6
movl %ebx, (%r13)
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x4dd8
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3220
leaq -0x38(%rbp), %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x4dfe
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4e18
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x4e18
movq %rax, %r14
movq 0x191a9(%rip), %rsi     # 0x1dfc8
leaq -0x510(%rbp), %rdi
callq 0x3320
leaq -0x498(%rbp), %rdi
callq 0x30d0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4e50
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4e72
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3220
leaq -0x720(%rbp), %rdi
callq 0x30b0
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x4e99
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x4eb4
movq -0xf0(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
movq %r14, %rdi
callq 0x3450