// File: /workspace/github_c_makefile_star2_O1/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 0x24a24(%rip), %rsi     # 0xa6d22
movl %ebx, %ecx
callq 0x7b551
cmpl $0x2, %ebx
jne 0x82323
leaq 0x2aef4(%rip), %rdi     # 0xad205
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2c4c7(%rip), %rcx     # 0xae7fb
leaq 0x32cc6d(%rip), %r9     # 0x3aefa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7cde7
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x210cb(%rip), %rcx     # 0xa3424
leaq 0x32cc78(%rip), %r9     # 0x3aefd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7cde7
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
decl %r8d
subq $0x8, %rsp
leaq 0x2b84f(%rip), %rdx     # 0xadbd5
movq %r14, %rdi
movl %ebx, %esi
movl %r8d, %r9d
pushq (%r12)
callq 0x7d2f6
addq $0x10, %rsp
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
decl %r8d
movq 0x8(%r12), %r9
leaq 0x2b825(%rip), %rdx     # 0xadbda
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d1ab
movl 0x1c0(%r15), %ecx
decl %ecx
movq 0x10(%r12), %r8
leaq 0x2b793(%rip), %rdx     # 0xadb67
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7ceb8
cmpl $0x2, %ebx
jne 0x8250a
leaq 0x2ae74(%rip), %rdi     # 0xad268
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r10d
leal -0x1(%r10), %r9d
subq $0x8, %rsp
leaq 0x2b3d0(%rip), %r11     # 0xad7ec
leaq 0x2b7bc(%rip), %r8      # 0xadbdf
movq %r14, %rdi
movl %ebx, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x1
callq 0x7bab4
addq $0x18, %rsp
leaq 0x2b748(%rip), %r10     # 0xadb92
leaq 0x2b4df(%rip), %r11     # 0xad930
leaq 0x2b7a4(%rip), %r12     # 0xadbfc
leaq 0x2b789(%rip), %r13     # 0xadbe8
leaq 0x2b704(%rip), %rbp     # 0xadb6a
leaq 0x2b7a8(%rip), %r8      # 0xadc15
leaq 0x2b6fb(%rip), %r9      # 0xadb6f
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 0x2b74c(%rip), %r10     # 0xadbe4
pushq %r10
leaq 0x2b77d(%rip), %r10     # 0xadc1e
pushq %r10
callq 0x7bd1c
addq $0x38, %rsp
leaq 0x22995(%rip), %r10     # 0xa4e48
leaq 0x2b558(%rip), %r11     # 0xada12
leaq 0x2b829(%rip), %r12     # 0xadcea
leaq 0x2b759(%rip), %r8      # 0xadc21
leaq 0x2b44d(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7bd1c
addq $0x20, %rsp
leaq 0x2ab85(%rip), %rdi     # 0xad078
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x825f0
movl 0x1c0(%r15), %r10d
leal -0x1(%r10), %r9d
subq $0x8, %rsp
leaq 0x2b2cc(%rip), %r11     # 0xad7ec
leaq 0x2b6b8(%rip), %r8      # 0xadbdf
movq %r14, %rdi
movl %ebx, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq $0x1
callq 0x7bab4
addq $0x18, %rsp
leaq 0x2b644(%rip), %r10     # 0xadb92
leaq 0x2b3db(%rip), %r11     # 0xad930
leaq 0x2b6a0(%rip), %r12     # 0xadbfc
leaq 0x2b685(%rip), %r13     # 0xadbe8
leaq 0x2b600(%rip), %rbp     # 0xadb6a
leaq 0x2b6a4(%rip), %r8      # 0xadc15
leaq 0x2b5f7(%rip), %r9      # 0xadb6f
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 0x2b648(%rip), %r10     # 0xadbe4
pushq %r10
leaq 0x2b679(%rip), %r10     # 0xadc1e
pushq %r10
callq 0x7bd1c
addq $0x38, %rsp
leaq 0x22891(%rip), %r10     # 0xa4e48
leaq 0x2b454(%rip), %r11     # 0xada12
leaq 0x2b725(%rip), %r12     # 0xadcea
leaq 0x2b655(%rip), %r8      # 0xadc21
leaq 0x2b349(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7bd1c
addq $0x20, %rsp
incl 0x32cbf2(%rip)          # 0x3af1e8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x7e795
leaq 0x2b560(%rip), %rdx     # 0xadb6f
leaq 0x2b562(%rip), %rcx     # 0xadb78
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ba46
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2b5f3(%rip), %rdx     # 0xadc21
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2b54b(%rip), %rdx     # 0xadb92
leaq 0x2b52f(%rip), %r12     # 0xadb7d
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2b2af(%rip), %rbp     # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2b58c(%rip), %rdx     # 0xadc15
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2b642(%rip), %r13     # 0xadcea
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2b511(%rip), %rdx     # 0xadbd5
movq %rsp, %r12
movq %r12, %rdi
movl %ebx, %esi
leaq 0x2b54e(%rip), %rcx     # 0xadc21
movq %rbp, %r8
movq %r13, %r9
callq 0x7c286
leaq 0x2b503(%rip), %rdx     # 0xadbe8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b0f3(%rip), %rdx     # 0xad7ec
movq %r12, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7c24c
leaq 0x2b4ef(%rip), %rdx     # 0xadbfc
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b4cd(%rip), %rcx     # 0xadbee
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2b4e8(%rip), %rdx     # 0xadc15
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x2b49c(%rip), %rdx     # 0xadbdf
movq %r12, %rdi
movl %ebx, %esi
movq %rbp, %rcx
callq 0x7c24c
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
leaq 0x2b4b6(%rip), %rcx     # 0xadc15
movq %rcx, %r13
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x2b3fd(%rip), %rcx     # 0xadb7d
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
movq %r12, %rdi
movl %ebx, %esi
leaq 0x2b03b(%rip), %rdx     # 0xad7ec
movq %rbp, %rcx
callq 0x7c24c
leaq 0x2b170(%rip), %rdx     # 0xad930
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
movq %r12, %rdi
movl %ebx, %esi
leaq 0x2b406(%rip), %rdx     # 0xadbdf
leaq 0x2b441(%rip), %rcx     # 0xadc21
callq 0x7c24c
leaq 0x2b3f8(%rip), %rdx     # 0xadbe4
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b400(%rip), %rcx     # 0xadc00
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r13, %rbp
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x2b3ef(%rip), %rcx     # 0xadc10
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2b365(%rip), %r13     # 0xadb92
movq %r13, %rdx
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
leaq 0x2b339(%rip), %rcx     # 0xadb7d
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2b0bc(%rip), %rbp     # 0xad91c
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
movq %r12, %rdi
movl %ebx, %esi
leaq 0x2af70(%rip), %rdx     # 0xad7ec
movq %rbp, %rcx
callq 0x7c24c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2b0a0(%rip), %rdx     # 0xad930
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b33b(%rip), %rdx     # 0xadbda
movq %r12, %rdi
movl %ebx, %esi
leaq 0x2b376(%rip), %r15     # 0xadc21
movq %r15, %rcx
movq %rbp, %r8
callq 0x7c269
leaq 0x2b2ad(%rip), %rdx     # 0xadb6a
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b2b0(%rip), %rcx     # 0xadb81
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2b338(%rip), %rdx     # 0xadc15
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x2b315(%rip), %rcx     # 0xadc10
callq 0x7ba46
leaq 0x2b260(%rip), %rdx     # 0xadb67
movq %r12, %rdi
movl %ebx, %esi
movq %r15, %rcx
callq 0x7c24c
leaq 0x2b303(%rip), %rdx     # 0xadc1e
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
callq 0x7ba46
leaq 0x2b2ea(%rip), %rcx     # 0xadc19
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7ba46
leaq 0x2b793(%rip), %rdx     # 0xae0d6
leaq 0x2b0c8(%rip), %r15     # 0xada12
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
leaq 0x2b216(%rip), %r8      # 0xadb6f
movq %r15, %r9
callq 0x7e616
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x243b0(%rip), %rsi     # 0xa6d22
movq %r14, %rdi
movl %ebx, %edx
movq %r15, %rcx
callq 0x7bffb
movq %r14, %rdi
movl %ebx, %esi
callq 0x7c1ca
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq