// File: /workspace/github_c_makefile_star2_O2/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, %r15
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x21ad5(%rip), %rsi     # 0x99cba
movl %ebx, %ecx
callq 0x72674
movq %r14, %rdi
movl %ebx, %esi
callq 0x72b0a
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x295e3(%rip), %rcx     # 0xa17eb
leaq 0x331d99(%rip), %r9     # 0x3a9fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x73bdf
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x1e1f6(%rip), %rcx     # 0x96424
leaq 0x331da3(%rip), %r9     # 0x3a9fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x73bdf
movl 0x10(%r12), %ecx
movl 0x1c0(%r12), %r8d
decl %r8d
subq $0x8, %rsp
leaq 0x28974(%rip), %rdx     # 0xa0bd1
movq %r14, %rdi
movl %ebx, %esi
movl %r8d, %r9d
pushq (%r15)
callq 0x740e3
popq %rax
popq %rcx
movl 0x10(%r12), %ecx
movl 0x1c0(%r12), %r8d
decl %r8d
movq 0x8(%r15), %r9
leaq 0x2894c(%rip), %rdx     # 0xa0bd6
movq %r14, %rdi
movl %ebx, %esi
callq 0x73f99
movl 0x1c0(%r12), %ecx
decl %ecx
movq 0x10(%r15), %r8
leaq 0x288ba(%rip), %rdx     # 0xa0b63
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %r9d
callq 0x73cac
movq %r14, %rdi
movl %ebx, %esi
callq 0x72fb3
movl 0x1c0(%r12), %r10d
leal -0x1(%r10), %r9d
subq $0x8, %rsp
leaq 0x2850e(%rip), %r11     # 0xa07e8
leaq 0x288fa(%rip), %r8      # 0xa0bdb
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x1
callq 0x72b76
addq $0x18, %rsp
leaq 0x2888b(%rip), %r11     # 0xa0b8e
leaq 0x28622(%rip), %r15     # 0xa092c
leaq 0x288e7(%rip), %r10     # 0xa0bf8
leaq 0x288cc(%rip), %rbp     # 0xa0be4
leaq 0x28847(%rip), %r13     # 0xa0b66
leaq 0x288eb(%rip), %r8      # 0xa0c11
leaq 0x2883e(%rip), %r9      # 0xa0b6b
pushq $0x8
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
pushq $0x1
popq %rdx
movl $0x0, %eax
pushq %r11
pushq %r15
pushq %r10
pushq %rbp
pushq %r13
leaq 0x28893(%rip), %r10     # 0xa0be0
pushq %r10
leaq 0x288c4(%rip), %r10     # 0xa0c1a
pushq %r10
callq 0x72de1
addq $0x38, %rsp
leaq 0x1fab8(%rip), %r10     # 0x97e20
leaq 0x2869f(%rip), %r11     # 0xa0a0e
leaq 0x28970(%rip), %r13     # 0xa0ce6
leaq 0x288a0(%rip), %r15     # 0xa0c1d
leaq 0x28594(%rip), %r9      # 0xa0918
pushq $0x5
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movq %r15, %r8
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r13
callq 0x72de1
addq $0x20, %rsp
movq %r14, %rdi
movl %ebx, %esi
callq 0x726d3
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
pushq $0x1
popq %r13
movl %r13d, %ecx
callq 0x753f5
leaq 0x287ad(%rip), %rcx     # 0xa0b74
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28798(%rip), %rdx     # 0xa0b6b
callq 0x72b25
movl 0x10(%r12), %r8d
decl %r8d
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movl %r13d, %r9d
movl %r13d, %r15d
callq 0x73938
leaq 0x2877d(%rip), %rbp     # 0xa0b79
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28786(%rip), %rdx     # 0xa0b8e
movq %rbp, %rcx
callq 0x72b25
movl 0x1c0(%r12), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x284f0(%rip), %r13     # 0xa0918
movq %r13, %rdx
xorl %ecx, %ecx
movl %r15d, %r9d
callq 0x73938
movq %r14, %rdi
movl %ebx, %esi
leaq 0x287d0(%rip), %rdx     # 0xa0c11
movq %rbp, %rcx
callq 0x72b25
movl 0x1c0(%r12), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28885(%rip), %rbp     # 0xa0ce6
movq %rbp, %rdx
xorl %ecx, %ecx
movl %r15d, %r9d
callq 0x73938
movq %rsp, %r15
movq %r15, %rdi
movl %ebx, %esi
leaq 0x28754(%rip), %rdx     # 0xa0bd1
leaq 0x28799(%rip), %rcx     # 0xa0c1d
movq %r13, %r8
movq %rbp, %r9
callq 0x732b9
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28749(%rip), %rdx     # 0xa0be4
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x28339(%rip), %rdx     # 0xa07e8
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28735(%rip), %rdx     # 0xa0bf8
movq %r15, %rcx
callq 0x72b25
leaq 0x28718(%rip), %rcx     # 0xa0bea
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28733(%rip), %r13     # 0xa0c11
movq %r13, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r15, %rdi
movl %ebx, %esi
leaq 0x286df(%rip), %rdx     # 0xa0bdb
leaq 0x28415(%rip), %rbp     # 0xa0918
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x28645(%rip), %rcx     # 0xa0b79
callq 0x72b25
movl 0x1c0(%r12), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r9
callq 0x73938
movq %r15, %rdi
movl %ebx, %esi
leaq 0x28284(%rip), %rdx     # 0xa07e8
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x283b4(%rip), %rdx     # 0xa092c
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x2864f(%rip), %rdx     # 0xa0bdb
leaq 0x2868a(%rip), %rbp     # 0xa0c1d
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28639(%rip), %rdx     # 0xa0be0
movq %r15, %rcx
callq 0x72b25
leaq 0x28646(%rip), %rcx     # 0xa0bfc
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
leaq 0x28638(%rip), %rcx     # 0xa0c0c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x285ae(%rip), %rdx     # 0xa0b8e
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x28585(%rip), %rcx     # 0xa0b79
callq 0x72b25
movl 0x1c0(%r12), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28307(%rip), %r12     # 0xa0918
movq %r12, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r9
callq 0x73938
movq %r15, %rdi
movl %ebx, %esi
leaq 0x281bd(%rip), %rdx     # 0xa07e8
movq %r12, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x282ed(%rip), %rdx     # 0xa092c
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x28583(%rip), %rdx     # 0xa0bd6
movq %rbp, %rcx
movq %r12, %r8
callq 0x7329c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x284fc(%rip), %rdx     # 0xa0b66
movq %r15, %rcx
callq 0x72b25
leaq 0x28504(%rip), %rcx     # 0xa0b7d
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r14, %rdi
movl %ebx, %esi
leaq 0x284f2(%rip), %r12     # 0xa0b8e
movq %r12, %rdx
leaq 0x28566(%rip), %rcx     # 0xa0c0c
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x284ac(%rip), %rdx     # 0xa0b63
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2854f(%rip), %rdx     # 0xa0c1a
movq %r15, %rcx
callq 0x72b25
leaq 0x2853b(%rip), %rcx     # 0xa0c15
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x72b25
leaq 0x289e4(%rip), %rdx     # 0xa10d2
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
leaq 0x2846e(%rip), %r8      # 0xa0b6b
leaq 0x2830a(%rip), %r15     # 0xa0a0e
movq %r15, %r9
callq 0x752a9
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r14, %rdi
leaq 0x2159a(%rip), %rsi     # 0x99cba
movl %ebx, %edx
movq %r15, %rcx
callq 0x7308c
movq %r14, %rdi
movl %ebx, %esi
callq 0x7320f
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq