// File: /workspace/github_cpp_makefile_star2_O1/ticky[P]ps2iconsys/src/iconsys_builder.cpp
// Function: ParseCommandLine_4Args(int, char**)
bool ParseCommandLine_4Args(int i, char* argv[])
{
	//Parameters with 4 arguments
	if(strcmp( argv[i], "--light-1" ) == 0) {
		light1_dir = new float[4];
		light1_dir[0] = static_cast<float>( atof(argv[++i]) );  
		light1_dir[1] = static_cast<float>( atof(argv[++i]) );
		light1_dir[2] = static_cast<float>( atof(argv[++i]) );
		light1_dir[3] = static_cast<float>( atof(argv[++i]) );
	} else if(strcmp( argv[i], "--light-2" ) == 0) {
		light2_dir = new float[4];
		light2_dir[0] = static_cast<float>( atof(argv[++i]) );
		light2_dir[1] = static_cast<float>( atof(argv[++i]) );
		light2_dir[2] = static_cast<float>( atof(argv[++i]) );
		light2_dir[3] = static_cast<float>( atof(argv[++i]) );
	} else if(strcmp( argv[i], "--light-3" ) == 0) {
		light3_dir = new float[4];
		light3_dir[0] = static_cast<float>( atof(argv[++i]) );
		light3_dir[1] = static_cast<float>( atof(argv[++i]) );
		light3_dir[2] = static_cast<float>( atof(argv[++i]) );
		light3_dir[3] = static_cast<float>( atof(argv[++i]) );
	} else if(strcmp( argv[i], "--lcolor-1" ) == 0) {
		light1_color = new int[4];
		light1_color[0] = atoi(argv[++i]);  light1_color[1] = atoi(argv[++i]);
		light1_color[2] = atoi(argv[++i]);  light1_color[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--lcolor-2" ) == 0) {
		light2_color = new int[4];
		light2_color[0] = atoi(argv[++i]);  light2_color[1] = atoi(argv[++i]);
		light2_color[2] = atoi(argv[++i]);  light2_color[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--lcolor-3" ) == 0) {
		light3_color = new int[4];
		light3_color[0] = atoi(argv[++i]);  light3_color[1] = atoi(argv[++i]);
		light3_color[2] = atoi(argv[++i]);  light3_color[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--lcolor-a" ) == 0) {
		ambient_color = new int[4];
		ambient_color[0] = atoi(argv[++i]);  ambient_color[1] = atoi(argv[++i]);
		ambient_color[2] = atoi(argv[++i]);  ambient_color[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--color-1" ) == 0) {
		bg_color_ul = new int[4];
		bg_color_ul[0] = atoi(argv[++i]);  bg_color_ul[1] = atoi(argv[++i]);
		bg_color_ul[2] = atoi(argv[++i]);  bg_color_ul[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--color-2" ) == 0) {
		bg_color_ur = new int[4];
		bg_color_ur[0] = atoi(argv[++i]);  bg_color_ur[1] = atoi(argv[++i]);
		bg_color_ur[2] = atoi(argv[++i]);  bg_color_ur[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--color-3" ) == 0) {
		bg_color_ll = new int[4];
		bg_color_ll[0] = atoi(argv[++i]);  bg_color_ll[1] = atoi(argv[++i]);
		bg_color_ll[2] = atoi(argv[++i]);  bg_color_ll[3] = atoi(argv[++i]);
	} else if(strcmp( argv[i], "--color-4" ) == 0) {
		bg_color_lr = new int[4];
		bg_color_lr[0] = atoi(argv[++i]);  bg_color_lr[1] = atoi(argv[++i]);
		bg_color_lr[2] = atoi(argv[++i]);  bg_color_lr[3] = atoi(argv[++i]);
	} else {
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movslq %edi, %r15
movq (%rsi,%r15,8), %r14
leaq 0x3df7(%rip), %rsi      # 0xd080
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9386
leaq 0x3dea(%rip), %rsi      # 0xd08a
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x939c
leaq 0x3ddd(%rip), %rsi      # 0xd094
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x93b2
leaq 0x3dd0(%rip), %rsi      # 0xd09e
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x941a
leaq 0x3dc4(%rip), %rsi      # 0xd0a9
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9433
leaq 0x3db8(%rip), %rsi      # 0xd0b4
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x944c
leaq 0x3dac(%rip), %rsi      # 0xd0bf
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9462
leaq 0x3da0(%rip), %rsi      # 0xd0ca
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9478
leaq 0x3d93(%rip), %rsi      # 0xd0d4
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x948e
leaq 0x3d86(%rip), %rsi      # 0xd0de
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x94a4
leaq 0x3d79(%rip), %rsi      # 0xd0e8
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x94ba
xorl %eax, %eax
jmp 0x9507
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8f0e(%rip)      # 0x122a8
jmp 0x93c6
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8f00(%rip)      # 0x122b0
jmp 0x93c6
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8ef2(%rip)      # 0x122b8
movq 0x8(%rbx,%r15,8), %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r14)
movq 0x10(%rbx,%r15,8), %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r14)
movq 0x18(%rbx,%r15,8), %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%r14)
movq 0x20(%rbx,%r15,8), %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%r14)
jmp 0x9505
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e92(%rip)      # 0x122c0
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e81(%rip)      # 0x122c8
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e70(%rip)      # 0x122d0
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e62(%rip)      # 0x122d8
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e54(%rip)      # 0x122e0
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e46(%rip)      # 0x122e8
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e38(%rip)      # 0x122f0
jmp 0x94ce
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8e2a(%rip)      # 0x122f8
movq 0x8(%rbx,%r15,8), %rdi
callq 0x22d0
movl %eax, (%r14)
movq 0x10(%rbx,%r15,8), %rdi
callq 0x22d0
movl %eax, 0x4(%r14)
movq 0x18(%rbx,%r15,8), %rdi
callq 0x22d0
movl %eax, 0x8(%r14)
movq 0x20(%rbx,%r15,8), %rdi
callq 0x22d0
movl %eax, 0xc(%r14)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq