// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: bootstrap_sample_with_stratification
void bootstrap_sample_with_stratification(int *prior_class_information, int* classcounts)
{
 long i, j;
 Instanceptr currentinstance, trainbefore = NULL;
 int* tmpcounts = safemalloc(sizeof(int) * current_dataset->classno, "bootstrap_sample_with_stratification", 2);
 for (i = 0; i < current_dataset->classno; i++)
   tmpcounts[i] = classcounts[i];
 i = 0;
 while (i < trainlinecount)
  {
   j = myrand() % trainlinecount;
   while (tmpcounts[prior_class_information[j]] == 0)
     j = myrand() % trainlinecount;
   (tmpcounts[prior_class_information[j]])--;
   currentinstance = create_instance(current_dataset, trainlines[j], NO);
   if (i != 0)
     trainbefore->next = currentinstance;
   else
     traindata = currentinstance;
   trainbefore = currentinstance;
   currentinstance->index = i;
   i++;
  }
 safe_free(tmpcounts);
 current_dataset->traincount = i;
 if (convert_missing_values)
   handle_missing_values(traindata, traindata);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq 0x7f1e1(%rip), %rax     # 0x105840
movslq 0x10(%rax), %rdi
shlq $0x2, %rdi
leaq 0x61c2d(%rip), %rsi     # 0xe829b
movl $0x2, %edx
callq 0x52d70
movq %rax, -0x38(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x7f1b1(%rip), %rcx     # 0x105840
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rax
jge 0x866bc
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x86684
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movslq 0x7ee11(%rip), %rcx     # 0x1054e0
cmpq %rcx, %rax
jge 0x8679a
movb $0x0, %al
callq 0x54550
cltd
idivl 0x7edfa(%rip)           # 0x1054e0
movslq %edx, %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x8671a
movb $0x0, %al
callq 0x54550
cltd
idivl 0x7edcf(%rip)           # 0x1054e0
movslq %edx, %rax
movq %rax, -0x20(%rbp)
jmp 0x866ed
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq 0x7f106(%rip), %rdi     # 0x105840
movq 0x7f0ef(%rip), %rax     # 0x105830
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
callq 0x22c30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x86769
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x86774
movq -0x28(%rbp), %rax
movq %rax, 0x2e168c(%rip)    # 0x367e00
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x866c4
movq -0x38(%rbp), %rdi
callq 0x52e80
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq 0x7f090(%rip), %rax     # 0x105840
movl %ecx, 0x1407124(%rax)
cmpl $0x0, 0x7eabf(%rip)     # 0x10527c
je 0x867d2
movq 0x2e163a(%rip), %rdi    # 0x367e00
movq 0x2e1633(%rip), %rsi    # 0x367e00
callq 0x85060
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)