// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
leaq 0x24308(%rip), %rsi     # 0xa6ccc
movl %ebx, %ecx
callq 0x7b551
cmpl $0x2, %ebx
jne 0x829e9
leaq 0x2a82e(%rip), %rdi     # 0xad205
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r13), %r8d
decl %r8d
leaq 0x2be01(%rip), %rcx     # 0xae7fb
leaq 0x32c5a7(%rip), %r9     # 0x3aefa8
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7cde7
movl 0x1c0(%r13), %r8d
decl %r8d
leaq 0x20a05(%rip), %rcx     # 0xa3424
leaq 0x32c5b2(%rip), %r9     # 0x3aefd8
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7cde7
movl 0x10(%r12), %ecx
movl 0x14(%r12), %r8d
movq 0x18(%r12), %r9
leaq 0x2a677(%rip), %rdx     # 0xad0c0
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d0d5
movl 0x30(%r12), %ecx
movl 0x34(%r12), %r8d
movq 0x38(%r12), %r9
leaq 0x25e38(%rip), %rdx     # 0xa88a1
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d0d5
movl 0x24(%r12), %ecx
movq 0x28(%r12), %rax
movq (%rax), %r8
leaq 0x22472(%rip), %rdx     # 0xa4ef9
movl $0x1, %r15d
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7ceb8
cmpl $0x2, %ebx
movq %r13, 0x8(%rsp)
jne 0x82bd8
leaq 0x2a7b6(%rip), %rdi     # 0xad268
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl (%r12), %r9d
movl 0x4(%r12), %r10d
incl %r9d
movl 0x1c0(%r13), %r11d
leaq 0x2ad0e(%rip), %r13     # 0xad7ec
leaq 0x1fee4(%rip), %rbp     # 0xa29c9
leaq 0x2b246(%rip), %r8      # 0xadd32
movq %r14, %rdi
movl %ebx, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r11
pushq %r13
pushq %r15
pushq %r10
pushq %rbp
pushq %r15
callq 0x7bab4
addq $0x30, %rsp
leaq 0x2b057(%rip), %r10     # 0xadb6f
leaq 0x2ae11(%rip), %r11     # 0xad930
leaq 0x2b10b(%rip), %r15     # 0xadc31
leaq 0x2b0ff(%rip), %r13     # 0xadc2c
leaq 0x2b0e1(%rip), %rbp     # 0xadc15
leaq 0x2b145(%rip), %r8      # 0xadc80
leaq 0x2b0e1(%rip), %r9      # 0xadc23
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r15
pushq %r13
pushq %rbp
leaq 0x2b0c1(%rip), %r10     # 0xadc27
pushq %r10
callq 0x7bd1c
addq $0x30, %rsp
leaq 0x222d0(%rip), %r10     # 0xa4e48
leaq 0x2b16b(%rip), %r11     # 0xadcea
leaq 0x2ae8c(%rip), %r15     # 0xada12
leaq 0x2b0f5(%rip), %r13     # 0xadc82
leaq 0x2b08d(%rip), %r8      # 0xadc21
leaq 0x2ad81(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x6, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
pushq %r13
callq 0x7bd1c
addq $0x20, %rsp
leaq 0x2a4b7(%rip), %rdi     # 0xad078
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x82cce
movl (%r12), %r9d
movl 0x4(%r12), %r10d
incl %r9d
movl 0x1c0(%r13), %r11d
leaq 0x2abfa(%rip), %r13     # 0xad7ec
leaq 0x1fdd0(%rip), %rbp     # 0xa29c9
leaq 0x2b132(%rip), %r8      # 0xadd32
movq %r14, %rdi
movl %ebx, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %eax, %eax
pushq %r11
pushq %r13
pushq %r15
pushq %r10
pushq %rbp
pushq %r15
callq 0x7bab4
addq $0x30, %rsp
leaq 0x2af43(%rip), %r10     # 0xadb6f
leaq 0x2acfd(%rip), %r11     # 0xad930
leaq 0x2aff7(%rip), %r15     # 0xadc31
leaq 0x2afeb(%rip), %r13     # 0xadc2c
leaq 0x2afcd(%rip), %rbp     # 0xadc15
leaq 0x2b031(%rip), %r8      # 0xadc80
leaq 0x2afcd(%rip), %r9      # 0xadc23
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x8, %ecx
movl $0x0, %eax
pushq %r10
pushq %r11
pushq %r15
pushq %r13
pushq %rbp
leaq 0x2afad(%rip), %r10     # 0xadc27
pushq %r10
callq 0x7bd1c
addq $0x30, %rsp
leaq 0x221bc(%rip), %r10     # 0xa4e48
leaq 0x2b057(%rip), %r11     # 0xadcea
leaq 0x2ad78(%rip), %r15     # 0xada12
leaq 0x2afe1(%rip), %r13     # 0xadc82
leaq 0x2af79(%rip), %r8      # 0xadc21
leaq 0x2ac6d(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x6, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
pushq %r13
callq 0x7bd1c
addq $0x20, %rsp
incl 0x32c514(%rip)          # 0x3af1e8
movq %r14, %rdi
movl %ebx, %esi
movq 0x8(%rsp), %rdx
movq %rdx, %r15
movl $0x1, %ecx
callq 0x7e795
leaq 0x2b040(%rip), %rdx     # 0xadd32
leaq 0x204b0(%rip), %rcx     # 0xa31a9
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl %ebx, %esi
callq 0x7c24c
leaq 0x227c7(%rip), %rcx     # 0xa54d6
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7ba46
movl (%r12), %r8d
leaq 0x2af5b(%rip), %rbp     # 0xadc82
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2aee1(%rip), %rdx     # 0xadc27
leaq 0x2ae30(%rip), %rcx     # 0xadb7d
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ba46
movl 0x1c0(%r15), %r8d
addl $-0x2, %r8d
leaq 0x2abb3(%rip), %r15     # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2a33b(%rip), %rdx     # 0xad0c0
movq %r13, %rdi
movl %ebx, %esi
movq %rbp, %rcx
movq %r15, %r8
callq 0x7c269
leaq 0x2ae95(%rip), %rdx     # 0xadc31
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7ba46
leaq 0x2aa3c(%rip), %rdx     # 0xad7ec
movq %r13, %rdi
movl %ebx, %esi
movq %r15, %rcx
callq 0x7c24c
leaq 0x2ab6c(%rip), %rdx     # 0xad930
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7ba46
leaq 0x2ae5e(%rip), %rcx     # 0xadc36
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2ae43(%rip), %rdx     # 0xadc27
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x220ff(%rip), %rdx     # 0xa4ef9
movq %r13, %rdi
movl %ebx, %esi
movq %rbp, %rcx
callq 0x7c24c
leaq 0x2ae15(%rip), %rdx     # 0xadc23
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7ba46
movq %r13, %rdi
movl %ebx, %esi
leaq 0x2af0b(%rip), %rdx     # 0xadd32
movq %rbp, %rcx
callq 0x7c24c
leaq 0x2ae12(%rip), %rcx     # 0xadc48
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
movq 0x8(%rsp), %r15
movl 0x10(%r15), %r8d
decl %r8d
leaq 0x2adc1(%rip), %rbp     # 0xadc21
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x2ad99(%rip), %rdx     # 0xadc15
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2acf5(%rip), %rcx     # 0xadb7d
callq 0x7ba46
movl (%r12), %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2ade5(%rip), %r12     # 0xadc82
movq %r12, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
leaq 0x259ed(%rip), %rdx     # 0xa88a1
movq %r13, %rdi
movl %ebx, %esi
movq %rbp, %rcx
movq %r12, %r8
callq 0x7c269
leaq 0x2ad61(%rip), %rdx     # 0xadc2c
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7ba46
movq %r13, %rdi
movl %ebx, %esi
leaq 0x2ae4e(%rip), %rdx     # 0xadd32
movq %r12, %rcx
callq 0x7c24c
leaq 0x2ad8d(%rip), %rdx     # 0xadc80
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x7ba46
leaq 0x2ad5a(%rip), %rcx     # 0xadc61
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2ad02(%rip), %rdx     # 0xadc15
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x1faa0(%rip), %r12     # 0xa29c9
movq %r13, %rdi
movl %ebx, %esi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x7c24c
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
leaq 0x2accd(%rip), %rcx     # 0xadc15
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
movl 0x10(%r15), %ecx
leaq 0x2b174(%rip), %rax     # 0xae0d6
leaq 0x2aaa9(%rip), %r15     # 0xada12
leaq 0x2ac08(%rip), %r8      # 0xadb78
leaq 0x2abf8(%rip), %r9      # 0xadb6f
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
pushq %rax
pushq %r15
callq 0x7e698
addq $0x10, %rsp
leaq 0x23d3a(%rip), %rsi     # 0xa6ccc
movq %r14, %rdi
movl %ebx, %edx
movq %r15, %rcx
callq 0x7bffb
movq %r14, %rdi
movl %ebx, %esi
callq 0x7c1ca
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq