user: 请将以下的汇编代码转换成C语言代码:

```asm
<c1_look_ahead_test>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %esi,%r15d
  mov    %edx,0x20(%rsp)
  mov    %r8d,0x1c(%rsp)
  cmp    $0x1,%ecx
  je     L631
  cmp    $0x4,%ecx
  je     L494
  jle    L35
  cmp    $0x5,%ecx
  je     L563
  cmp    $0x6,%ecx
  jne    L256
  movss  D377(%rip),%xmm0
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x18(%rsp)
  movss  D118(%rip),%xmm2
  movss  %xmm2,0xc(%rsp)
  movss  %xmm2,0x14(%rsp)
  movss  %xmm2,0x10(%rsp)
  jmp    L649
L35:
  cmp    $0x2,%ecx
  jne    L135
  movss  D377(%rip),%xmm0
  movss  D432(%rip),%xmm7
  movss  %xmm7,0x18(%rsp)
  movss  D118(%rip),%xmm5
  movss  %xmm5,0xc(%rsp)
  movss  %xmm5,0x14(%rsp)
  pxor   %xmm3,%xmm3
  movss  %xmm3,0x10(%rsp)
L649:
  mov    0x20(%rsp),%r12d
  cmp    %r15d,%r12d
  jge    L147
  lea    0x8(%r12),%r13d
  movslq %r12d,%rbp
  add    0x28(%rsp),%rbp
  jmp    L620
L631:
  pxor   %xmm0,%xmm0
  movss  D118(%rip),%xmm6
  movss  %xmm6,0x18(%rsp)
  movss  D377(%rip),%xmm7
  movss  %xmm7,0xc(%rsp)
  movss  %xmm7,0x14(%rsp)
  movss  %xmm7,0x10(%rsp)
  jmp    L649
L494:
  movss  D377(%rip),%xmm0
  movss  D432(%rip),%xmm5
  movss  %xmm5,0x18(%rsp)
  movss  D118(%rip),%xmm2
  movss  %xmm2,0xc(%rsp)
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x14(%rsp)
  movss  %xmm2,0x10(%rsp)
  jmp    L649
L135:
  movss  D377(%rip),%xmm0
  movss  D432(%rip),%xmm6
  movss  %xmm6,0x18(%rsp)
  movss  D118(%rip),%xmm5
  movss  %xmm5,0xc(%rsp)
  movss  %xmm5,0x14(%rsp)
  movss  %xmm5,0x10(%rsp)
  jmp    L649
L563:
  movss  D377(%rip),%xmm0
  movss  D432(%rip),%xmm3
  movss  %xmm3,0x18(%rsp)
  pxor   %xmm2,%xmm2
  movss  %xmm2,0xc(%rsp)
  movss  D118(%rip),%xmm4
  movss  %xmm4,0x14(%rsp)
  movss  %xmm4,0x10(%rsp)
  jmp    L649
L256:
  movss  D377(%rip),%xmm0
  movss  D432(%rip),%xmm6
  movss  %xmm6,0x18(%rsp)
  movss  D118(%rip),%xmm4
  movss  %xmm4,0xc(%rsp)
  movss  %xmm4,0x14(%rsp)
  movss  %xmm4,0x10(%rsp)
  jmp    L649
L264:
  lea    -0x7f(%rax),%ebx
L440:
  call   <ceil@plt>
  cmpb   $0x0,(%r14)
  js     L633
  addss  D377(%rip),%xmm0
  jmp    L715
L633:
  addss  D118(%rip),%xmm0
  jmp    L715
L771:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm1,%xmm7
  movss  %xmm7,0x10(%rsp)
  mov    $0xfffffff0,%ecx
  mov    $0x20,%edi
  mov    $0x1,%esi
  jmp    L537
L475:
  lea    -0x41(%rbx),%eax
  cmp    $0x19,%al
  ja     L339
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm1,%xmm5
  movss  %xmm5,0x10(%rsp)
  movzbl (%r14),%eax
  mov    %eax,%edx
  mov    $0x0,%esi
  test   %al,%al
  jns    L338
  mov    $0x1,%r8d
  mov    $0x0,%esi
  jmp    L564
L339:
  mov    $0x0,%esi
  jmp    L537
L122:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm1,%xmm4
  movss  %xmm4,0x14(%rsp)
  cmp    $0x9,%cl
  ja     L397
L313:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm1,%xmm7
  movss  %xmm7,0x14(%rsp)
L397:
  test   %dl,%dl
  js     L355
  test   %esi,%esi
  jne    L713
L653:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D474(%rip),%xmm1
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm1,%xmm4
  movss  %xmm4,0x14(%rsp)
L713:
  cmp    $0xd,%al
  je     L374
L369:
  cmp    $0x2a,%al
  jne    L200
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm1,%xmm6
  movss  %xmm6,0xc(%rsp)
  mov    $0x1,%ecx
L236:
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  ja     L520
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm1,%xmm5
  movss  %xmm5,0xc(%rsp)
  test   %dl,%dl
  jns    L353
L44:
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D85(%rip),%xmm1
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm1,%xmm2
  movss  %xmm2,0xc(%rsp)
L306:
  movss  0x18(%rsp),%xmm3
  addss  D377(%rip),%xmm3
  movss  %xmm3,0x18(%rsp)
L474:
  add    $0x1,%r12d
  cmp    %r12d,%r15d
  je     L615
  add    $0x1,%rbp
  cmp    %r13d,%r12d
  jg     L277
L620:
  mov    %rbp,%r14
  movzbl 0x0(%rbp),%eax
  mov    %eax,%ebx
  test   %al,%al
  js     L264
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L440
  addss  D421(%rip),%xmm0
L715:
  cmp    $0x20,%bl
  je     L771
  mov    %ebx,%edi
  lea    -0x30(%rbx),%ecx
  cmp    $0x9,%cl
  ja     L475
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm1,%xmm4
  movss  %xmm4,0x10(%rsp)
  mov    $0x1,%esi
L537:
  movzbl (%r14),%eax
  mov    %eax,%edx
  mov    %esi,%r8d
  test   %al,%al
  jns    L722
L564:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  addsd  D474(%rip),%xmm1
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm1,%xmm7
  movss  %xmm7,0x10(%rsp)
L722:
  test   %r8d,%r8d
  jne    L338
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  addsd  D474(%rip),%xmm1
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm1,%xmm6
  movss  %xmm6,0x10(%rsp)
L338:
  cmp    $0x20,%bl
  je     L122
  cmp    $0x9,%cl
  jbe    L313
  sub    $0x61,%edi
  cmp    $0x19,%dil
  ja     L397
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm1,%xmm2
  movss  %xmm2,0x14(%rsp)
  test   %dl,%dl
  jns    L713
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D474(%rip),%xmm1
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm1,%xmm6
  movss  %xmm6,0x14(%rsp)
  jmp    L369
L355:
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  addsd  D474(%rip),%xmm1
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm1,%xmm5
  movss  %xmm5,0x14(%rsp)
  test   %esi,%esi
  je     L653
  jmp    L369
L374:
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm1,%xmm5
  movss  %xmm5,0xc(%rsp)
  mov    $0x1,%ecx
L330:
  cmp    $0x20,%al
  jne    L236
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm1,%xmm3
  movss  %xmm3,0xc(%rsp)
  mov    $0x1,%ecx
L523:
  test   %dl,%dl
  js     L44
  test   %ecx,%ecx
  jne    L353
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D309(%rip),%xmm1
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm1,%xmm7
  movss  %xmm7,0xc(%rsp)
L353:
  cmp    $0x5b,%al
  jne    L306
  cmpl   $0x0,0x1c(%rsp)
  je     L306
  movss  0x18(%rsp),%xmm4
  addss  D432(%rip),%xmm4
  movss  %xmm4,0x18(%rsp)
  jmp    L474
L200:
  cmp    $0x3e,%al
  jne    L740
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm1,%xmm2
  movss  %xmm2,0xc(%rsp)
  mov    $0x1,%ecx
L520:
  lea    -0x41(%rax),%esi
  cmp    $0x19,%sil
  ja     L523
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  D89(%rip),%xmm1
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm1,%xmm6
  movss  %xmm6,0xc(%rsp)
  test   %dl,%dl
  jns    L306
  jmp    L44
L740:
  mov    $0x0,%ecx
  jmp    L330
L147:
  call   <ceil@plt>
  movss  %xmm0,0x24(%rsp)
  movss  0x10(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x1c(%rsp)
  movss  0x14(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x10(%rsp)
  movss  0xc(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x14(%rsp)
  movss  0x18(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0xc(%rsp)
  cmp    %r15d,0x20(%rsp)
  jne    L94
  jmp    L665
L188:
  mov    $0x2,%eax
L282:
  pxor   %xmm2,%xmm2
  cvtss2sd 0x10(%rsp),%xmm2
  movapd %xmm2,%xmm0
  addsd  D424(%rip),%xmm0
  movq   %rbx,%xmm6
  comisd %xmm0,%xmm6
  jb     L554
  movq   %rbp,%xmm5
  comisd %xmm0,%xmm5
  jb     L554
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jb     L554
  movq   %r12,%xmm7
  ucomisd %xmm0,%xmm7
  mov    $0x4,%edx
  cmovae %edx,%eax
L554:
  movq   %rbx,%xmm1
  addsd  D424(%rip),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  comisd %xmm1,%xmm0
  jb     L262
  movq   %rbp,%xmm7
  comisd %xmm1,%xmm7
  jb     L262
  comisd %xmm1,%xmm2
  jb     L262
  movq   %r12,%xmm7
  ucomisd %xmm1,%xmm7
  mov    $0x1,%edx
  cmovae %edx,%eax
L262:
  addsd  D424(%rip),%xmm0
  movq   %rbx,%xmm3
  comisd %xmm0,%xmm3
  jb     L159
  movq   %rbp,%xmm6
  comisd %xmm0,%xmm6
  jb     L159
  comisd %xmm0,%xmm2
  jb     L159
  movq   %r12,%xmm7
  ucomisd %xmm0,%xmm7
  mov    $0x6,%edx
  cmovae %edx,%eax
  jmp    L159
L277:
  call   <ceil@plt>
  movss  %xmm0,0x24(%rsp)
  movss  0x10(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x1c(%rsp)
  movss  0x14(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x10(%rsp)
  movss  0xc(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x14(%rsp)
  movss  0x18(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0xc(%rsp)
L94:
  pxor   %xmm3,%xmm3
  cvtss2sd 0x14(%rsp),%xmm3
  movq   %xmm3,%r12
  movapd %xmm3,%xmm0
  addsd  D424(%rip),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd 0x24(%rsp),%xmm4
  movq   %xmm4,%rbx
  mov    $0x1,%eax
  comisd %xmm0,%xmm4
  jb     L577
  pxor   %xmm1,%xmm1
  cvtss2sd 0x1c(%rsp),%xmm1
  mov    $0x1,%eax
  comisd %xmm0,%xmm1
  jb     L577
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  mov    $0x1,%eax
  comisd %xmm0,%xmm1
  jb     L577
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  comisd %xmm0,%xmm1
  sbb    %eax,%eax
  and    $0xfffffffc,%eax
  add    $0x5,%eax
L577:
  movss  0x1c(%rsp),%xmm6
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm6,%xmm3
  movq   %xmm3,%rbp
  movapd %xmm3,%xmm0
  addsd  D424(%rip),%xmm0
  movq   %rbx,%xmm4
  comisd %xmm0,%xmm4
  jb     L282
  pxor   %xmm1,%xmm1
  cvtss2sd 0x10(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jb     L282
  movss  0x14(%rsp),%xmm3
  comiss %xmm6,%xmm3
  ja     L188
  ucomiss %xmm3,%xmm6
  jp     L282
  jne    L282
  mov    0x20(%rsp),%edx
  mov    %r15d,%esi
  mov    0x28(%rsp),%rdi
  call   <dq4bi@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x5,%eax
  jmp    L282
L615:
  call   <ceil@plt>
  movss  %xmm0,0x24(%rsp)
  movss  0x10(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x1c(%rsp)
  movss  0x14(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x10(%rsp)
  movss  0xc(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0x14(%rsp)
  movss  0x18(%rsp),%xmm0
  call   <ceil@plt>
  movss  %xmm0,0xc(%rsp)
L665:
  cvttss2si 0x14(%rsp),%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  0x10(%rsp),%xmm6
  mov    $0x1,%eax
  comiss %xmm6,%xmm0
  jb     L366
  cvttss2si %xmm6,%edx
  mov    $0x4,%eax
L366:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  0x1c(%rsp),%xmm5
  comiss %xmm5,%xmm0
  jb     L510
  cvttss2si %xmm5,%edx
  mov    $0x2,%eax
L510:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  0x24(%rsp),%xmm7
  comiss %xmm7,%xmm0
  jb     L700
  cvttss2si %xmm7,%edx
  mov    $0x1,%eax
L700:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  ucomiss 0xc(%rsp),%xmm0
  mov    $0x6,%edx
  cmovae %edx,%eax
L159:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D377
datatype: f32
name: unpack_data
arguments: label: D118
datatype: f32
name: unpack_data
arguments: label: D432
datatype: f32
name: unpack_data
arguments: label: D89
datatype: byte[8]
name: unpack_data
arguments: label: D474
datatype: byte[8]
name: unpack_data
arguments: label: D85
datatype: byte[8]
name: unpack_data
arguments: label: D421
datatype: f32
name: unpack_data
arguments: label: D309
datatype: byte[8]
name: unpack_data
arguments: label: D424
datatype: f32[2]

tool: D377: 1

tool: D118: 2

tool: D432: 3

tool: {"D89": [0x55,0x55,0x55,0x55,0x55,0x55,0xe5,0x3f]}

tool: {"D474": [0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x3f]}

tool: {"D85": [0x55,0x55,0x55,0x55,0x55,0x55,0x11,0x40]}

tool: D421: 0.5

tool: {"D309": [0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0x0a,0x40]}

tool: {"D424": [0.0,1.875]}

assistant: ```c
int c1_look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1) {
  float ascii_count, c40_count, text_count, edi_count, byte_count;
  char reduced_char;
  int done, best_scheme, sp;
  if (current_mode == 1) {
    ascii_count = 0.0;
    c40_count = 1.0;
    text_count = 1.0;
    edi_count = 1.0;
    byte_count = 2.0;
  } else {
    ascii_count = 1.0;
    c40_count = 2.0;
    text_count = 2.0;
    edi_count = 2.0;
    byte_count = 3.0;
  }
  switch (current_mode) {
  case 2:
    c40_count = 0.0;
    break;
  case 4:
    text_count = 0.0;
    break;
  case 6:
    byte_count = 0.0;
    break;
  case 5:
    edi_count = 0.0;
    break;
  }
  for (sp = position; (sp < sourcelen) && (sp <= (position + 8)); sp++) {
    if (source[sp] <= 127) {
      reduced_char = source[sp];
    } else {
      reduced_char = source[sp] - 127;
    }
    if ((source[sp] >= '0') && (source[sp] <= '9')) {
      ascii_count += 0.5;
    } else {
      ascii_count = ceil(ascii_count);
      if (source[sp] > 127) {
        ascii_count += 2.0;
      } else {
        ascii_count += 1.0;
      }
    }
    done = 0;
    if (reduced_char == ' ') {
      c40_count += (2.0 / 3.0);
      done = 1;
    }
    if ((reduced_char >= '0') && (reduced_char <= '9')) {
      c40_count += (2.0 / 3.0);
      done = 1;
    }
    if ((reduced_char >= 'A') && (reduced_char <= 'Z')) {
      c40_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] > 127) {
      c40_count += (4.0 / 3.0);
    }
    if (done == 0) {
      c40_count += (4.0 / 3.0);
    }
    done = 0;
    if (reduced_char == ' ') {
      text_count += (2.0 / 3.0);
      done = 1;
    }
    if ((reduced_char >= '0') && (reduced_char <= '9')) {
      text_count += (2.0 / 3.0);
      done = 1;
    }
    if ((reduced_char >= 'a') && (reduced_char <= 'z')) {
      text_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] > 127) {
      text_count += (4.0 / 3.0);
    }
    if (done == 0) {
      text_count += (4.0 / 3.0);
    }
    done = 0;
    if (source[sp] == 13) {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] == '*') {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] == '>') {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] == ' ') {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if ((source[sp] >= '0') && (source[sp] <= '9')) {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if ((source[sp] >= 'A') && (source[sp] <= 'Z')) {
      edi_count += (2.0 / 3.0);
      done = 1;
    }
    if (source[sp] > 127) {
      edi_count += (13.0 / 3.0);
    } else {
      if (done == 0) {
        edi_count += (10.0 / 3.0);
      }
    }
    if (gs1 && (source[sp] == '[')) {
      byte_count += 3.0;
    } else {
      byte_count += 1.0;
    }
  }
  ascii_count = ceil(ascii_count);
  c40_count = ceil(c40_count);
  text_count = ceil(text_count);
  edi_count = ceil(edi_count);
  byte_count = ceil(byte_count);
  best_scheme = 1;
  if (sp == sourcelen) {
    int best_count = (int)edi_count;
    if (text_count <= best_count) {
      best_count = (int)text_count;
      best_scheme = 4;
    }
    if (c40_count <= best_count) {
      best_count = (int)c40_count;
      best_scheme = 2;
    }
    if (ascii_count <= best_count) {
      best_count = (int)ascii_count;
      best_scheme = 1;
    }
    if (byte_count <= best_count) {
      best_scheme = 6;
    }
  } else {
    if (((edi_count + 1.0 <= ascii_count) && (edi_count + 1.0 <= c40_count)) && ((edi_count + 1.0 <= byte_count) && (edi_count + 1.0 <= text_count))) {
      best_scheme = 5;
    }
    if ((c40_count + 1.0 <= ascii_count) && (c40_count + 1.0 <= text_count)) {
      if (c40_count < edi_count) {
        best_scheme = 2;
      } else {
        done = 0;
        if (c40_count == edi_count) {
          if (dq4bi(source, sourcelen, position)) {
            best_scheme = 5;
          } else {
            best_scheme = 2;
          }
        }
      }
    }
    if (((text_count + 1.0 <= ascii_count) && (text_count + 1.0 <= c40_count)) && ((text_count + 1.0 <= byte_count) && (text_count + 1.0 <= edi_count))) {
      best_scheme = 4;
    }
    if (((ascii_count + 1.0 <= byte_count) && (ascii_count + 1.0 <= c40_count)) && ((ascii_count + 1.0 <= text_count) && (ascii_count + 1.0 <= edi_count))) {
      best_scheme = 1;
    }
    if (((byte_count + 1.0 <= ascii_count) && (byte_count + 1.0 <= c40_count)) && ((byte_count + 1.0 <= text_count) && (byte_count + 1.0 <= edi_count))) {
      best_scheme = 6;
    }
  }
  return best_scheme;
}
```