// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/savecode.c
// Function: generate_test_code_logistic
void generate_test_code_logistic(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, double** m)
{
 /*!Last Changed 16.06.2006*/
 char st[MAXLENGTH];
 code_function_header(testcodefile, "logistic", 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_2d_array_constant(testcodefile, language, "w", d->classno, d->multifeaturecount, m); 
 code_variable_start(testcodefile, language);
 code_add_variable(testcodefile, language, INTEGER_VARIABLE, 5, "i", "j", "maxindex", "k", "a");
 code_add_variable(testcodefile, language, REAL_VARIABLE, 4, "w_ij", "x_j", "sum", "maxvalue");
 code_add_array_variable(testcodefile, language, 1, REAL_VARIABLE, "testdataconverted", d->multifeaturecount);
 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_2d_array_index_variable(st, language, "w", "i", "0");  
 code_set_variable(testcodefile, language, "sum", st); 
 code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);     
 code_2d_array_index_variable(st, language, "w", "i", "j + 1");
 code_set_variable(testcodefile, language, "w_ij", st);
 code_array_index_variable(st, language, "testdataconverted", "j");  
 code_set_variable(testcodefile, language, "x_j", st); 
 code_set_variable(testcodefile, language, "sum", "sum + w_ij * x_j"); 
 code_endfor(testcodefile, language, "j");
 code_compare_and_set_bound(testcodefile, language, ">", "sum", "maxvalue", "maxindex"); 
 code_endfor(testcodefile, language, "i");
 code_function_return_string(testcodefile, "logistic", 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, %r13
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x1e400(%rip), %rsi     # 0x95fdd
movl %ebx, %ecx
callq 0x72674
movq %r14, %rdi
movl %ebx, %esi
callq 0x72b0a
movl 0x1c0(%r13), %r8d
decl %r8d
leaq 0x29bec(%rip), %rcx     # 0xa17eb
leaq 0x3323a2(%rip), %r9     # 0x3a9fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x73bdf
movl 0x1c0(%r13), %r8d
decl %r8d
leaq 0x1e800(%rip), %rcx     # 0x96424
leaq 0x3323ad(%rip), %r9     # 0x3a9fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x73bdf
movl 0x10(%r13), %ecx
movl 0x1c0(%r13), %r8d
leaq 0x23c47(%rip), %rdx     # 0x9b891
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %r9
callq 0x73ec6
movq %r14, %rdi
movl %ebx, %esi
callq 0x72fb3
subq $0x8, %rsp
leaq 0x201b4(%rip), %r10     # 0x97e20
leaq 0x29073(%rip), %r11     # 0xa0ce6
leaq 0x28d94(%rip), %r15     # 0xa0a0e
leaq 0x28f9c(%rip), %r12     # 0xa0c1d
leaq 0x28c90(%rip), %r9      # 0xa0918
pushq $0x5
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movq %r12, %r8
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
callq 0x72de1
addq $0x20, %rsp
leaq 0x28ebe(%rip), %r15     # 0xa0b6b
leaq 0x28f5d(%rip), %r11     # 0xa0c11
leaq 0x28eab(%rip), %r8      # 0xa0b66
leaq 0x28c6a(%rip), %r9      # 0xa092c
pushq $0x1
popq %rbp
pushq $0x4
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
pushq %r15
pushq %r11
callq 0x72de1
popq %rax
popq %rcx
movl 0x1c0(%r13), %r9d
leaq 0x28afe(%rip), %r8      # 0xa07e8
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x72b76
movq %r14, %rdi
movl %ebx, %esi
callq 0x726d3
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x753f5
leaq 0x28e5a(%rip), %rcx     # 0xa0b74
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x72b25
movl 0x10(%r13), %r8d
decl %r8d
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x73938
leaq 0x1e46a(%rip), %r8      # 0x961b1
movq %rsp, %r15
movq %r15, %rdi
movl %ebx, %esi
leaq 0x23b3b(%rip), %rdx     # 0x9b891
movq %r12, %rcx
callq 0x7329c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28ea7(%rip), %rdx     # 0xa0c11
movq %r15, %rcx
callq 0x72b25
movl 0x1c0(%r13), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28b8f(%rip), %r13     # 0xa0918
movq %r13, %rdx
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x73938
leaq 0x28a96(%rip), %r8      # 0xa0833
movq %r15, %rdi
movl %ebx, %esi
leaq 0x23ae8(%rip), %rdx     # 0x9b891
movq %r12, %rcx
callq 0x7329c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28da9(%rip), %rdx     # 0xa0b66
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x28a17(%rip), %rdx     # 0xa07e8
movq %r13, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28b47(%rip), %rdx     # 0xa092c
movq %r15, %rcx
callq 0x72b25
leaq 0x28d89(%rip), %rcx     # 0xa0b7d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28e11(%rip), %r15     # 0xa0c11
movq %r15, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
leaq 0x292b9(%rip), %rdx     # 0xa10d2
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rcx
leaq 0x28d43(%rip), %r8      # 0xa0b6b
leaq 0x28bdf(%rip), %r15     # 0xa0a0e
movq %r15, %r9
callq 0x752a9
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r14, %rdi
leaq 0x1e192(%rip), %rsi     # 0x95fdd
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