// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/savecode.c
// Function: generate_test_code_qdaclass
void generate_test_code_qdaclass(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Model_qdaclassptr m)
{
 /*!Last Changed 08.08.2007*/
 char st[MAXLENGTH];
 code_function_header(testcodefile, "qdaclass", d->featurecount, language);
 code_constant_start(testcodefile, language);
 code_1d_array_constant_instance(testcodefile, language, d, "mean", d->multifeaturecount - 1, &mean);
 code_1d_array_constant_instance(testcodefile, language, d, "variance", d->multifeaturecount - 1, &variance);
 code_3d_array_constant_matrix(testcodefile, language, "wqua", d->classno, d->multifeaturecount - 1, d->multifeaturecount - 1, m->W);
 code_2d_array_constant_matrix(testcodefile, language, "wlin", d->classno, d->multifeaturecount - 1, m->w);
 code_1d_array_constant(testcodefile, language, "w0", d->multifeaturecount - 1, m->w0, REAL_TYPE);  
 code_variable_start(testcodefile, language);
 code_add_array_variable(testcodefile, language, 2, REAL_VARIABLE, "tmp1", d->multifeaturecount - 1, REAL_VARIABLE, "testdataconverted", d->multifeaturecount);
 code_add_variable(testcodefile, language, REAL_VARIABLE, 8, "sum", "maxvalue", "w0_i", "w_j", "w_ij", "w_ijk", "x_k", "x_j", "gi");
 code_add_variable(testcodefile, language, INTEGER_VARIABLE, 5, "i", "j", "k", "maxindex", "a");
 code_start(testcodefile, language);
 code_realize(testcodefile, language, d, YES);
 code_set_variable(testcodefile, language, "maxvalue", "-10000.0");  
 code_for(testcodefile, language, "i", 0, d->classno - 1, 1);     
 code_set_variable(testcodefile, language, "gi", "0.0"); 
 code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);
 code_set_variable(testcodefile, language, "sum", "0.0"); 
 code_for(testcodefile, language, "k", 0, d->multifeaturecount - 2, 1);     
 code_3d_array_index_variable(st, language, "wqua", "i", "j", "k");
 code_set_variable(testcodefile, language, "w_ijk", st);
 code_array_index_variable(st, language, "testdataconverted", "k");  
 code_set_variable(testcodefile, language, "x_k", st); 
 code_set_variable(testcodefile, language, "sum", "sum + w_ijk * x_k"); 
 code_endfor(testcodefile, language, "k");
 code_array_index_variable(st, language, "tmp1", "j");  
 code_set_variable(testcodefile, language, st, "sum"); 
 code_endfor(testcodefile, language, "j");
 code_set_variable(testcodefile, language, "sum", "0.0"); 
 code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);
 code_array_index_variable(st, language, "testdataconverted", "j");  
 code_set_variable(testcodefile, language, "x_j", st); 
 code_array_index_variable(st, language, "tmp1", "i");  
 code_set_variable(testcodefile, language, "w_j", st); 
 code_set_variable(testcodefile, language, "sum", "sum + w_j * x_j");  
 code_endfor(testcodefile, language, "j");
 code_set_variable(testcodefile, language, "gi", "gi + sum"); 
 code_set_variable(testcodefile, language, "sum", "0.0"); 
 code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);
 code_array_index_variable(st, language, "testdataconverted", "j");  
 code_set_variable(testcodefile, language, "x_j", st); 
 code_2d_array_index_variable(st, language, "wlin", "i", "j");
 code_set_variable(testcodefile, language, "w_ij", st);
 code_set_variable(testcodefile, language, "sum", "sum + w_ij * x_j");  
 code_endfor(testcodefile, language, "j");
 code_set_variable(testcodefile, language, "gi", "gi + sum"); 
 code_array_index_variable(st, language, "w0", "i");  
 code_set_variable(testcodefile, language, "w0_i", st); 
 code_set_variable(testcodefile, language, "gi", "gi + w0_i");  
 code_compare_and_set_bound(testcodefile, language, ">", "gi", "maxvalue", "maxindex"); 
 code_endfor(testcodefile, language, "i");
 code_function_return_string(testcodefile, "qdaclass", language, "maxindex");   
 code_function_end(testcodefile, language); 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x2565d(%rip), %rsi     # 0xa9d92
movl %ebx, %ecx
callq 0x7ce21
cmpl $0x2, %ebx
jne 0x8475a
leaq 0x2bb55(%rip), %rdi     # 0xb029d
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2d120(%rip), %rcx     # 0xb188b
leaq 0x32d836(%rip), %r9     # 0x3b1fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x21c94(%rip), %rcx     # 0xa6424
leaq 0x32d841(%rip), %r9     # 0x3b1fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
decl %r8d
subq $0x8, %rsp
leaq 0x2c4b0(%rip), %rdx     # 0xb0c6d
movq %r14, %rdi
movl %ebx, %esi
movl %r8d, %r9d
pushq (%r12)
callq 0x7ecfc
addq $0x10, %rsp
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
decl %r8d
movq 0x8(%r12), %r9
leaq 0x2c486(%rip), %rdx     # 0xb0c72
movq %r14, %rdi
movl %ebx, %esi
callq 0x7eb3d
movl 0x1c0(%r15), %ecx
decl %ecx
movq 0x10(%r12), %r8
leaq 0x2c3f4(%rip), %rdx     # 0xb0bff
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7e7f5
cmpl $0x2, %ebx
jne 0x8494a
leaq 0x2bad5(%rip), %rdi     # 0xb0300
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r10d
leal -0x1(%r10), %r9d
subq $0x8, %rsp
leaq 0x2c031(%rip), %r11     # 0xb0884
leaq 0x2c41d(%rip), %r8      # 0xb0c77
movq %r14, %rdi
movl $0x2, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x1
callq 0x7d384
addq $0x18, %rsp
leaq 0x2c3a6(%rip), %r10     # 0xb0c2a
leaq 0x2c13d(%rip), %r11     # 0xb09c8
leaq 0x2c402(%rip), %r12     # 0xb0c94
leaq 0x2c3e7(%rip), %r13     # 0xb0c80
leaq 0x2c362(%rip), %rbp     # 0xb0c02
leaq 0x2c406(%rip), %r8      # 0xb0cad
leaq 0x2c359(%rip), %r9      # 0xb0c07
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r12
pushq %r13
pushq %rbp
leaq 0x2c3a7(%rip), %r10     # 0xb0c7c
pushq %r10
leaq 0x2c3d8(%rip), %r10     # 0xb0cb6
pushq %r10
callq 0x7d617
addq $0x38, %rsp
leaq 0x235b0(%rip), %r10     # 0xa7ea0
leaq 0x2c1b3(%rip), %r11     # 0xb0aaa
leaq 0x2c484(%rip), %r12     # 0xb0d82
leaq 0x2c3b4(%rip), %r8      # 0xb0cb9
leaq 0x2c0a8(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7d617
addq $0x20, %rsp
leaq 0x2b7dd(%rip), %rdi     # 0xb0110
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x84a30
movl 0x1c0(%r15), %r10d
leal -0x1(%r10), %r9d
subq $0x8, %rsp
leaq 0x2bf24(%rip), %r11     # 0xb0884
leaq 0x2c310(%rip), %r8      # 0xb0c77
movq %r14, %rdi
movl %ebx, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x1
callq 0x7d384
addq $0x18, %rsp
leaq 0x2c29c(%rip), %r10     # 0xb0c2a
leaq 0x2c033(%rip), %r11     # 0xb09c8
leaq 0x2c2f8(%rip), %r12     # 0xb0c94
leaq 0x2c2dd(%rip), %r13     # 0xb0c80
leaq 0x2c258(%rip), %rbp     # 0xb0c02
leaq 0x2c2fc(%rip), %r8      # 0xb0cad
leaq 0x2c24f(%rip), %r9      # 0xb0c07
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r12
pushq %r13
pushq %rbp
leaq 0x2c2a0(%rip), %r10     # 0xb0c7c
pushq %r10
leaq 0x2c2d1(%rip), %r10     # 0xb0cb6
pushq %r10
callq 0x7d617
addq $0x38, %rsp
leaq 0x234a9(%rip), %r10     # 0xa7ea0
leaq 0x2c0ac(%rip), %r11     # 0xb0aaa
leaq 0x2c37d(%rip), %r12     # 0xb0d82
leaq 0x2c2ad(%rip), %r8      # 0xb0cb9
leaq 0x2bfa1(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7d617
addq $0x20, %rsp
incl 0x32d7b2(%rip)          # 0x3b21e8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8050d
leaq 0x2c1b8(%rip), %rdx     # 0xb0c07
leaq 0x2c1ba(%rip), %rcx     # 0xb0c10
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2c24b(%rip), %rdx     # 0xb0cb9
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
leaq 0x2c1a3(%rip), %rdx     # 0xb0c2a
leaq 0x2c187(%rip), %r12     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2bf07(%rip), %rdx     # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
leaq 0x2c1e7(%rip), %rdx     # 0xb0cad
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2c29d(%rip), %rdx     # 0xb0d82
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
movl %ebx, %r13d
cmpl $0x5, %ebx
ja 0x84b30
leaq 0x4f18a(%rip), %rax     # 0xd3c90
movq (%rax,%r13,8), %rsi
leaq 0x2c15c(%rip), %rdx     # 0xb0c6d
leaq 0x2c1a1(%rip), %rcx     # 0xb0cb9
leaq 0x2be95(%rip), %r8      # 0xb09b4
leaq 0x2c25c(%rip), %r9      # 0xb0d82
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2c149(%rip), %rdx     # 0xb0c80
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x4f235(%rip), %rbp     # 0xd3d80
cmpl $0x5, %ebx
ja 0x84b6d
movq (%rbp,%r13,8), %rsi
leaq 0x2bd28(%rip), %rdx     # 0xb0884
leaq 0x2c21f(%rip), %rcx     # 0xb0d82
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2c120(%rip), %rdx     # 0xb0c94
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2c125(%rip), %rdx     # 0xb0cad
leaq 0x2c0f7(%rip), %rcx     # 0xb0c86
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
cmpl $0x5, %ebx
ja 0x84bc5
movq (%rbp,%r13,8), %rsi
leaq 0x2c0c3(%rip), %rdx     # 0xb0c77
leaq 0x2bdf9(%rip), %rcx     # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2c0e1(%rip), %r12     # 0xb0cad
movq %rsp, %rdx
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x2c028(%rip), %rcx     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2bda8(%rip), %rdx     # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
cmpl $0x5, %ebx
ja 0x84c40
movq (%rbp,%r13,8), %rsi
leaq 0x2bc55(%rip), %rdx     # 0xb0884
leaq 0x2bd7e(%rip), %rcx     # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2bd81(%rip), %rdx     # 0xb09c8
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x84c76
movq (%rbp,%r13,8), %rsi
leaq 0x2c012(%rip), %rdx     # 0xb0c77
leaq 0x2c04d(%rip), %rcx     # 0xb0cb9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2bfff(%rip), %rdx     # 0xb0c7c
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2c01c(%rip), %r12     # 0xb0cad
leaq 0x2c000(%rip), %rcx     # 0xb0c98
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x2bf74(%rip), %rdx     # 0xb0c2a
leaq 0x2bfeb(%rip), %rcx     # 0xb0ca8
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2bf47(%rip), %rcx     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2bcc7(%rip), %rdx     # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
cmpl $0x5, %ebx
ja 0x84d21
movq (%rbp,%r13,8), %rsi
leaq 0x2bb74(%rip), %rdx     # 0xb0884
leaq 0x2bc9d(%rip), %rcx     # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2bca0(%rip), %rdx     # 0xb09c8
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x84d64
leaq 0x4efaf(%rip), %rax     # 0xd3cf0
movq (%rax,%r13,8), %rsi
leaq 0x2bf26(%rip), %rdx     # 0xb0c72
leaq 0x2bf66(%rip), %rcx     # 0xb0cb9
leaq 0x2bc5a(%rip), %r8      # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2be97(%rip), %rdx     # 0xb0c02
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2bf2e(%rip), %rdx     # 0xb0cad
leaq 0x2be93(%rip), %rcx     # 0xb0c19
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x2be89(%rip), %rdx     # 0xb0c2a
leaq 0x2bf00(%rip), %rcx     # 0xb0ca8
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x84dd4
movq (%rbp,%r13,8), %rsi
leaq 0x2be3c(%rip), %rdx     # 0xb0bff
leaq 0x2beef(%rip), %rcx     # 0xb0cb9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2bedb(%rip), %rdx     # 0xb0cb6
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2be3b(%rip), %r15     # 0xb0c2a
leaq 0x2bebb(%rip), %rcx     # 0xb0cb1
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7d316
leaq 0x2c364(%rip), %rdx     # 0xb116e
leaq 0x2bdf6(%rip), %r8      # 0xb0c07
leaq 0x2bc92(%rip), %r12     # 0xb0aaa
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rcx
movq %r12, %r9
callq 0x80365
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x24f59(%rip), %rsi     # 0xa9d92
movq %r14, %rdi
movl %ebx, %edx
movq %r12, %rcx
callq 0x7d912
movq %r14, %rdi
movl %ebx, %esi
callq 0x7db1b
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq