// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/savecode.c
// Function: code_kernel_function
void code_kernel_function(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Svm_parameter param)
{
 /*!Last Changed 25.06.2006*/
	char st[MAXLENGTH];
 code_set_variable(testcodefile, language, "sum", "0.0");
	code_for(testcodefile, language, "j", 0, d->multifeaturecount - 2, 1);
 code_array_index_variable(st, language, "testdataconverted", "j");  				             
	code_set_variable(testcodefile, language, "x_j", st);
 code_2d_array_index_variable(st, language, "sv", "i", "j");  
	code_set_variable(testcodefile, language, "sv_ij", st);
	switch (param.kernel_type){
	  case KLINEAR :
			case KPOLY   :
			case KSIGMOID:code_set_variable(testcodefile, language, "sum", "sum + x_j * sv_ij");
				             break;
			case KRBF    :code_set_variable(testcodefile, language, "sum", "sum + (x_j - sv_ij) * (x_j - sv_ij)");
				             break;
   case KPREDEFINED:break;
	};	
	code_endfor(testcodefile, language, "j");
	switch (param.kernel_type){
			case KPOLY   :code_set_variable(testcodefile, language, "sum", "pow(gamma * sum + coef0, degree)");
				             break;
			case KSIGMOID:code_set_variable(testcodefile, language, "sum", "tanh(gamma * sum + coef0)");
				             break;
			case KRBF    :code_set_variable(testcodefile, language, "sum", "exp(-gamma * sum)");
				             break;
   default      :break;
	};	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a170, %rsp          # imm = 0x7A170
leaq 0x10(%rbp), %rax
movq %rax, -0x7a150(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x396ce(%rip), %rdx     # 0xed31d
leaq 0x3962f(%rip), %rcx     # 0xed285
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %r8d
addl $-0x2, %r8d
leaq 0x393ac(%rip), %rdx     # 0xed024
movq %rdx, -0x7a160(%rbp)
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xb10b0
movq -0x7a160(%rbp), %rcx
movl -0xc(%rbp), %esi
leaq 0x39257(%rip), %rdx     # 0xecef4
leaq -0x7a140(%rbp), %rdi
movq %rdi, -0x7a158(%rbp)
callq 0xb04c0
movq -0x7a158(%rbp), %rcx
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x39373(%rip), %rdx     # 0xed038
callq 0xafa00
movq -0x7a160(%rbp), %r8
movq -0x7a158(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x396cf(%rip), %rdx     # 0xed3b1
leaq 0x39640(%rip), %rcx     # 0xed329
callq 0xb0560
movq -0x7a158(%rbp), %rcx
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x39399(%rip), %rdx     # 0xed09c
callq 0xafa00
movq -0x7a150(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x7a148(%rbp)
subq $0x4, %rax
ja 0xb3d70
movq -0x7a148(%rbp), %rax
leaq 0x38a3f(%rip), %rcx     # 0xec76c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x395d9(%rip), %rdx     # 0xed31d
leaq 0x39345(%rip), %rcx     # 0xed090
callq 0xafa00
jmp 0xb3d70
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x395bd(%rip), %rdx     # 0xed31d
leaq 0x3933b(%rip), %rcx     # 0xed0a2
callq 0xafa00
jmp 0xb3d70
jmp 0xb3d70
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x392a6(%rip), %rdx     # 0xed024
callq 0xb13f0
movq -0x7a150(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x7a164(%rbp)
subl $0x1, %eax
je 0xb3db4
jmp 0xb3d9a
movl -0x7a164(%rbp), %eax
subl $0x2, %eax
je 0xb3dec
jmp 0xb3da7
movl -0x7a164(%rbp), %eax
subl $0x3, %eax
je 0xb3dd0
jmp 0xb3e08
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x3955b(%rip), %rdx     # 0xed31d
leaq 0x392fd(%rip), %rcx     # 0xed0c6
callq 0xafa00
jmp 0xb3e0a
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x3953f(%rip), %rdx     # 0xed31d
leaq 0x39302(%rip), %rcx     # 0xed0e7
callq 0xafa00
jmp 0xb3e0a
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x39523(%rip), %rdx     # 0xed31d
leaq 0x39300(%rip), %rcx     # 0xed101
callq 0xafa00
jmp 0xb3e0a
jmp 0xb3e0a
addq $0x7a170, %rsp          # imm = 0x7A170
popq %rbp
retq
nopw %cs:(%rax,%rax)