// File: /workspace/github_c_makefile_star2_O2/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 $0x7a138, %rsp          # imm = 0x7A138
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x214f5(%rip), %rsi     # 0x99c64
movl %ebx, %ecx
callq 0x72674
movq %r14, %rdi
movl %ebx, %esi
callq 0x72b0a
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x2905a(%rip), %rcx     # 0xa17eb
leaq 0x331810(%rip), %r9     # 0x3a9fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x73bdf
movl 0x1c0(%r15), %r8d
decl %r8d
leaq 0x1dc6e(%rip), %rcx     # 0x96424
leaq 0x33181b(%rip), %r9     # 0x3a9fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movq %r15, 0x8(%rsp)
callq 0x73bdf
movl 0x10(%r13), %ecx
movl 0x14(%r13), %r8d
movq 0x18(%r13), %r9
leaq 0x278da(%rip), %rdx     # 0xa00bc
movq %r14, %rdi
movl %ebx, %esi
callq 0x73ec6
movl 0x30(%r13), %ecx
movl 0x34(%r13), %r8d
movq 0x38(%r13), %r9
leaq 0x23092(%rip), %rdx     # 0x9b891
movq %r14, %rdi
movl %ebx, %esi
callq 0x73ec6
movl 0x24(%r13), %ecx
movq 0x28(%r13), %rax
movq (%rax), %r8
leaq 0x1f6b6(%rip), %rdx     # 0x97ed1
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %r9d
callq 0x73cac
movq %r14, %rdi
movl %ebx, %esi
callq 0x72fb3
movl (%r13), %r9d
movl 0x4(%r13), %r10d
incl %r9d
movl 0x1c0(%r15), %r11d
leaq 0x27f9a(%rip), %r12     # 0xa07e8
leaq 0x1d174(%rip), %r15     # 0x959c9
leaq 0x284d2(%rip), %r8      # 0xa0d2e
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r12
pushq %rbp
pushq %r10
pushq %r15
pushq %rbp
callq 0x72b76
addq $0x30, %rsp
leaq 0x282e9(%rip), %r10     # 0xa0b6b
leaq 0x280a3(%rip), %r11     # 0xa092c
leaq 0x2839d(%rip), %r12     # 0xa0c2d
leaq 0x28391(%rip), %r15     # 0xa0c28
leaq 0x283de(%rip), %r8      # 0xa0c7c
leaq 0x2837a(%rip), %r9      # 0xa0c1f
pushq $0x8
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r12
pushq %r15
leaq 0x2834e(%rip), %r10     # 0xa0c11
pushq %r10
leaq 0x28357(%rip), %r10     # 0xa0c23
pushq %r10
callq 0x72de1
addq $0x30, %rsp
leaq 0x1f542(%rip), %r10     # 0x97e20
leaq 0x28401(%rip), %r11     # 0xa0ce6
leaq 0x28122(%rip), %r15     # 0xa0a0e
leaq 0x2838b(%rip), %rbp     # 0xa0c7e
leaq 0x28323(%rip), %r8      # 0xa0c1d
leaq 0x28017(%rip), %r9      # 0xa0918
pushq $0x6
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
movl $0x0, %edx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
pushq %rbp
callq 0x72de1
addq $0x20, %rsp
movq %r14, %rdi
movl %ebx, %esi
callq 0x726d3
movq %r14, %rdi
movl %ebx, %esi
movq 0x8(%rsp), %r12
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x753f5
leaq 0x1d86b(%rip), %rcx     # 0x961b1
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebx, %esi
leaq 0x283d7(%rip), %rdx     # 0xa0d2e
callq 0x7327f
leaq 0x1fb4b(%rip), %rcx     # 0x984ae
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x72b25
movl (%r13), %r8d
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
callq 0x73938
leaq 0x281e9(%rip), %rcx     # 0xa0b79
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28287(%rip), %rdx     # 0xa0c23
callq 0x72b25
movl 0x1c0(%r12), %r8d
addl $-0x2, %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x27f5f(%rip), %r12     # 0xa0918
movq %r12, %rdx
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x73938
movq %r15, %rdi
movl %ebx, %esi
leaq 0x276ea(%rip), %rdx     # 0xa00bc
leaq 0x282a5(%rip), %rbp     # 0xa0c7e
movq %rbp, %rcx
movq %r12, %r8
callq 0x7329c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2823d(%rip), %rdx     # 0xa0c2d
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x27de4(%rip), %rdx     # 0xa07e8
movq %r12, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x27f14(%rip), %rdx     # 0xa092c
movq %r15, %rcx
callq 0x72b25
leaq 0x2820b(%rip), %rcx     # 0xa0c32
movq %r14, %rdi
movl %ebx, %esi
leaq 0x281f0(%rip), %rdx     # 0xa0c23
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r15, %rdi
movl %ebx, %esi
leaq 0x1f483(%rip), %rdx     # 0x97ed1
movq %rbp, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x281bd(%rip), %rdx     # 0xa0c1f
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x282b8(%rip), %rdx     # 0xa0d2e
movq %rbp, %rcx
callq 0x7327f
leaq 0x281bf(%rip), %rcx     # 0xa0c44
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq 0x8(%rsp), %rax
movl 0x10(%rax), %r8d
decl %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28169(%rip), %r12     # 0xa0c1d
movq %r12, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r9
callq 0x73938
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28143(%rip), %rbp     # 0xa0c11
movq %rbp, %rdx
leaq 0x280a1(%rip), %rcx     # 0xa0b79
callq 0x72b25
movl (%r13), %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28191(%rip), %r13     # 0xa0c7e
movq %r13, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r9
callq 0x73938
movq %r15, %rdi
movl %ebx, %esi
leaq 0x22d8a(%rip), %rdx     # 0x9b891
movq %r12, %rcx
movq %r13, %r8
callq 0x7329c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2810a(%rip), %rdx     # 0xa0c28
movq %r15, %rcx
callq 0x72b25
movq %r15, %rdi
movl %ebx, %esi
leaq 0x281fc(%rip), %rdx     # 0xa0d2e
movq %r13, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
leaq 0x28136(%rip), %rdx     # 0xa0c7c
movq %r15, %rcx
callq 0x72b25
leaq 0x28108(%rip), %rcx     # 0xa0c5d
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq %r15, %rdi
movl %ebx, %esi
leaq 0x1ce51(%rip), %r13     # 0x959c9
movq %r13, %rdx
movq %r12, %rcx
callq 0x7327f
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
leaq 0x28526(%rip), %rax     # 0xa10d2
leaq 0x27fc1(%rip), %r8      # 0xa0b74
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x27fa9(%rip), %r9      # 0xa0b6b
pushq %rax
leaq 0x27e44(%rip), %r15     # 0xa0a0e
pushq %r15
callq 0x752fa
popq %rax
popq %rcx
movq %r14, %rdi
leaq 0x21087(%rip), %rsi     # 0x99c64
movl %ebx, %edx
movq %r15, %rcx
callq 0x7308c
movq %r14, %rdi
movl %ebx, %esi
callq 0x7320f
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq