// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/savecode.c
// Function: generate_test_code_quantizereg
void generate_test_code_quantizereg(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, Datasetptr d, Model_quantizeregptr m)
{
 /*!Last Changed 12.06.2006*/
 char st[MAXLENGTH], st2[MAXLENGTH];
 code_function_header(testcodefile, "quantizereg", d->featurecount, language);
 code_constant_start(testcodefile, language); 
 code_constant_real(testcodefile, language, "minx", m->minx);
 code_constant_real(testcodefile, language, "binx", m->binx);
 if (d->featurecount > 2)
  {
   code_2d_array_constant(testcodefile, language, "means", m->partitioncount, m->partitioncount, m->meanstwo);
   code_2d_array_constant(testcodefile, language, "eigenvectors", m->eigenvectors.row, m->eigenvectors.col, m->eigenvectors.values);
   code_constant_real(testcodefile, language, "miny", m->miny);
   code_constant_real(testcodefile, language, "biny", m->biny);
   code_variable_start(testcodefile, language);
   code_add_variable(testcodefile, language, INTEGER_VARIABLE, 3, "i", "x", "y");
   code_add_variable(testcodefile, language, REAL_VARIABLE, 2, "eigenvectors_ij", "x_i");
   code_add_array_variable(testcodefile, language, 1, REAL_VARIABLE, "testdatareduced", 2);
   code_start(testcodefile, language);  
   code_dimension_reduce(testcodefile, language, d, 2);   
   code_array_index_variable(st, language, "testdatareduced", "0"); 
   sprintf(st2, "(%s - minx) / binx", st);
   code_set_variable(testcodefile, language, "x", st2);
   code_if(testcodefile, language, "<", "x", "0");
   code_set_variable(testcodefile, language, "x", "0");
   code_endif(testcodefile, language);
   sprintf(st, "%d", d->multifeaturecount - 1);
   code_if(testcodefile, language, ">", "x", st);
   code_set_variable(testcodefile, language, "x", st);   
   code_endif(testcodefile, language);
   code_array_index_variable(st, language, "testdatareduced", "1"); 
   sprintf(st2, "(%s - miny) / biny", st);
   code_set_variable(testcodefile, language, "y", st2);
   code_if(testcodefile, language, "<", "y", "0");
   code_set_variable(testcodefile, language, "y", "0");
   code_endif(testcodefile, language);
   sprintf(st, "%d", d->multifeaturecount - 1);
   code_if(testcodefile, language, ">", "y", st);
   code_set_variable(testcodefile, language, "y", st);   
   code_endif(testcodefile, language);
   code_2d_array_index_variable(st, language, "means", "x", "y");
  }
 else
  {
   code_1d_array_constant(testcodefile, language, "means", m->partitioncount, m->meansone, REAL_TYPE);
   code_variable_start(testcodefile, language);
   code_add_variable(testcodefile, language, INTEGER_VARIABLE, 1, "x");
   code_start(testcodefile, language);  
   code_array_index_variable(st, language, "testdataconverted", "0"); 
   sprintf(st2, "(%s - minx) / binx", st);
   code_set_variable(testcodefile, language, "x", st2);
   code_if(testcodefile, language, "<", "x", "0");
   code_set_variable(testcodefile, language, "x", "0");
   code_endif(testcodefile, language);
   sprintf(st, "%d", d->multifeaturecount - 1);
   code_if(testcodefile, language, ">", "x", st);
   code_set_variable(testcodefile, language, "x", st);   
   code_endif(testcodefile, language);   
   code_array_index_variable(st, language, "means", "x");
  }
 code_function_return_string(testcodefile, "quantizereg", language, st);   
 code_function_end(testcodefile, language);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf4270, %rsp          # imm = 0xF4270
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1bc(%rax), %edx
movl -0xc(%rbp), %ecx
leaq 0x320a1(%rip), %rsi     # 0xe69c3
callq 0xaf1e0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaf9c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
leaq 0x3886e(%rip), %rdx     # 0xed1b7
callq 0xaf870
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
leaq 0x38870(%rip), %rdx     # 0xed1d5
callq 0xaf870
movq -0x18(%rbp), %rax
cmpl $0x2, 0x1bc(%rax)
jle 0xb4cd9
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x20(%rbp), %rax
movl 0x40(%rax), %r8d
movq -0x20(%rbp), %rax
movq 0x28(%rax), %r9
leaq 0x3881c(%rip), %rdx     # 0xed1bc
callq 0xb18c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl 0x34(%rax), %r8d
movq -0x20(%rbp), %rax
movq 0x38(%rax), %r9
leaq 0x385e4(%rip), %rdx     # 0xecfae
callq 0xb18c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movsd 0x10(%rax), %xmm0
leaq 0x387dc(%rip), %rdx     # 0xed1c2
callq 0xaf870
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movsd 0x18(%rax), %xmm0
leaq 0x387e6(%rip), %rdx     # 0xed1e8
callq 0xaf870
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb00e0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
movl $0x3, %ecx
leaq 0x38901(%rip), %r8      # 0xed329
leaq 0x2e0fd(%rip), %r9      # 0xe2b2c
leaq 0x2dd08(%rip), %rax     # 0xe273e
movq %rax, (%rsp)
movb $0x0, %al
callq 0xafe40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x1, %edx
movl $0x2, %ecx
leaq 0x38562(%rip), %r8      # 0xecfbb
leaq 0x3874b(%rip), %r9      # 0xed1ab
movb $0x0, %al
callq 0xafe40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x1, %ecx
leaq 0x38524(%rip), %r8      # 0xecf9e
movl $0x2, %r9d
movl %ecx, %edx
movb $0x0, %al
callq 0xafab0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaf2c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl $0x2, %ecx
callq 0xb2f30
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x384e3(%rip), %rdx     # 0xecf9e
leaq 0x387c5(%rip), %rcx     # 0xed287
callq 0xb04c0
leaq -0xf4260(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
leaq 0x386eb(%rip), %rsi     # 0xed1c7
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0xf4260(%rbp), %rcx
leaq 0x2e034(%rip), %rdx     # 0xe2b2c
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x30fb5(%rip), %rdx     # 0xe5ac0
leaq 0x2e01a(%rip), %rcx     # 0xe2b2c
leaq 0x3876e(%rip), %r8      # 0xed287
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x2e000(%rip), %rdx     # 0xe2b2c
leaq 0x38754(%rip), %rcx     # 0xed287
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %edx
subl $0x1, %edx
leaq 0x38706(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %r8
leaq 0x38c63(%rip), %rdx     # 0xed7de
leaq 0x2dfaa(%rip), %rcx     # 0xe2b2c
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x2df90(%rip), %rdx     # 0xe2b2c
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x383e0(%rip), %rdx     # 0xecf9e
leaq 0x384a4(%rip), %rcx     # 0xed069
callq 0xb04c0
leaq -0xf4260(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
leaq 0x385fb(%rip), %rsi     # 0xed1da
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0xf4260(%rbp), %rcx
leaq 0x2db43(%rip), %rdx     # 0xe273e
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x30eb2(%rip), %rdx     # 0xe5ac0
leaq 0x2db29(%rip), %rcx     # 0xe273e
leaq 0x3866b(%rip), %r8      # 0xed287
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x2db0f(%rip), %rdx     # 0xe273e
leaq 0x38651(%rip), %rcx     # 0xed287
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %edx
subl $0x1, %edx
leaq 0x38603(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %r8
leaq 0x38b60(%rip), %rdx     # 0xed7de
leaq 0x2dab9(%rip), %rcx     # 0xe273e
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x2da9f(%rip), %rdx     # 0xe273e
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x384fb(%rip), %rdx     # 0xed1bc
leaq 0x2de64(%rip), %rcx     # 0xe2b2c
leaq 0x2da6f(%rip), %r8      # 0xe273e
callq 0xb0560
jmp 0xb4e55
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %r8
leaq 0x384c6(%rip), %rdx     # 0xed1bc
movl $0x1, %r9d
callq 0xb15d0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb00e0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
movl $0x1, %ecx
leaq 0x2de0a(%rip), %r8      # 0xe2b2c
movb $0x0, %al
callq 0xafe40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaf2c0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x381ae(%rip), %rdx     # 0xecef4
leaq 0x3853a(%rip), %rcx     # 0xed287
callq 0xb04c0
leaq -0xf4260(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
leaq 0x38460(%rip), %rsi     # 0xed1c7
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0xf4260(%rbp), %rcx
leaq 0x2dda9(%rip), %rdx     # 0xe2b2c
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x30d2a(%rip), %rdx     # 0xe5ac0
leaq 0x2dd8f(%rip), %rcx     # 0xe2b2c
leaq 0x384e3(%rip), %r8      # 0xed287
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x2dd75(%rip), %rdx     # 0xe2b2c
leaq 0x384c9(%rip), %rcx     # 0xed287
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1c0(%rax), %edx
subl $0x1, %edx
leaq 0x3847b(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %r8
leaq 0x389d8(%rip), %rdx     # 0xed7de
leaq 0x2dd1f(%rip), %rcx     # 0xe2b2c
callq 0xb0d00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x7a140(%rbp), %rcx
leaq 0x2dd05(%rip), %rdx     # 0xe2b2c
callq 0xafa00
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb0ec0
leaq -0x7a140(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x38373(%rip), %rdx     # 0xed1bc
leaq 0x2dcdc(%rip), %rcx     # 0xe2b2c
callq 0xb04c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq -0x7a140(%rbp), %rcx
leaq 0x31b59(%rip), %rsi     # 0xe69c3
callq 0xb01f0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb03a0
addq $0xf4270, %rsp          # imm = 0xF4270
popq %rbp
retq
nopw %cs:(%rax,%rax)