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

```asm
<hpgs_parse_papersize>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  lea    D135(%rip),%rsi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L212
  mov    D174(%rip),%rax
  mov    %rax,(%r12)
  mov    D276(%rip),%rax
  mov    %rax,0x0(%rbp)
  xor    %eax,%eax
L138:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L110
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L212:
  lea    D108(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L56
  mov    D276(%rip),%rax
  mov    %rax,(%r12)
  mov    D136(%rip),%rax
  mov    %rax,0x0(%rbp)
  xor    %eax,%eax
  jmp    L138
  cs nopw 0x0(%rax,%rax,1)
L56:
  lea    D59(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L97
  mov    D136(%rip),%rax
  mov    %rax,(%r12)
  mov    D53(%rip),%rax
  mov    %rax,0x0(%rbp)
  xor    %eax,%eax
  jmp    L138
  nopl   0x0(%rax)
L97:
  lea    D192(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L214
  mov    D53(%rip),%rax
  mov    %rax,(%r12)
  mov    D9(%rip),%rax
  mov    %rax,0x0(%rbp)
  xor    %eax,%eax
  jmp    L138
  nopl   0x0(%rax)
L214:
  lea    D32(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L85
  mov    D9(%rip),%rax
  mov    %rax,(%r12)
  mov    D261(%rip),%rax
  mov    %rax,0x0(%rbp)
  xor    %eax,%eax
  jmp    L138
L85:
  lea    D291(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L48
  mov    D174(%rip),%rax
  mov    %rax,0x0(%rbp)
  mov    D276(%rip),%rax
  mov    %rax,(%r12)
  xor    %eax,%eax
  jmp    L138
L48:
  lea    D271(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L95
  mov    D276(%rip),%rax
  mov    %rax,0x0(%rbp)
  mov    D136(%rip),%rax
  mov    %rax,(%r12)
  xor    %eax,%eax
  jmp    L138
L110:
  call   <__stack_chk_fail@plt>
L95:
  lea    D163(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L8
  mov    D136(%rip),%rax
  mov    %rax,0x0(%rbp)
  mov    D53(%rip),%rax
  mov    %rax,(%r12)
  xor    %eax,%eax
  jmp    L138
L8:
  lea    D277(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L36
  mov    D53(%rip),%rax
  mov    %rax,0x0(%rbp)
  mov    D9(%rip),%rax
  mov    %rax,(%r12)
  xor    %eax,%eax
  jmp    L138
L36:
  lea    D6(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L49
  mov    D9(%rip),%rax
  mov    %rax,0x0(%rbp)
  mov    D261(%rip),%rax
  mov    %rax,(%r12)
  xor    %eax,%eax
  jmp    L138
L49:
  mov    $0x78,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L106
  sub    %rbx,%r13
  mov    %r13d,%edx
  cmp    $0x1f,%r13d
  jg     L106
  mov    %rsp,%r14
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  movslq %r13d,%rax
  mov    %r12,%rsi
  mov    %r14,%rdi
  movb   $0x0,(%rsp,%rax,1)
  call   <hpgs_parse_length@plt>
  test   %rax,%rax
  jne    L106
  lea    0x1(%r13),%eax
  mov    %rbp,%rsi
  cltq
  lea    (%rbx,%rax,1),%rdi
  call   <hpgs_parse_length@plt>
  test   %rax,%rax
  je     L138
L106:
  or     $0xffffffff,%eax
  jmp    L138
```

tool_calls: name: read_data
arguments: label: D135
type: string
name: read_data
arguments: label: D174
type: f64
name: read_data
arguments: label: D276
type: f64
name: read_data
arguments: label: D108
type: string
name: read_data
arguments: label: D136
type: f64
name: read_data
arguments: label: D59
type: string
name: read_data
arguments: label: D53
type: f64
name: read_data
arguments: label: D192
type: string
name: read_data
arguments: label: D9
type: f64
name: read_data
arguments: label: D32
type: string
name: read_data
arguments: label: D261
type: f64
name: read_data
arguments: label: D291
type: string
name: read_data
arguments: label: D271
type: string
name: read_data
arguments: label: D163
type: string
name: read_data
arguments: label: D277
type: string
name: read_data
arguments: label: D6
type: string

tool: D135: A4

tool: D174: 595.9108454553883

tool: D276: 842.7451996082275

tool: D108: A3

tool: D136: 1191.8216909107766

tool: D59: A2

tool: D53: 1685.490399216455

tool: D192: A1

tool: D9: 2383.6433818215532

tool: D32: A0

tool: D261: 3370.98079843291

tool: D291: A4l

tool: D271: A3l

tool: D163: A2l

tool: D277: A1l

tool: D6: A0l

assistant: ```c
int hpgs_parse_papersize(const char *str, double *pt_width, double *pt_height) {
  if (strcmp(str, "A4") == 0) {
    *pt_width = 595.91084545538825881889;
    *pt_height = 842.74519960822752756850;
  } else if (strcmp(str, "A3") == 0) {
    *pt_width = 842.74519960822752756850;
    *pt_height = 1191.82169091077651766614;
  } else if (strcmp(str, "A2") == 0) {
    *pt_width = 1191.82169091077651766614;
    *pt_height = 1685.49039921645505516535;
  } else if (strcmp(str, "A1") == 0) {
    *pt_width = 1685.49039921645505516535;
    *pt_height = 2383.64338182155303536062;
  } else if (strcmp(str, "A0") == 0) {
    *pt_width = 2383.64338182155303536062;
    *pt_height = 3370.98079843291011035905;
  } else if (strcmp(str, "A4l") == 0) {
    *pt_height = 595.91084545538825881889;
    *pt_width = 842.74519960822752756850;
  } else if (strcmp(str, "A3l") == 0) {
    *pt_height = 842.74519960822752756850;
    *pt_width = 1191.82169091077651766614;
  } else if (strcmp(str, "A2l") == 0) {
    *pt_height = 1191.82169091077651766614;
    *pt_width = 1685.49039921645505516535;
  } else if (strcmp(str, "A1l") == 0) {
    *pt_height = 1685.49039921645505516535;
    *pt_width = 2383.64338182155303536062;
  } else if (strcmp(str, "A0l") == 0) {
    *pt_height = 2383.64338182155303536062;
    *pt_width = 3370.98079843291011035905;
  } else {
    const char *x = strchr(str, 'x');
    char wstr[32];
    int l;
    if (!x)
      return -1;
    l = x - str;
    if (l > 31)
      return -1;
    strncpy(wstr, str, l);
    wstr[l] = '\0';
    if (hpgs_parse_length(wstr, pt_width))
      return -1;
    if (hpgs_parse_length(str + l + 1, pt_height))
      return -1;
  }
  return 0;
}
```