// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x7a180, %rsp          # imm = 0x7A180
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x1bc(%rax), %edx
movl -0x2c(%rbp), %ecx
leaq 0x2fa91(%rip), %rsi     # 0xe68da
callq 0xaf1e0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xaf9c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
leaq 0x2c21f(%rip), %rcx     # 0xe309a
leaq 0x32b0f6(%rip), %r9     # 0x3e1f78
callq 0xb14a0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
leaq 0x2c1fc(%rip), %rcx     # 0xe30a4
leaq 0x32b0f9(%rip), %r9     # 0x3e1fa8
callq 0xb14a0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r9d
subl $0x1, %r9d
movq -0x40(%rbp), %rax
movq (%rax), %rax
leaq 0x363ef(%rip), %rdx     # 0xed2dd
movq %rax, (%rsp)
callq 0xb1c80
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r9
leaq 0x363bf(%rip), %rdx     # 0xed2e2
callq 0xb1aa0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %ecx
subl $0x1, %ecx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %r8
leaq 0x36324(%rip), %rdx     # 0xed26f
movl $0x1, %r9d
callq 0xb15d0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xb00e0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r9d
subl $0x1, %r9d
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %eax
movl $0x2, %edx
movl $0x1, %ecx
leaq 0x36354(%rip), %r8      # 0xed2e7
leaq 0x35f5a(%rip), %r10     # 0xecef4
movl $0x1, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0xafab0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl $0x1, %edx
movl $0x8, %ecx
leaq 0x36354(%rip), %r8      # 0xed31d
leaq 0x362a7(%rip), %r9      # 0xed277
leaq 0x3634f(%rip), %r12     # 0xed326
leaq 0x3630e(%rip), %r15     # 0xed2ec
leaq 0x3628d(%rip), %r14     # 0xed272
leaq 0x36304(%rip), %rbx     # 0xed2f0
leaq 0x36311(%rip), %r11     # 0xed304
leaq 0x3603e(%rip), %r10     # 0xed038
leaq 0x36299(%rip), %rax     # 0xed29a
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movb $0x0, %al
callq 0xafe40
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
xorl %edx, %edx
movl $0x5, %ecx
leaq 0x362ea(%rip), %r8      # 0xed329
leaq 0x35fde(%rip), %r9      # 0xed024
leaq 0x363a5(%rip), %r11     # 0xed3f2
leaq 0x360c6(%rip), %r10     # 0xed11a
leaq 0x2d98d(%rip), %rax     # 0xe49e8
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0xafe40
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xaf2c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl $0x1, %ecx
callq 0xb3590
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x361d8(%rip), %rdx     # 0xed277
leaq 0x361da(%rip), %rcx     # 0xed280
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r8d
subl $0x1, %r8d
leaq 0x36264(%rip), %rdx     # 0xed329
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x361ba(%rip), %rdx     # 0xed29a
leaq 0x3619e(%rip), %rcx     # 0xed285
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x2, %r8d
leaq 0x35f1b(%rip), %rdx     # 0xed024
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x361f9(%rip), %rdx     # 0xed31d
leaq 0x3615a(%rip), %rcx     # 0xed285
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x2, %r8d
leaq 0x362a5(%rip), %rdx     # 0xed3f2
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x36172(%rip), %rdx     # 0xed2dd
leaq 0x361b7(%rip), %rcx     # 0xed329
leaq 0x35eab(%rip), %r8      # 0xed024
leaq 0x36272(%rip), %r9      # 0xed3f2
callq 0xb0610
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x36156(%rip), %rdx     # 0xed2f0
callq 0xafa00
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35d44(%rip), %rdx     # 0xecef4
leaq 0x3623b(%rip), %rcx     # 0xed3f2
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x36133(%rip), %rdx     # 0xed304
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x36139(%rip), %rdx     # 0xed31d
leaq 0x3610b(%rip), %rcx     # 0xed2f6
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x361f4(%rip), %rdx     # 0xed3f2
callq 0xb13f0
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x360d3(%rip), %rdx     # 0xed2e7
leaq 0x35e09(%rip), %rcx     # 0xed024
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rdx
leaq 0x360e8(%rip), %rcx     # 0xed31d
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35ddc(%rip), %rdx     # 0xed024
callq 0xb13f0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x360c2(%rip), %rdx     # 0xed31d
leaq 0x36023(%rip), %rcx     # 0xed285
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x2, %r8d
leaq 0x35da0(%rip), %rdx     # 0xed024
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35c52(%rip), %rdx     # 0xecef4
leaq 0x35d7b(%rip), %rcx     # 0xed024
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x35d75(%rip), %rdx     # 0xed038
callq 0xafa00
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x3600e(%rip), %rdx     # 0xed2e7
leaq 0x36049(%rip), %rcx     # 0xed329
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x35ff2(%rip), %rdx     # 0xed2ec
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x36010(%rip), %rdx     # 0xed31d
leaq 0x35ff4(%rip), %rcx     # 0xed308
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35cfd(%rip), %rdx     # 0xed024
callq 0xb13f0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35f60(%rip), %rdx     # 0xed29a
leaq 0x35fd7(%rip), %rcx     # 0xed318
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35fc9(%rip), %rdx     # 0xed31d
leaq 0x35f2a(%rip), %rcx     # 0xed285
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x2, %r8d
leaq 0x35ca7(%rip), %rdx     # 0xed024
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35b59(%rip), %rdx     # 0xecef4
leaq 0x35c82(%rip), %rcx     # 0xed024
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x35c7c(%rip), %rdx     # 0xed038
callq 0xafa00
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35f10(%rip), %rdx     # 0xed2e2
leaq 0x35f50(%rip), %rcx     # 0xed329
leaq 0x35c44(%rip), %r8      # 0xed024
callq 0xb0560
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x35e78(%rip), %rdx     # 0xed272
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35f10(%rip), %rdx     # 0xed31d
leaq 0x35e75(%rip), %rcx     # 0xed289
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35bfd(%rip), %rdx     # 0xed024
callq 0xb13f0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35e60(%rip), %rdx     # 0xed29a
leaq 0x35ed7(%rip), %rcx     # 0xed318
callq 0xafa00
leaq -0x7a160(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35e18(%rip), %rdx     # 0xed26f
leaq 0x35ecb(%rip), %rcx     # 0xed329
callq 0xb04c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x7a160(%rbp), %rcx
leaq 0x35eae(%rip), %rdx     # 0xed326
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35e0f(%rip), %rdx     # 0xed29a
leaq 0x35e8f(%rip), %rcx     # 0xed321
callq 0xafa00
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x36339(%rip), %rdx     # 0xed7de
leaq 0x35dee(%rip), %rcx     # 0xed29a
leaq 0x35dc4(%rip), %r8      # 0xed277
leaq 0x35c60(%rip), %r9      # 0xed11a
callq 0xb33c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq 0x35e5c(%rip), %rdx     # 0xed329
callq 0xb13f0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0x2f3fa(%rip), %rsi     # 0xe68da
leaq 0x35c33(%rip), %rcx     # 0xed11a
callq 0xb01f0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xb03a0
addq $0x7a180, %rsp          # imm = 0x7A180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)