// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/savecode.c
// Function: generate_test_code_rbf
void generate_test_code_rbf(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Rbfnetworkptr m)
{
 /*!Last Changed 21.08.2007*/
 char st[MAXLENGTH];
 code_function_header(testcodefile, "rbf", 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, "m", m->weights.m.row, m->weights.m.col, m->weights.m.values);
 code_2d_array_constant(testcodefile, language, "w", m->weights.w.row, m->weights.w.col, m->weights.w.values);
 code_1d_array_constant(testcodefile, language, "s", m->weights.s.col, m->weights.s.values[0], REAL_TYPE);
 code_variable_start(testcodefile, language);
 code_add_array_variable(testcodefile, language, 3, REAL_VARIABLE, "p", m->hidden + 1, REAL_VARIABLE, "y", m->output, REAL_VARIABLE, "testdataconverted", d->multifeaturecount);
 code_add_variable(testcodefile, language, REAL_VARIABLE, 8, "p_h", "s_h", "dist", "sum", "w_ih", "m_hj", "x_j", "maxvalue");
 code_add_variable(testcodefile, language, INTEGER_VARIABLE, 6, "i", "j", "h", "maxindex", "k", "a");
 code_start(testcodefile, language);
 code_realize(testcodefile, language, d, YES);
 code_array_index_variable(st, language, "p", "0");
 code_set_variable(testcodefile, language, st, "1.0");
 code_for(testcodefile, language, "h", 1, m->hidden, 1);
 code_set_variable(testcodefile, language, "dist", "0.0");
 code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);
 code_2d_array_index_variable(st, language, "m", "h", "j");
 code_set_variable(testcodefile, language, "m_hj", st);
 code_array_index_variable(st, language, "testdataconverted", "j");  
 code_set_variable(testcodefile, language, "x_j", st); 
 code_set_variable(testcodefile, language, "dist", "dist + m_hj * x_j");    
 code_endfor(testcodefile, language, "j");
 code_array_index_variable(st, language, "s", "h");  
 code_set_variable(testcodefile, language, "s_h", st);
 code_array_index_variable(st, language, "p", "h");  
 code_set_variable(testcodefile, language, st, "exp(-dist / (s_h * s_h))");
 code_endfor(testcodefile, language, "h");
 code_for(testcodefile, language, "i", 0, d->classno - 1, 1);
 code_set_variable(testcodefile, language, "sum", "0.0");
 code_for(testcodefile, language, "h", 0, m->hidden, 1);
 code_2d_array_index_variable(st, language, "w", "i", "h");
 code_set_variable(testcodefile, language, "w_ih", st);
 code_array_index_variable(st, language, "p", "h");  
 code_set_variable(testcodefile, language, "p_h", st);
 code_set_variable(testcodefile, language, "sum", "sum + w_ih * p_h");    
 code_endfor(testcodefile, language, "h");
 code_array_index_variable(st, language, "y", "i");
 code_set_variable(testcodefile, language, st, "sum");
 code_endfor(testcodefile, language, "i");
 code_find_bound_of_list(testcodefile, language, "y", d->classno, "-10000.0", "maxvalue", "maxindex", ">");
 code_function_return_string(testcodefile, "rbf", 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 0x24eb1(%rip), %rsi     # 0xa9d3c
movl %ebx, %ecx
callq 0x7ce21
cmpl $0x2, %ebx
jne 0x84eb0
leaq 0x2b3ff(%rip), %rdi     # 0xb029d
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2c9ca(%rip), %rcx     # 0xb188b
leaq 0x32d0e0(%rip), %r9     # 0x3b1fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2153e(%rip), %rcx     # 0xa6424
leaq 0x32d0eb(%rip), %r9     # 0x3b1fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x7e724
movl 0x10(%r12), %ecx
movl 0x14(%r12), %r8d
movq 0x18(%r12), %r9
leaq 0x2b248(%rip), %rdx     # 0xb0158
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ea43
movl 0x30(%r12), %ecx
movl 0x34(%r12), %r8d
movq 0x38(%r12), %r9
leaq 0x26a3d(%rip), %rdx     # 0xab96d
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ea43
movl 0x24(%r12), %ecx
movq 0x28(%r12), %rax
movq (%rax), %r8
leaq 0x23003(%rip), %rdx     # 0xa7f51
movl $0x1, %r13d
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7e7f5
cmpl $0x2, %ebx
jne 0x850dc
leaq 0x2b38c(%rip), %rdi     # 0xb0300
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl (%r12), %r9d
movl 0x4(%r12), %r10d
incl %r9d
movl 0x1c0(%r15), %r11d
leaq 0x2b8e4(%rip), %rbp     # 0xb0884
leaq 0x2be23(%rip), %r8      # 0xb0dca
movq %r14, %rdi
movl $0x2, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r11
pushq %rbp
pushq %r13
pushq %r10
leaq 0x20a00(%rip), %r10     # 0xa59c9
pushq %r10
pushq %r13
callq 0x7d384
addq $0x30, %rsp
leaq 0x2bc2a(%rip), %r10     # 0xb0c07
leaq 0x2b9e4(%rip), %r11     # 0xb09c8
leaq 0x2bcde(%rip), %r13     # 0xb0cc9
leaq 0x2bcd2(%rip), %rbp     # 0xb0cc4
leaq 0x2bd1f(%rip), %r8      # 0xb0d18
leaq 0x2bcbb(%rip), %r9      # 0xb0cbb
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r13
pushq %rbp
leaq 0x2bc88(%rip), %r10     # 0xb0cad
pushq %r10
leaq 0x2bc91(%rip), %r10     # 0xb0cbf
pushq %r10
callq 0x7d617
addq $0x30, %rsp
leaq 0x22e60(%rip), %r10     # 0xa7ea0
leaq 0x2bd3b(%rip), %r11     # 0xb0d82
leaq 0x2ba5c(%rip), %r13     # 0xb0aaa
leaq 0x2bcc5(%rip), %rbp     # 0xb0d1a
leaq 0x2bc5d(%rip), %r8      # 0xb0cb9
leaq 0x2b951(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x6, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r13
pushq %rbp
callq 0x7d617
addq $0x20, %rsp
leaq 0x2b085(%rip), %rdi     # 0xb0110
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
incl 0x32d145(%rip)          # 0x3b21e8
movq %r14, %rdi
movl $0x2, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8050d
leaq 0x2b2cc(%rip), %rsi     # 0xb038b
leaq 0x2bd04(%rip), %rdx     # 0xb0dca
leaq 0x210dc(%rip), %rcx     # 0xa61a9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
jmp 0x8520a
movl (%r12), %r9d
movl 0x4(%r12), %r10d
incl %r9d
movl 0x1c0(%r15), %r11d
leaq 0x2b78e(%rip), %rbp     # 0xb0884
leaq 0x2bccd(%rip), %r8      # 0xb0dca
movq %r14, %rdi
movl %ebx, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r11
pushq %rbp
pushq %r13
pushq %r10
leaq 0x208ad(%rip), %r10     # 0xa59c9
pushq %r10
pushq %r13
callq 0x7d384
addq $0x30, %rsp
leaq 0x2bad7(%rip), %r10     # 0xb0c07
leaq 0x2b891(%rip), %r11     # 0xb09c8
leaq 0x2bb8b(%rip), %r13     # 0xb0cc9
leaq 0x2bb7f(%rip), %rbp     # 0xb0cc4
leaq 0x2bbcc(%rip), %r8      # 0xb0d18
leaq 0x2bb68(%rip), %r9      # 0xb0cbb
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r13
pushq %rbp
leaq 0x2bb38(%rip), %r10     # 0xb0cad
pushq %r10
leaq 0x2bb41(%rip), %r10     # 0xb0cbf
pushq %r10
callq 0x7d617
addq $0x30, %rsp
leaq 0x22d10(%rip), %r10     # 0xa7ea0
leaq 0x2bbeb(%rip), %r11     # 0xb0d82
leaq 0x2b90c(%rip), %r13     # 0xb0aaa
leaq 0x2bb75(%rip), %rbp     # 0xb0d1a
leaq 0x2bb0d(%rip), %r8      # 0xb0cb9
leaq 0x2b801(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x6, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r13
pushq %rbp
callq 0x7d617
addq $0x20, %rsp
incl 0x32d011(%rip)          # 0x3b21e8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8050d
cmpl $0x5, %ebx
ja 0x8520a
movl $0x3b, %eax
btl %ebx, %eax
jae 0x8520a
movl %ebx, %eax
leaq 0x4eabf(%rip), %rcx     # 0xd3cc0
movq (%rcx,%rax,8), %rsi
jmp 0x850bf
leaq 0x2331d(%rip), %rcx     # 0xa852e
movq %rsp, %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl (%r12), %r8d
leaq 0x2baf1(%rip), %rdx     # 0xb0d1a
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x7e3dc
leaq 0x2ba7a(%rip), %rdx     # 0xb0cbf
leaq 0x2b9c9(%rip), %rcx     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2b74c(%rip), %rdx     # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
leaq 0x4ea6f(%rip), %rbp     # 0xd3cf0
cmpl $0x5, %ebx
ja 0x852ac
movl %ebx, %eax
movq (%rbp,%rax,8), %rsi
leaq 0x2aec4(%rip), %rdx     # 0xb0158
leaq 0x2ba7f(%rip), %rcx     # 0xb0d1a
leaq 0x2b712(%rip), %r8      # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2ba16(%rip), %rdx     # 0xb0cc9
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x4eab9(%rip), %r13     # 0xd3d80
cmpl $0x5, %ebx
ja 0x852eb
movl %ebx, %eax
movq (%r13,%rax,8), %rsi
leaq 0x2b5aa(%rip), %rdx     # 0xb0884
leaq 0x2b6d3(%rip), %rcx     # 0xb09b4
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b6d6(%rip), %rdx     # 0xb09c8
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2b9b9(%rip), %rdx     # 0xb0cbf
leaq 0x2b9c1(%rip), %rcx     # 0xb0cce
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
cmpl $0x5, %ebx
ja 0x85345
movl %ebx, %eax
movq (%r13,%rax,8), %rsi
leaq 0x22c1d(%rip), %rdx     # 0xa7f51
leaq 0x2b9df(%rip), %rcx     # 0xb0d1a
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b96f(%rip), %rdx     # 0xb0cbb
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x8537d
movl %ebx, %eax
movq (%r13,%rax,8), %rsi
leaq 0x2ba5e(%rip), %rdx     # 0xb0dca
leaq 0x2b9a7(%rip), %rcx     # 0xb0d1a
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b95c(%rip), %rcx     # 0xb0ce0
movq %rsp, %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2b910(%rip), %rdx     # 0xb0cb9
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
leaq 0x2b8eb(%rip), %rdx     # 0xb0cad
leaq 0x2b84c(%rip), %rcx     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl (%r12), %r8d
leaq 0x2b93c(%rip), %rdx     # 0xb0d1a
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
cmpl $0x5, %ebx
ja 0x8541b
movl %ebx, %eax
movq (%rbp,%rax,8), %rsi
leaq 0x2656a(%rip), %rdx     # 0xab96d
leaq 0x2b8af(%rip), %rcx     # 0xb0cb9
leaq 0x2b909(%rip), %r8      # 0xb0d1a
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b8a2(%rip), %rdx     # 0xb0cc4
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
cmpl $0x5, %ebx
ja 0x85453
movl %ebx, %eax
movq (%r13,%rax,8), %rsi
leaq 0x2b988(%rip), %rdx     # 0xb0dca
leaq 0x2b8d1(%rip), %rcx     # 0xb0d1a
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b8be(%rip), %rdx     # 0xb0d18
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
leaq 0x2b83f(%rip), %rdx     # 0xb0cad
leaq 0x2b884(%rip), %rcx     # 0xb0cf9
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
cmpl $0x5, %ebx
ja 0x854ad
movl %ebx, %eax
movq (%r13,%rax,8), %rsi
leaq 0x2052d(%rip), %rdx     # 0xa59c9
leaq 0x2b816(%rip), %rcx     # 0xb0cb9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x2b7f9(%rip), %rcx     # 0xb0cad
movq %rsp, %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
movl 0x10(%r15), %ecx
leaq 0x2bc98(%rip), %rax     # 0xb116e
leaq 0x2b5cd(%rip), %r15     # 0xb0aaa
leaq 0x204e5(%rip), %rdx     # 0xa59c9
leaq 0x2b725(%rip), %r8      # 0xb0c10
leaq 0x2b715(%rip), %r9      # 0xb0c07
movq %r14, %rdi
movl %ebx, %esi
pushq %rax
pushq %r15
callq 0x803e7
addq $0x10, %rsp
leaq 0x24832(%rip), %rsi     # 0xa9d3c
movq %r14, %rdi
movl %ebx, %edx
movq %r15, %rcx
callq 0x7d912
movq %r14, %rdi
movl %ebx, %esi
callq 0x7db1b
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq