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

```asm
<write_pass_one>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %ecx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D81(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L12
  cmp    $0x2,%ebp
  je     L5
L59:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L113
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L5:
  mov    0x8(%r12),%rsi
  mov    %rsp,%rdi
  mov    $0xffffffff,%ecx
  mov    $0x80000000,%edx
  call   <translate_num@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  cmp    $0xffffffff,%edx
  je     L59
  mov    (%rsp),%r9
  cmp    $0xffff,%r9
  jbe    L90
  lea    0x8000(%r9),%rax
  cmp    $0xffff,%rax
  ja     L72
L90:
  lea    D123(%rip),%r8
  mov    (%r12),%rcx
  lea    D24(%rip),%rdx
  lea    D105(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    $0x2,%eax
  jmp    L59
L72:
  mov    %r9,%r8
  sar    $0x10,%r8
  mov    (%r12),%rcx
  lea    D11(%rip),%rdx
  lea    D132(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    (%r12),%rcx
  movzwl (%rsp),%r9d
  mov    %rcx,%r8
  lea    D69(%rip),%rdx
  lea    D105(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    $0x2,%eax
  jmp    L59
L12:
  lea    D42(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L50
  cmp    $0x3,%ebp
  jne    L59
  mov    0x8(%r12),%r9
  mov    (%r12),%r8
  lea    D46(%rip),%rbp
  mov    %rbp,%rcx
  lea    D39(%rip),%rdx
  lea    D98(%rip),%rbx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
  mov    0x10(%r12),%r9
  lea    D123(%rip),%r8
  mov    %rbp,%rcx
  lea    D53(%rip),%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    $0x2,%eax
  jmp    L59
L50:
  mov    %ebp,%ecx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <write_inst_string@plt>
  mov    $0x1,%eax
  jmp    L59
L113:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D81
type: string
name: read_data
arguments: data_label: D123
type: string
name: read_data
arguments: data_label: D24
type: string
name: read_data
arguments: data_label: D105
type: string
name: read_data
arguments: data_label: D11
type: string
name: read_data
arguments: data_label: D132
type: string
name: read_data
arguments: data_label: D69
type: string
name: read_data
arguments: data_label: D42
type: string
name: read_data
arguments: data_label: D46
type: string
name: read_data
arguments: data_label: D39
type: string
name: read_data
arguments: data_label: D98
type: string
name: read_data
arguments: data_label: D53
type: string

tool: D81: li

tool: D123: $zero

tool: D24: addiu

tool: D105: %s %s %s %ld


tool: D11: lui

tool: D132: %s %s %ld


tool: D69: ori

tool: D42: blt

tool: D46: $at

tool: D39: slt

tool: D98: %s %s %s %s


tool: D53: 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;
  }
}
```