// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x7a160, %rsp          # imm = 0x7A160
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1bc(%rax), %edx
movl -0xc(%rbp), %ecx
leaq 0x2c59b(%rip), %rsi     # 0xe2c6d
callq 0xaf1e0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaf9c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
leaq 0x2c996(%rip), %rcx     # 0xe309a
leaq 0x32b86d(%rip), %r9     # 0x3e1f78
callq 0xb14a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x1, %r8d
leaq 0x2c973(%rip), %rcx     # 0xe30a4
leaq 0x32b870(%rip), %r9     # 0x3e1fa8
callq 0xb14a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r8d
movq -0x20(%rbp), %r9
leaq 0x31a5d(%rip), %rdx     # 0xe81be
callq 0xb18c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb00e0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
movl $0x5, %ecx
leaq 0x36ba2(%rip), %r8      # 0xed329
leaq 0x36896(%rip), %r9      # 0xed024
leaq 0x36985(%rip), %r11     # 0xed11a
leaq 0x36c56(%rip), %r10     # 0xed3f2
leaq 0x2e245(%rip), %rax     # 0xe49e8
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0xafe40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x1, %edx
movl $0x4, %ecx
leaq 0x36aa2(%rip), %r8      # 0xed272
leaq 0x36861(%rip), %r9      # 0xed038
leaq 0x36b3f(%rip), %r10     # 0xed31d
leaq 0x36a92(%rip), %rax     # 0xed277
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0xafe40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r9d
movl $0x1, %ecx
leaq 0x366e1(%rip), %r8      # 0xecef4
movl %ecx, %edx
movb $0x0, %al
callq 0xafab0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaf2c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl $0x1, %ecx
callq 0xb3590
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x36a2c(%rip), %rdx     # 0xed277
leaq 0x36a2e(%rip), %rcx     # 0xed280
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %r8d
subl $0x1, %r8d
leaq 0x36ab8(%rip), %rdx     # 0xed329
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x3192f(%rip), %rdx     # 0xe81be
leaq 0x36a93(%rip), %rcx     # 0xed329
leaq 0x369ea(%rip), %r8      # 0xed287
callq 0xb0560
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x36a66(%rip), %rdx     # 0xed31d
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r8d
subl $0x2, %r8d
leaq 0x3674b(%rip), %rdx     # 0xed024
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x318c7(%rip), %rdx     # 0xe81be
leaq 0x36a2b(%rip), %rcx     # 0xed329
leaq 0x3663a(%rip), %r8      # 0xecf3f
callq 0xb0560
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x36953(%rip), %rdx     # 0xed272
callq 0xafa00
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x365bf(%rip), %rdx     # 0xecef4
leaq 0x366e8(%rip), %rcx     # 0xed024
callq 0xb04c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x366e2(%rip), %rdx     # 0xed038
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x369b4(%rip), %rdx     # 0xed31d
leaq 0x36919(%rip), %rcx     # 0xed289
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x366a1(%rip), %rdx     # 0xed024
callq 0xb13f0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x36e48(%rip), %rdx     # 0xed7de
leaq 0x36980(%rip), %rcx     # 0xed31d
leaq 0x368d3(%rip), %r8      # 0xed277
leaq 0x3676f(%rip), %r9      # 0xed11a
callq 0xb33c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x3696b(%rip), %rdx     # 0xed329
callq 0xb13f0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x2c29c(%rip), %rsi     # 0xe2c6d
leaq 0x36742(%rip), %rcx     # 0xed11a
callq 0xb01f0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb03a0
addq $0x7a160, %rsp          # imm = 0x7A160
popq %rbp
retq
nopw %cs:(%rax,%rax)