// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/savecode.c
// Function: generate_test_code_svmreg
void generate_test_code_svmreg(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, char* algorithmname, Svm_modelptr m)
{
 /*!Last Changed 25.06.2006*/
 char st[MAXLENGTH], st2[MAXLENGTH];
 code_function_header(testcodefile, algorithmname, 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_constant_real(testcodefile, language, "gamma", m->param.gamma);
 code_constant_real(testcodefile, language, "coef0", m->param.coef0);
 code_constant_real(testcodefile, language, "rho", m->rho[0]);
 code_constant_integer(testcodefile, language, "degree", m->param.degree);
 code_2d_array_constant_sv(testcodefile, language, "sv", m->l, d->multifeaturecount - 1, m->SV);
	code_1d_array_constant(testcodefile, language, "sv_coef", m->l, m->sv_coef, REAL_TYPE);
 code_variable_start(testcodefile, language); 
 code_add_variable(testcodefile, language, INTEGER_VARIABLE, 4, "i", "j", "k", "a");
 code_add_variable(testcodefile, language, REAL_VARIABLE, 4, "x_j", "sv_ij", "sum", "regvalue");
 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, "regvalue", "0.0");
	code_for(testcodefile, language, "i", 0, m->l - 1, 1);
	code_kernel_function(testcodefile, language, d, m->param);
 code_array_index_variable(st, language, "sv_coef", "i");  
	sprintf(st2, "regvalue + sum * %s", st);
	code_set_variable(testcodefile, language, "regvalue", st2);
	code_endfor(testcodefile, language, "i");
	code_set_variable(testcodefile, language, "regvalue", "regvalue - rho");
 code_function_return_string(testcodefile, algorithmname, language, "regvalue");   
 code_function_end(testcodefile, language);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf4258, %rsp          # imm = 0xF4258
movq %r8, %r13
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
movq %rcx, 0x8(%rsp)
movq %rcx, %rsi
movl %ebx, %ecx
callq 0x7b551
cmpl $0x2, %ebx
jne 0x84a7e
leaq 0x28799(%rip), %rdi     # 0xad205
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x29d6b(%rip), %rcx     # 0xae7fb
leaq 0x32a511(%rip), %r9     # 0x3aefa8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7cde7
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x1e96e(%rip), %rcx     # 0xa3424
leaq 0x32a51b(%rip), %r9     # 0x3aefd8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7cde7
movsd 0x10(%r13), %xmm0
leaq 0x1dd8c(%rip), %rdx     # 0xa2863
movq %r14, %rdi
movl %ebx, %esi
callq 0x7b9ed
movsd 0x18(%r13), %xmm0
leaq 0x1dd62(%rip), %rdx     # 0xa2850
movq %r14, %rdi
movl %ebx, %esi
callq 0x7b9ed
movq 0x70(%r13), %rax
movsd (%rax), %xmm0
leaq 0x29252(%rip), %rdx     # 0xadd59
movq %r14, %rdi
movl %ebx, %esi
callq 0x7b9ed
movl 0x8(%r13), %ecx
leaq 0x1dd3d(%rip), %rdx     # 0xa2859
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ba0a
movl 0x5c(%r13), %ecx
movl 0x1c0(%r12), %r8d
decl %r8d
movq 0x60(%r13), %r9
leaq 0x29169(%rip), %rdx     # 0xadca9
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d2a8
movl 0x5c(%r13), %ecx
movq 0x68(%r13), %r8
leaq 0x29147(%rip), %rdx     # 0xadca0
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7ceb8
cmpl $0x2, %ebx
jne 0x84c3f
leaq 0x286ef(%rip), %rdi     # 0xad268
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
leaq 0x202b6(%rip), %r10     # 0xa4e48
leaq 0x29151(%rip), %r11     # 0xadcea
leaq 0x29081(%rip), %r8      # 0xadc21
leaq 0x28d75(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
leaq 0x28f40(%rip), %r10     # 0xadb09
leaq 0x29045(%rip), %r11     # 0xadc15
leaq 0x28d59(%rip), %r8      # 0xad930
leaq 0x28db6(%rip), %r9      # 0xad994
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
movl 0x1c0(%r12), %r9d
leaq 0x28be1(%rip), %r8      # 0xad7ec
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7bab4
leaq 0x28450(%rip), %rdi     # 0xad078
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x84cd5
leaq 0x20202(%rip), %r10     # 0xa4e48
leaq 0x2909d(%rip), %r11     # 0xadcea
leaq 0x28fcd(%rip), %r8      # 0xadc21
leaq 0x28cc1(%rip), %r9      # 0xad91c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
leaq 0x28e8c(%rip), %r10     # 0xadb09
leaq 0x28f91(%rip), %r11     # 0xadc15
leaq 0x28ca5(%rip), %r8      # 0xad930
leaq 0x28d02(%rip), %r9      # 0xad994
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7bd1c
addq $0x10, %rsp
movl 0x1c0(%r12), %r9d
leaq 0x28b2d(%rip), %r8      # 0xad7ec
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7bab4
incl 0x32a50d(%rip)          # 0x3af1e8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x7e795
leaq 0x28e15(%rip), %rbp     # 0xadb09
leaq 0x28e82(%rip), %rcx     # 0xadb7d
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x7ba46
movl 0x5c(%r13), %r8d
decl %r8d
leaq 0x28f0b(%rip), %r15     # 0xadc21
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7ca9f
subq $0x60, %rsp
movl $0xb, %ecx
movq %rsp, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7ee1f
addq $0x60, %rsp
leaq 0x28f4b(%rip), %rdx     # 0xadca0
leaq 0x7a130(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movq %r15, %rcx
callq 0x7c24c
leaq 0x28fc9(%rip), %rsi     # 0xadd3a
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x7ba46
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cd49
leaq 0x28faa(%rip), %rcx     # 0xadd4e
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x7ba46
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
movq %rbp, %rcx
callq 0x7bffb
movq %r14, %rdi
movl %ebx, %esi
callq 0x7c1ca
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop