// File: /workspace/github_c_makefile_star2_O3/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 0x7ce21
cmpl $0x2, %ebx
jne 0x87281
leaq 0x2902e(%rip), %rdi     # 0xb029d
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x2a5f8(%rip), %rcx     # 0xb188b
leaq 0x32ad0e(%rip), %r9     # 0x3b1fa8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7e724
movl 0x1c0(%r12), %r8d
decl %r8d
leaq 0x1f16b(%rip), %rcx     # 0xa6424
leaq 0x32ad18(%rip), %r9     # 0x3b1fd8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x7e724
movl %ebx, %ebp
leaq 0x4ca4a(%rip), %r15     # 0xd3d20
cmpl $0x5, %ebx
ja 0x872f6
movsd 0x10(%r13), %xmm0
movq (%r15,%rbp,8), %rsi
leaq 0x1e577(%rip), %rdx     # 0xa5863
movq %r14, %rdi
movb $0x1, %al
callq 0x42e0
cmpl $0x5, %ebx
ja 0x87316
movsd 0x18(%r13), %xmm0
movq (%r15,%rbp,8), %rsi
leaq 0x1e544(%rip), %rdx     # 0xa5850
movq %r14, %rdi
movb $0x1, %al
callq 0x42e0
cmpl $0x5, %ebx
ja 0x87338
movq 0x70(%r13), %rax
movsd (%rax), %xmm0
movq (%r15,%rbp,8), %rsi
leaq 0x29ac3(%rip), %rdx     # 0xb0df1
movq %r14, %rdi
movb $0x1, %al
callq 0x42e0
cmpl $0x5, %ebx
ja 0x8735d
movl 0x8(%r13), %ecx
leaq 0x4ca08(%rip), %rax     # 0xd3d50
movq (%rax,%rbp,8), %rsi
leaq 0x1e506(%rip), %rdx     # 0xa5859
movq %r14, %rdi
xorl %eax, %eax
callq 0x42e0
movl 0x5c(%r13), %ecx
movl 0x1c0(%r12), %r8d
decl %r8d
movq 0x60(%r13), %r9
leaq 0x299ca(%rip), %rdx     # 0xb0d41
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ec8b
movl 0x5c(%r13), %ecx
movq 0x68(%r13), %r8
leaq 0x299a8(%rip), %rdx     # 0xb0d38
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %r9d
callq 0x7e7f5
cmpl $0x2, %ebx
jne 0x8747f
leaq 0x28f50(%rip), %rdi     # 0xb0300
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
leaq 0x20ad7(%rip), %r10     # 0xa7ea0
leaq 0x299b2(%rip), %r11     # 0xb0d82
leaq 0x298e2(%rip), %r8      # 0xb0cb9
leaq 0x295d6(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
leaq 0x2979e(%rip), %r10     # 0xb0ba1
leaq 0x298a3(%rip), %r11     # 0xb0cad
leaq 0x295b7(%rip), %r8      # 0xb09c8
leaq 0x29614(%rip), %r9      # 0xb0a2c
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
movl 0x1c0(%r12), %r9d
leaq 0x2943c(%rip), %r8      # 0xb0884
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7d384
leaq 0x28ca8(%rip), %rdi     # 0xb0110
movl $0x6, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
jmp 0x87515
leaq 0x20a1a(%rip), %r10     # 0xa7ea0
leaq 0x298f5(%rip), %r11     # 0xb0d82
leaq 0x29825(%rip), %r8      # 0xb0cb9
leaq 0x29519(%rip), %r9      # 0xb09b4
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
leaq 0x296e4(%rip), %r10     # 0xb0ba1
leaq 0x297e9(%rip), %r11     # 0xb0cad
leaq 0x294fd(%rip), %r8      # 0xb09c8
leaq 0x2955a(%rip), %r9      # 0xb0a2c
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x7d617
addq $0x10, %rsp
movl 0x1c0(%r12), %r9d
leaq 0x29385(%rip), %r8      # 0xb0884
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x7d384
incl 0x32accd(%rip)          # 0x3b21e8
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x8050d
leaq 0x2966d(%rip), %rdx     # 0xb0ba1
leaq 0x296da(%rip), %rcx     # 0xb0c15
movq %r14, %rdi
movl %ebx, %esi
callq 0x7d316
movl 0x5c(%r13), %r8d
decl %r8d
leaq 0x29766(%rip), %rdx     # 0xb0cb9
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x7e3dc
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 0x80d7c
addq $0x60, %rsp
cmpl $0x5, %ebx
ja 0x875b2
leaq 0x4c7ec(%rip), %rax     # 0xd3d80
movq (%rax,%rbp,8), %rsi
leaq 0x29799(%rip), %rdx     # 0xb0d38
leaq 0x29713(%rip), %rcx     # 0xb0cb9
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x29819(%rip), %rsi     # 0xb0dd2
leaq 0x7a130(%rsp), %r12
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x41b0
leaq 0x295ca(%rip), %r13     # 0xb0ba1
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x7d316
movq %r14, %rdi
movl %ebx, %esi
callq 0x7e686
leaq 0x297ee(%rip), %rcx     # 0xb0de6
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x7d316
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
movq %r13, %rcx
callq 0x7d912
movq %r14, %rdi
movl %ebx, %esi
callq 0x7db1b
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop