// File: /workspace/github_cpp_makefile_star2_O2/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 0x31c7(%rip), %rsi      # 0xb0ca
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x8000
leaq 0x31ba(%rip), %rsi      # 0xb0d4
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x8014
leaq 0x31ad(%rip), %rsi      # 0xb0de
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x8028
leaq 0x31a0(%rip), %rsi      # 0xb0e8
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x808e
leaq 0x3194(%rip), %rsi      # 0xb0f3
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x80a5
leaq 0x3188(%rip), %rsi      # 0xb0fe
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x80b9
leaq 0x317c(%rip), %rsi      # 0xb109
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x80cd
leaq 0x3170(%rip), %rsi      # 0xb114
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x80e1
leaq 0x3163(%rip), %rsi      # 0xb11e
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x80f5
leaq 0x3156(%rip), %rsi      # 0xb128
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x8109
leaq 0x3149(%rip), %rsi      # 0xb132
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x811d
xorl %eax, %eax
jmp 0x8168
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x827e(%rip)      # 0x10290
jmp 0x803a
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8272(%rip)      # 0x10298
jmp 0x803a
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8266(%rip)      # 0x102a0
movq 0x8(%rbx,%r15,8), %rdi
callq 0x2200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r14)
movq 0x10(%rbx,%r15,8), %rdi
callq 0x2200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r14)
movq 0x18(%rbx,%r15,8), %rdi
callq 0x2200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%r14)
movq 0x20(%rbx,%r15,8), %rdi
callq 0x2200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%r14)
jmp 0x8166
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8208(%rip)      # 0x102a8
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81f9(%rip)      # 0x102b0
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81ed(%rip)      # 0x102b8
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81e1(%rip)      # 0x102c0
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81d5(%rip)      # 0x102c8
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81c9(%rip)      # 0x102d0
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81bd(%rip)      # 0x102d8
jmp 0x812f
pushq $0x10
popq %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81b1(%rip)      # 0x102e0
movq 0x8(%rbx,%r15,8), %rdi
callq 0x22b0
movl %eax, (%r14)
movq 0x10(%rbx,%r15,8), %rdi
callq 0x22b0
movl %eax, 0x4(%r14)
movq 0x18(%rbx,%r15,8), %rdi
callq 0x22b0
movl %eax, 0x8(%r14)
movq 0x20(%rbx,%r15,8), %rdi
callq 0x22b0
movl %eax, 0xc(%r14)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq