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

```asm
<do_translation>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,0x8(%rsp)
  call   <next_char@plt>
  test   %eax,%eax
  js     L94
  mov    %eax,%r13d
  xor    %r9d,%r9d
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L0
  nopl   0x0(%rax,%rax,1)
L175:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L228
  cmp    $0x3b,%r13d
  jne    L228
  cmp    $0x2,%ebp
  je     L332
  cmp    $0x1,%ebp
  je     L104
  xor    %ebp,%ebp
  mov    $0x2,%ebx
  nopw   0x0(%rax,%rax,1)
L60:
  mov    %r12,%rdi
  call   <next_char@plt>
  test   %eax,%eax
  js     L12
L256:
  mov    %r13d,%r9d
  mov    %eax,%r13d
L0:
  test   %ebx,%ebx
  je     L175
  cmp    $0x1,%ebx
  je     L83
  cmp    $0x2,%ebx
  je     L85
  cmp    $0x3,%ebx
  jne    L60
  cmp    $0x3b,%r13d
  je     L105
  xor    %ebx,%ebx
  test   %ebp,%ebp
  sete   %bl
  xor    %ebp,%ebp
L284:
  mov    %r13d,%eax
  mov    %r9d,%r13d
  jmp    L256
  nopl   0x0(%rax)
L228:
  cmp    $0x1,%ebp
  je     L74
  cmp    $0x2,%ebp
  je     L312
L201:
  mov    %r13d,%edi
  call   <translate_char@plt>
  test   %eax,%eax
  js     L370
L64:
  movsbl %al,%edi
  mov    %r15d,%edx
  mov    %r14,%rsi
  xor    %ebp,%ebp
  call   <send_char@plt>
  mov    %r12,%rdi
  call   <next_char@plt>
  test   %eax,%eax
  jns    L256
  nopw   0x0(%rax,%rax,1)
L12:
  test   %ebx,%ebx
  je     L49
  cmp    $0x2,%ebx
  je     L84
L94:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L83:
  cmp    $0x3b,%r13d
  je     L326
  movsbl %r13b,%edi
  mov    %r15d,%edx
  mov    %r14,%rsi
  call   <send_char@plt>
  jmp    L60
  nopw   0x0(%rax,%rax,1)
L85:
  mov    $0x3,%ebx
  cmp    $0x3b,%r13d
  je     L60
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x3b,%edi
  mov    %r9d,0xc(%rsp)
  call   <send_char@plt>
  mov    %ebp,%ebx
  mov    0xc(%rsp),%r9d
  jmp    L284
L326:
  mov    $0x1,%ebp
  mov    $0x2,%ebx
  jmp    L60
  nop
L370:
  mov    $0x2,%ebp
  cmp    $0xfffffffe,%eax
  je     L60
  xor    %ebp,%ebp
  cmp    $0xfffffffd,%eax
  sete   %bpl
  jmp    L60
  nopl   0x0(%rax)
L104:
  cmp    $0x4a,%r9d
  mov    $0x39,%eax
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x19,%edi
  mov    $0x2,%ebx
  cmovne %eax,%edi
  xor    %ebp,%ebp
  call   <send_char@plt>
  jmp    L60
  nopl   0x0(%rax,%rax,1)
L312:
  mov    %r13d,%eax
  mov    %r9d,%edi
  and    $0xffffffdf,%eax
  cmp    $0x48,%eax
  jne    L166
  call   <translate_char_and_h_suffix@plt>
  test   %eax,%eax
  jns    L64
  jmp    L201
L166:
  call   <translate_char_without_h_suffix@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  movsbl %al,%edi
  call   <send_char@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
L105:
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x3b,%edi
  mov    %ebp,%ebx
  call   <send_char@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x3b,%edi
  call   <send_char@plt>
  jmp    L60
  nopw   0x0(%rax,%rax,1)
L332:
  mov    %r9d,%edi
  mov    $0x2,%ebx
  xor    %ebp,%ebp
  call   <translate_char_without_h_suffix@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  movsbl %al,%edi
  call   <send_char@plt>
  jmp    L60
  nopw   0x0(%rax,%rax,1)
L74:
  mov    %r13d,%esi
  mov    %r9d,%edi
  mov    %r9d,0xc(%rsp)
  call   <translate_j_and_char@plt>
  test   %eax,%eax
  jns    L64
  mov    0xc(%rsp),%r9d
  mov    $0x19,%edi
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x39,%eax
  cmp    $0x4a,%r9d
  cmovne %eax,%edi
  call   <send_char@plt>
  jmp    L201
  cs nopw 0x0(%rax,%rax,1)
L49:
  cmp    $0x2,%ebp
  je     L323
  cmp    $0x1,%ebp
  jne    L94
  cmp    $0x4a,%r13d
  mov    $0x19,%edi
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x39,%eax
  cmovne %eax,%edi
L195:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <send_char@plt>
  nopl   0x0(%rax,%rax,1)
L84:
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    $0x3b,%edi
  jmp    L195
  nopl   (%rax)
L323:
  mov    %r13d,%edi
  call   <translate_char_without_h_suffix@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  movsbl %al,%edi
  jmp    L195
```

assistant: ```c
void do_translation(FILE *input_stream, int with_latin_escapes, FILE *output_stream, int output_encoding) {
  const int NORMAL = 0;
  const int AS_IS = 1;
  const int AFTER_SWITCH_CHAR = 2;
  const int AFTER_2_SWITCH_CHARS = 3;
  const int AFTER_J_PREFIX = 1;
  const int BEFORE_H_SUFFIX = 2;
  int state = NORMAL, substate = NORMAL;
  int c, prev_c = 0;
  c = next_char(input_stream);
  for (;;) {
    if (c < 0) {
      break;
    }
    if (state == NORMAL) {
      if (with_latin_escapes && c == ';') {
        if (substate == BEFORE_H_SUFFIX) {
          send_char((translate_char_without_h_suffix(prev_c)), output_stream, output_encoding);
        } else if (substate == AFTER_J_PREFIX) {
          send_char((prev_c == 'J' ? 0x419 : 0x439), output_stream, output_encoding);
        }
        substate = NORMAL;
        state = AFTER_SWITCH_CHAR;
      } else {
        int translated = -1;
        if (substate == AFTER_J_PREFIX) {
          translated = translate_j_and_char(prev_c, c);
          if (translated < 0) {
            send_char((prev_c == 'J' ? 0x419 : 0x439), output_stream, output_encoding);
          }
        } else if (substate == BEFORE_H_SUFFIX) {
          if (c == 'H' || c == 'h') {
            translated = translate_char_and_h_suffix(prev_c);
          } else {
            send_char((translate_char_without_h_suffix(prev_c)), output_stream, output_encoding);
          }
        }
        substate = NORMAL;
        if (translated < 0) {
          translated = translate_char(c);
          if (translated < 0) {
            if (translated == -2) {
              substate = BEFORE_H_SUFFIX;
            } else if (translated == -3) {
              substate = AFTER_J_PREFIX;
            }
          }
        }
        if (translated >= 0) {
          send_char((translated), output_stream, output_encoding);
        }
      }
    } else if (state == AS_IS) {
      if (c == ';') {
        substate = AS_IS;
        state = AFTER_SWITCH_CHAR;
      } else {
        send_char((c), output_stream, output_encoding);
      }
    } else if (state == AFTER_SWITCH_CHAR) {
      if (c == ';') {
        state = AFTER_2_SWITCH_CHARS;
      } else {
        send_char((';'), output_stream, output_encoding);
        state = substate;
        continue;
      }
    } else if (state == AFTER_2_SWITCH_CHARS) {
      if (c != ';') {
        state = (substate == NORMAL) ? AS_IS : NORMAL;
        substate = NORMAL;
        continue;
      } else {
        send_char((';'), output_stream, output_encoding);
        send_char((';'), output_stream, output_encoding);
        state = substate;
      }
    }
    prev_c = c;
    c = next_char(input_stream);
  }
  if (state == NORMAL) {
    if (substate == BEFORE_H_SUFFIX) {
      send_char((translate_char_without_h_suffix(prev_c)), output_stream, output_encoding);
    } else if (substate == AFTER_J_PREFIX) {
      send_char((prev_c == 'J' ? 0x419 : 0x439), output_stream, output_encoding);
    }
  } else if (state == AFTER_SWITCH_CHAR) {
    send_char((';'), output_stream, output_encoding);
  }
}
```