// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/iseq2comem.c
// Function: write_fqco2file
llong write_fqco2file(char* cofilename, llong *co)
{
 int comp_code_bits = half_ctx_len - drlevel > COMPONENT_SZ ? 4*(half_ctx_len - drlevel - COMPONENT_SZ ) : 0 ;
 FILE **outf;
 outf = malloc(component_num * sizeof(FILE *));
 char cofilename_with_component[PATHLEN];
 for(int i=0;i<component_num ;i++)
  {
    sprintf(cofilename_with_component,"%s.%d",cofilename,i);
    if ( (outf[i] = fopen(cofilename_with_component,"wb") ) == NULL )
      err(errno,"write_fqco2file()") ;
  };
 unsigned int count, wr = 0, newid;
 for(count=0;count < hashsize; count++)
 {
  if( (co[count] & CT_MAX) == CT_MAX ) {
   newid = (unsigned int)( co[count] >> (comp_code_bits + CT_BIT) ) ;
   fwrite( &newid, sizeof(unsigned int),1,outf[(int)( (co[count] >> CT_BIT ) % component_num )] );
      wr++;
  }
 }
 for(int i=0;i<component_num ;i++)
   fclose(outf[i]);
 free(outf);
 return wr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x4a453(%rip), %eax     # 0x6460c
subl 0x4a459(%rip), %eax     # 0x64618
cmpl $0x7, %eax
jle 0x1a1de
movl 0x4a442(%rip), %eax     # 0x6460c
subl 0x4a448(%rip), %eax     # 0x64618
subl $0x7, %eax
shll $0x2, %eax
movl %eax, -0x138(%rbp)
jmp 0x1a1e8
xorl %eax, %eax
movl %eax, -0x138(%rbp)
jmp 0x1a1e8
movl -0x138(%rbp), %eax
movl %eax, -0x14(%rbp)
movslq 0x4a42c(%rip), %rdi     # 0x64624
shlq $0x3, %rdi
callq 0x3310
movq %rax, -0x20(%rbp)
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
cmpl 0x4a409(%rip), %eax     # 0x64624
jge 0x1a28c
leaq -0x120(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl -0x124(%rbp), %ecx
leaq 0x1e1c(%rip), %rsi      # 0x1c051
movb $0x0, %al
callq 0x3400
leaq -0x120(%rbp), %rdi
leaq 0x1e10(%rip), %rsi      # 0x1c05a
callq 0x3370
movq -0x20(%rbp), %rcx
movslq -0x124(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x1a279
callq 0x3050
movl (%rax), %edi
leaq 0x4f18(%rip), %rsi      # 0x1f18a
movb $0x0, %al
callq 0x3300
jmp 0x1a27b
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x1a20f
movl $0x0, -0x12c(%rbp)
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl 0x4a370(%rip), %eax     # 0x6461c
jae 0x1a35d
movq -0x10(%rbp), %rax
movl -0x128(%rbp), %ecx
movq (%rax,%rcx,8), %rax
andq $0xf, %rax
cmpq $0xf, %rax
jne 0x1a347
movq -0x10(%rbp), %rax
movl -0x128(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl %eax, -0x130(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movl -0x128(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x4, %rax
movslq 0x4a317(%rip), %rcx     # 0x64624
xorl %edx, %edx
divq %rcx
movq -0x140(%rbp), %rax
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq -0x130(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x3420
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x1a349
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x1a2a0
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpl 0x4a2b1(%rip), %eax     # 0x64624
jge 0x1a39a
movq -0x20(%rbp), %rax
movslq -0x134(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x30e0
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x1a367
movq -0x20(%rbp), %rdi
callq 0x3040
movl -0x12c(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)