user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<write_pass_one>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,-0x6c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x60(%rbp),%rax
  lea    D62(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L56
  cmpl   $0x2,-0x6c(%rbp)
  je     L64
  mov    $0x0,%eax
  jmp    L122
L64:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rsi
  lea    -0x40(%rbp),%rax
  mov    $0xffffffff,%ecx
  mov    $0x80000000,%edx
  mov    %rax,%rdi
  call   <translate_num@plt>
  mov    %eax,-0x44(%rbp)
  cmpl   $0xffffffff,-0x44(%rbp)
  jne    L0
  mov    $0x0,%eax
  jmp    L122
L0:
  mov    -0x40(%rbp),%rax
  cmp    $0xffff,%rax
  jg     L135
  mov    -0x40(%rbp),%rax
  test   %rax,%rax
  jns    L81
L135:
  mov    -0x40(%rbp),%rax
  cmp    $0xffffffffffff8000,%rax
  jl     L7
  mov    -0x40(%rbp),%rax
  cmp    $0x7fff,%rax
  jg     L7
L81:
  lea    D7(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D35(%rip),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rdi
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D87(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  jmp    L105
L7:
  lea    D25(%rip),%rax
  mov    %rax,-0x38(%rbp)
  lea    D84(%rip),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x40(%rbp),%rax
  sar    $0x10,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x28(%rbp),%rsi
  mov    -0x38(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rsi,%r8
  lea    D121(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x40(%rbp),%rax
  and    $0xffff,%eax
  mov    %rax,-0x20(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x20(%rbp),%rdi
  mov    -0x30(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D87(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
L105:
  mov    $0x2,%eax
  jmp    L122
L56:
  mov    -0x60(%rbp),%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L54
  cmpl   $0x3,-0x6c(%rbp)
  je     L89
  mov    $0x0,%eax
  jmp    L122
L89:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rcx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rcx,%r9
  mov    %rdx,%r8
  lea    D38(%rip),%rdx
  mov    %rdx,%rcx
  lea    D98(%rip),%rdx
  lea    D93(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x68(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%r9
  lea    D35(%rip),%r8
  lea    D38(%rip),%rdx
  mov    %rdx,%rcx
  lea    D85(%rip),%rdx
  lea    D93(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    $0x2,%eax
  jmp    L122
L54:
  mov    -0x6c(%rbp),%ecx
  mov    -0x68(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <write_inst_string@plt>
  mov    $0x1,%eax
L122:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L139
  call   <__stack_chk_fail@plt>
L139:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D62
type_guessed: string
name: read_data
arguments: tag: D7
type_guessed: string
name: read_data
arguments: tag: D35
type_guessed: string
name: read_data
arguments: tag: D87
type_guessed: string
name: read_data
arguments: tag: D25
type_guessed: string
name: read_data
arguments: tag: D84
type_guessed: string
name: read_data
arguments: tag: D121
type_guessed: string
name: read_data
arguments: tag: D19
type_guessed: string
name: read_data
arguments: tag: D38
type_guessed: string
name: read_data
arguments: tag: D98
type_guessed: string
name: read_data
arguments: tag: D93
type_guessed: string
name: read_data
arguments: tag: D85
type_guessed: string

tool: D62: li

tool: D7: addiu

tool: D35: $zero

tool: D87: %s %s %s %ld


tool: D25: lui

tool: D84: ori

tool: D121: %s %s %ld


tool: D19: blt

tool: D38: $at

tool: D98: slt

tool: D93: %s %s %s %s


tool: D85: bne

assistant: ```c
unsigned write_pass_one(FILE *output, const char *name, char **args, int num_args) {
  if (strcmp(name, "li") == 0) {
    if (num_args != 2) {
      return 0;
    }
    long int immediate;
    int result = translate_num(&immediate, args[1], -2147483648, 4294967295);
    if (result == -1)
      return 0;
    if ((immediate <= 65535 && immediate >= 0) || (immediate >= -32768 && immediate <= 32767)) {
      char *instr = "addiu";
      char *zero_reg = "$zero";
      fprintf(output, "%s %s %s %ld\n", instr, args[0], zero_reg, immediate);
    } else {
      char *loadUpper = "lui";
      char *loadLower = "ori";
      long int topBits = immediate >> 16;
      fprintf(output, "%s %s %ld\n", loadUpper, args[0], topBits);
      long int lowBits = immediate & 0xffff;
      fprintf(output, "%s %s %s %ld\n", loadLower, args[0], args[0], lowBits);
    }
    return 2;
  } else if (strcmp(name, "blt") == 0) {
    if (num_args != 3) {
      return 0;
    }
    fprintf(output, "%s %s %s %s\n", "slt", "$at", args[0], args[1]);
    fprintf(output, "%s %s %s %s\n", "bne", "$at", "$zero", args[2]);
    return 2;
  } else {
    write_inst_string(output, name, args, num_args);
    return 1;
  }
}
```