// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a120, %rsp          # imm = 0x7A120
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x22153(%rip), %rsi     # 0xa5fd5
movl %ebx, %ecx
callq 0x7ce21
cmpl $0x2, %ebx
jne 0x83ea7
leaq 0x2c408(%rip), %rdi     # 0xb029d
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2d9d3(%rip), %rcx     # 0xb188b
leaq 0x32e0e9(%rip), %r9     # 0x3b1fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x22547(%rip), %rcx     # 0xa6424
leaq 0x32e0f4(%rip), %r9     # 0x3b1fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x10(%r15), %ecx
movl 0x1c0(%r15), %r8d
leaq 0x27a6a(%rip), %rdx     # 0xab96d
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %r9
callq 0x7ea43
cmpl $0x2, %ebx
jne 0x83ffb
leaq 0x2c3e0(%rip), %rdi     # 0xb0300
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
subq $0x8, %rsp
leaq 0x23f63(%rip), %r10     # 0xa7ea0
leaq 0x2ce3e(%rip), %r11     # 0xb0d82
leaq 0x2cb5f(%rip), %r12     # 0xb0aaa
leaq 0x2cd67(%rip), %r8      # 0xb0cb9
leaq 0x2ca5b(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7d617
addq $0x20, %rsp
leaq 0x2cc87(%rip), %r10     # 0xb0c07
leaq 0x2cd26(%rip), %r11     # 0xb0cad
leaq 0x2cc74(%rip), %r8      # 0xb0c02
leaq 0x2ca33(%rip), %r9      # 0xb09c8
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
movl 0x1c0(%r15), %r9d
leaq 0x2c8c0(%rip), %r8      # 0xb0884
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7d384
leaq 0x2c12c(%rip), %rdi     # 0xb0110
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x8409d
subq $0x8, %rsp
leaq 0x23e9a(%rip), %r10     # 0xa7ea0
leaq 0x2cd75(%rip), %r11     # 0xb0d82
leaq 0x2ca96(%rip), %r12     # 0xb0aaa
leaq 0x2cc9e(%rip), %r8      # 0xb0cb9
leaq 0x2c992(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x5, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r12
callq 0x7d617
addq $0x20, %rsp
leaq 0x2cbc1(%rip), %r10     # 0xb0c07
leaq 0x2cc60(%rip), %r11     # 0xb0cad
leaq 0x2cbae(%rip), %r8      # 0xb0c02
leaq 0x2c96d(%rip), %r9      # 0xb09c8
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
movl 0x1c0(%r15), %r9d
leaq 0x2c7fd(%rip), %r8      # 0xb0884
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7d384
incl 0x32e145(%rip)          # 0x3b21e8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8050d
leaq 0x2cb4b(%rip), %rdx     # 0xb0c07
leaq 0x2cb4d(%rip), %rcx     # 0xb0c10
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2cbde(%rip), %rdx     # 0xb0cb9
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
movl %ebx, %r12d
leaq 0x4fbf9(%rip), %r13     # 0xd3cf0
cmpl $0x5, %ebx
ja 0x84120
movq (%r13,%r12,8), %rsi
leaq 0x27865(%rip), %rdx     # 0xab96d
leaq 0x2cbaa(%rip), %rcx     # 0xb0cb9
leaq 0x22093(%rip), %r8      # 0xa61a9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2cb86(%rip), %rdx     # 0xb0cad
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2c86e(%rip), %rdx     # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
cmpl $0x5, %ebx
ja 0x84181
movq (%r13,%r12,8), %rsi
leaq 0x27804(%rip), %rdx     # 0xab96d
leaq 0x2cb49(%rip), %rcx     # 0xb0cb9
leaq 0x2c758(%rip), %r8      # 0xb08cf
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2ca7a(%rip), %rdx     # 0xb0c02
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x841bd
leaq 0x4fbdf(%rip), %rax     # 0xd3d80
movq (%rax,%r12,8), %rsi
leaq 0x2c6d8(%rip), %rdx     # 0xb0884
leaq 0x2c801(%rip), %rcx     # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2c804(%rip), %rdx     # 0xb09c8
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2cad5(%rip), %r15     # 0xb0cad
leaq 0x2ca3a(%rip), %rcx     # 0xb0c19
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x2cf71(%rip), %rdx     # 0xb116e
leaq 0x2ca03(%rip), %r8      # 0xb0c07
leaq 0x2c89f(%rip), %r12     # 0xb0aaa
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rcx
movq %r12, %r9
callq 0x80365
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x21da9(%rip), %rsi     # 0xa5fd5
movq %r14, %rdi
movl %ebx, %edx
movq %r12, %rcx
callq 0x7d912
movq %r14, %rdi
movl %ebx, %esi
callq 0x7db1b
addq $0x7a120, %rsp          # imm = 0x7A120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq