// File: /workspace/github_cpp_makefile_star2_O3/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 0x3105(%rip), %rsi      # 0xc0da
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x90d2
leaq 0x30f8(%rip), %rsi      # 0xc0e4
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x90e8
leaq 0x30eb(%rip), %rsi      # 0xc0ee
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x90fe
leaq 0x30de(%rip), %rsi      # 0xc0f8
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9166
leaq 0x30d2(%rip), %rsi      # 0xc103
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x917f
leaq 0x30c6(%rip), %rsi      # 0xc10e
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9198
leaq 0x30ba(%rip), %rsi      # 0xc119
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x91ae
leaq 0x30ae(%rip), %rsi      # 0xc124
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x91c4
leaq 0x30a1(%rip), %rsi      # 0xc12e
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x91da
leaq 0x3094(%rip), %rsi      # 0xc138
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x91f0
leaq 0x3087(%rip), %rsi      # 0xc142
movq %r14, %rdi
callq 0x2280
testl %eax, %eax
je 0x9206
xorl %eax, %eax
jmp 0x9253
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81c2(%rip)      # 0x112a8
jmp 0x9112
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81b4(%rip)      # 0x112b0
jmp 0x9112
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x81a6(%rip)      # 0x112b8
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 0x9251
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8146(%rip)      # 0x112c0
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8135(%rip)      # 0x112c8
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8124(%rip)      # 0x112d0
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8116(%rip)      # 0x112d8
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8108(%rip)      # 0x112e0
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x80fa(%rip)      # 0x112e8
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x80ec(%rip)      # 0x112f0
jmp 0x921a
movl $0x10, %edi
callq 0x2030
movq %rax, %r14
movq %rax, 0x80de(%rip)      # 0x112f8
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