user: 这段汇编代码用C语言表示是什么样的？

```asm
<estimate_binary_length>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  movl   $0x0,-0xc(%rbp)
  movb   $0x0,-0x11(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  je     L241
  addl   $0x4,-0xc(%rbp)
L241:
  cmpl   $0x3,-0x34(%rbp)
  je     L253
  addl   $0xc,-0xc(%rbp)
L253:
  movl   $0x0,-0x10(%rbp)
  jmp    L19
L238:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x11(%rbp)
  je     L79
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4e,%eax
  je     L175
  cmp    $0x4e,%eax
  jg     L79
  cmp    $0x4b,%eax
  je     L34
  cmp    $0x4b,%eax
  jg     L79
  cmp    $0x41,%eax
  je     L6
  cmp    $0x42,%eax
  je     L27
  jmp    L79
L34:
  addl   $0x10,-0xc(%rbp)
  movb   $0x4b,-0x11(%rbp)
  jmp    L79
L27:
  addl   $0x14,-0xc(%rbp)
  movb   $0x42,-0x11(%rbp)
  jmp    L79
L6:
  addl   $0x11,-0xc(%rbp)
  movb   $0x41,-0x11(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L79
L175:
  addl   $0x12,-0xc(%rbp)
  movb   $0x4e,-0x11(%rbp)
  movl   $0x0,-0x4(%rbp)
  nop
L79:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4e,%eax
  je     L224
  cmp    $0x4e,%eax
  jg     L128
  cmp    $0x4b,%eax
  je     L134
  cmp    $0x4b,%eax
  jg     L128
  cmp    $0x41,%eax
  je     L72
  cmp    $0x42,%eax
  je     L297
  jmp    L128
L134:
  addl   $0xd,-0xc(%rbp)
  jmp    L128
L297:
  addl   $0x8,-0xc(%rbp)
  jmp    L128
L72:
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L178
  addl   $0x5,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L128
L178:
  addl   $0x6,-0xc(%rbp)
  jmp    L128
L224:
  addl   $0x1,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L143
  addl   $0x3,-0xc(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L108
L143:
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L246
  addl   $0x3,-0xc(%rbp)
  jmp    L108
L246:
  addl   $0x4,-0xc(%rbp)
L108:
  nop
L128:
  addl   $0x1,-0x10(%rbp)
L19:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L238
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int estimate_binary_length(char mode[], int length, int gs1, int eci) {
  int i, count = 0;
  char current = 0;
  int a_count = 0;
  int n_count = 0;
  if (gs1) {
    count += 4;
  }
  if (eci != 3) {
    count += 12;
  }
  for (i = 0; i < length; i++) {
    if (mode[i] != current) {
      switch (mode[i]) {
      case 'K':
        count += 12 + 4;
        current = 'K';
        break;
      case 'B':
        count += 16 + 4;
        current = 'B';
        break;
      case 'A':
        count += 13 + 4;
        current = 'A';
        a_count = 0;
        break;
      case 'N':
        count += 14 + 4;
        current = 'N';
        n_count = 0;
        break;
      }
    }
    switch (mode[i]) {
    case 'K':
      count += 13;
      break;
    case 'B':
      count += 8;
      break;
    case 'A':
      a_count++;
      if ((a_count & 1) == 0) {
        count += 5;
        a_count = 0;
      } else
        count += 6;
      break;
    case 'N':
      n_count++;
      if ((n_count % 3) == 0) {
        count += 3;
        n_count = 0;
      } else if ((n_count & 1) == 0)
        count += 3;
      else
        count += 4;
      break;
    }
  }
  return count;
}
```