// File: /workspace/github_c_makefile_star2_O2/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 %rcx, 0x8(%rsp)
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
movl 0x1bc(%rdx), %edx
movq %rcx, %rsi
movl %ebx, %ecx
callq 0x72674
movq %r14, %rdi
movl %ebx, %esi
callq 0x72b0a
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x275de(%rip), %rcx     # 0xa17eb
leaq 0x32fd94(%rip), %r9     # 0x3a9fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x73bdf
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x1c1f1(%rip), %rcx     # 0x96424
leaq 0x32fd9e(%rip), %r9     # 0x3a9fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x73bdf
movsd 0x10(%r13), %xmm0
leaq 0x1b60f(%rip), %rdx     # 0x95863
movq %r14, %rdi
movl %ebx, %esi
callq 0x72ad0
movsd 0x18(%r13), %xmm0
leaq 0x1b5e5(%rip), %rdx     # 0x95850
movq %r14, %rdi
movl %ebx, %esi
callq 0x72ad0
movq 0x70(%r13), %rax
movsd (%rax), %xmm0
leaq 0x26ad1(%rip), %rdx     # 0xa0d55
movq %r14, %rdi
movl %ebx, %esi
callq 0x72ad0
movl 0x8(%r13), %ecx
leaq 0x1b5c0(%rip), %rdx     # 0x95859
movq %r14, %rdi
movl %ebx, %esi
callq 0x72aed
movl 0x5c(%r13), %ecx
movl 0x1c0(%r12), %r8d
decl %r8d
movq 0x60(%r13), %r9
leaq 0x269e8(%rip), %rdx     # 0xa0ca5
movq %r14, %rdi
movl %ebx, %esi
callq 0x74094
movl 0x5c(%r13), %ecx
movq 0x68(%r13), %r8
leaq 0x269c6(%rip), %rdx     # 0xa0c9c
pushq $0x1
popq %r15
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %r9d
callq 0x73cac
movq %r14, %rdi
movl %ebx, %esi
callq 0x72fb3
leaq 0x1db28(%rip), %r10     # 0x97e20
leaq 0x269e7(%rip), %r11     # 0xa0ce6
leaq 0x26917(%rip), %r8      # 0xa0c1d
leaq 0x2660b(%rip), %r9      # 0xa0918
pushq $0x4
popq %rbp
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x72de1
popq %rax
popq %rcx
leaq 0x267d8(%rip), %r11     # 0xa0b05
leaq 0x268dd(%rip), %r10     # 0xa0c11
leaq 0x265f1(%rip), %r8      # 0xa092c
leaq 0x2664e(%rip), %r9      # 0xa0990
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
movq %r11, %rbp
pushq %r10
callq 0x72de1
popq %rax
popq %rcx
movl 0x1c0(%r12), %r9d
leaq 0x2647d(%rip), %r8      # 0xa07e8
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x72b76
movq %r14, %rdi
movl %ebx, %esi
callq 0x726d3
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movl %r15d, %ecx
callq 0x753f5
leaq 0x267db(%rip), %rcx     # 0xa0b79
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x72b25
movl 0x5c(%r13), %r8d
decl %r8d
movq %r14, %rdi
movl %ebx, %esi
leaq 0x2685f(%rip), %rbp     # 0xa0c1d
movq %rbp, %rdx
xorl %ecx, %ecx
movl %r15d, %r9d
callq 0x73938
subq $0x60, %rsp
pushq $0xb
popq %rcx
movq %rsp, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x759df
addq $0x60, %rsp
leaq 0x7a130(%rsp), %r15
movq %r15, %rdi
movl %ebx, %esi
leaq 0x2689c(%rip), %rdx     # 0xa0c9c
movq %rbp, %rcx
callq 0x7327f
leaq 0x26927(%rip), %rsi     # 0xa0d36
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r14, %rdi
movl %ebx, %esi
leaq 0x266d8(%rip), %r15     # 0xa0b05
movq %r15, %rdx
movq %r12, %rcx
callq 0x72b25
movq %r14, %rdi
movl %ebx, %esi
callq 0x73b72
leaq 0x26901(%rip), %rcx     # 0xa0d4a
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x72b25
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
movq %r15, %rcx
callq 0x7308c
movq %r14, %rdi
movl %ebx, %esi
callq 0x7320f
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq