// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x214f0(%rip), %rsi     # 0xa2fd5
movl %ebx, %ecx
callq 0x7b551
cmpl $0x2, %ebx
jne 0x81b0a
leaq 0x2b70d(%rip), %rdi     # 0xad205
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2cce0(%rip), %rcx     # 0xae7fb
leaq 0x32d486(%rip), %r9     # 0x3aefa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7cde7
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x218e4(%rip), %rcx     # 0xa3424
leaq 0x32d491(%rip), %r9     # 0x3aefd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7cde7
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
leaq 0x26d3b(%rip), %rdx     # 0xa88a1
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %r9
callq 0x7d0d5
cmpl $0x2, %ebx
jne 0x81c55
leaq 0x2b6e5(%rip), %rdi     # 0xad268
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
subq $0x8, %rsp
leaq 0x232a8(%rip), %r10     # 0xa4e48
leaq 0x2c143(%rip), %r11     # 0xadcea
leaq 0x2be64(%rip), %r12     # 0xada12
leaq 0x2c06c(%rip), %r8      # 0xadc21
leaq 0x2bd60(%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 0x2bf8f(%rip), %r10     # 0xadb6f
leaq 0x2c02e(%rip), %r11     # 0xadc15
leaq 0x2bf7c(%rip), %r8      # 0xadb6a
leaq 0x2bd3b(%rip), %r9      # 0xad930
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
movl 0x1c0(%r15), %r9d
leaq 0x2bbcb(%rip), %r8      # 0xad7ec
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7bab4
leaq 0x2b43a(%rip), %rdi     # 0xad078
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x81cf7
subq $0x8, %rsp
leaq 0x231e8(%rip), %r10     # 0xa4e48
leaq 0x2c083(%rip), %r11     # 0xadcea
leaq 0x2bda4(%rip), %r12     # 0xada12
leaq 0x2bfac(%rip), %r8      # 0xadc21
leaq 0x2bca0(%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 0x2becf(%rip), %r10     # 0xadb6f
leaq 0x2bf6e(%rip), %r11     # 0xadc15
leaq 0x2bebc(%rip), %r8      # 0xadb6a
leaq 0x2bc7b(%rip), %r9      # 0xad930
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
movl 0x1c0(%r15), %r9d
leaq 0x2bb0b(%rip), %r8      # 0xad7ec
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7bab4
incl 0x32d4eb(%rip)          # 0x3af1e8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x7e795
leaq 0x2be59(%rip), %rdx     # 0xadb6f
leaq 0x2be5b(%rip), %rcx     # 0xadb78
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ba46
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2beec(%rip), %r12     # 0xadc21
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x26b50(%rip), %r13     # 0xa88a1
leaq 0x21451(%rip), %r8      # 0xa31a9
movq %rsp, %rbp
movq %rbp, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x7c269
leaq 0x2bea3(%rip), %rdx     # 0xadc15
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rcx
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2bb8b(%rip), %r15     # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2ba8a(%rip), %r8      # 0xad837
movq %rbp, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x7c269
leaq 0x2bda6(%rip), %rdx     # 0xadb6a
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rcx
callq 0x7ba46
leaq 0x2ba14(%rip), %rdx     # 0xad7ec
movq %rbp, %rdi
movl %ebx, %esi
movq %r15, %rcx
callq 0x7c24c
leaq 0x2bb44(%rip), %rdx     # 0xad930
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rcx
callq 0x7ba46
leaq 0x2bd81(%rip), %rcx     # 0xadb81
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2be09(%rip), %r12     # 0xadc15
movq %r12, %rdx
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x2c2b1(%rip), %rdx     # 0xae0d6
leaq 0x2bbe6(%rip), %r15     # 0xada12
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rcx
leaq 0x2bd34(%rip), %r8      # 0xadb6f
movq %r15, %r9
callq 0x7e616
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x21181(%rip), %rsi     # 0xa2fd5
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