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

```asm
<gemoffer>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    %r8,-0x88(%rbp)
  mov    %r9,-0x90(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x98(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0xa0(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  mov    0x28(%rbp),%rax
  mov    %rax,-0xb0(%rbp)
  mov    0x30(%rbp),%rax
  mov    %rax,-0xb8(%rbp)
  mov    0x38(%rbp),%rax
  mov    %rax,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x58(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L124
L115:
  mov    -0x5c(%rbp),%eax
  cltq
  movl   $0x0,-0x50(%rbp,%rax,4)
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
L124:
  mov    -0x5c(%rbp),%eax
  cmp    $0x9,%eax
  jle    L115
  movl   $0xffffffff,-0x54(%rbp)
L260:
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <getint@plt>
  mov    -0x5c(%rbp),%eax
  test   %eax,%eax
  js     L226
  mov    -0x5c(%rbp),%eax
  cmp    $0x9,%eax
  jg     L226
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L221
L226:
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <getint@plt>
  mov    -0x5c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L306
  jmp    L122
L221:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x16,%eax
  jg     L139
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xd,%eax
  jg     L287
L139:
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <getint@plt>
  mov    -0x5c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L306
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L122
L287:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  movslq %ecx,%rax
  imul   $0x4ec4ec4f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  add    %edx,-0x58(%rbp)
  addl   $0x1,-0x54(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x54(%rbp),%eax
  cltq
  mov    %edx,-0x50(%rbp,%rax,4)
L306:
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <valueitem@plt>
  cmp    %eax,-0x58(%rbp)
  jge    L25
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <valueitem@plt>
  mov    %eax,%ecx
  mov    -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L11
L25:
  mov    -0x58(%rbp),%eax
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x5c(%rbp)
  jmp    L283
L182:
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%edx
  lea    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <nameitem@plt>
  mov    -0x5c(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L275
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L271
L275:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L271:
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
L283:
  mov    -0x5c(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jge    L182
  movl   $0xffffffff,-0x5c(%rbp)
L157:
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <getint@plt>
  mov    -0x5c(%rbp),%eax
  test   %eax,%eax
  jne    L35
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <getint@plt>
  mov    -0x5c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L169
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L122
L169:
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x5c(%rbp),%eax
  test   %eax,%eax
  jne    L108
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L122
L108:
  movl   $0x0,-0x5c(%rbp)
  jmp    L145
L181:
  mov    -0x5c(%rbp),%eax
  cltq
  movl   $0x0,-0x50(%rbp,%rax,4)
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
L145:
  mov    -0x5c(%rbp),%eax
  cmp    $0x9,%eax
  jle    L181
  movl   $0xffffffff,-0x54(%rbp)
  jmp    L85
L35:
  mov    -0x5c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L85
  movl   $0x0,-0x5c(%rbp)
  jmp    L143
L171:
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
L143:
  mov    -0x5c(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jge    L171
  mov    -0x90(%rbp),%r8
  mov    -0x88(%rbp),%rdi
  mov    -0x80(%rbp),%rcx
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    -0x68(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x0
  push   $0x1
  push   $0x0
  push   -0xc0(%rbp)
  push   -0xb8(%rbp)
  push   -0xb0(%rbp)
  push   -0xa8(%rbp)
  push   -0xa0(%rbp)
  push   -0x98(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <treasure@plt>
  add    $0x50,%rsp
L85:
  mov    -0x5c(%rbp),%eax
  test   %eax,%eax
  js     L157
L11:
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <valueitem@plt>
  cmp    %eax,-0x58(%rbp)
  jl     L260
L122:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L155
  call   <__stack_chk_fail@plt>
L155:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D119
datatype: string
name: read_data
arguments: data_label: D0
datatype: string
name: read_data
arguments: data_label: D76
datatype: string
name: read_data
arguments: data_label: D128
datatype: string
name: read_data
arguments: data_label: D124
datatype: string
name: read_data
arguments: data_label: D12
datatype: string
name: read_data
arguments: data_label: D58
datatype: string
name: read_data
arguments: data_label: D73
datatype: string
name: read_data
arguments: data_label: D83
datatype: string
name: read_data
arguments: data_label: D70
datatype: string
name: read_data
arguments: data_label: D112
datatype: string

tool: D119: 'What gem do you want to offer?'

tool: D0: 'Are you kidding me? Do you want to abort the trade?'
[0]: No
[1]: Yes

tool: D76: 'That's not a gem! Do you want to abort the trade?'
[0]: No
[1]: Yes

tool: D128: You aborted the trade.

tool: D124: 'My item is valued %d gems and you offer is worth %d gems.'


tool: D12: 'I'm satisfied with your offer of %d gems:

tool: D58:  %s gems.'


tool: D73:  %s gems,

tool: D83: 'Do you accept the trade?'
[0]: No
[1]: Yes

tool: D70: 'Do you want to abort the trade?'
[0]: No
[1]: Yes

tool: D112: 'Do you want to propose another offer?'
[0]: No
[1]: Yes

assistant: ```c
void gemoffer(int *hpmax, int *hpnow, int *aces, int *inv, int *slave, int *future, int *map, int *loot, int *vision, int *end, int *pos, int *antimag) {
  int value = 0;
  int k;
  int offgem[10];
  for (k = 0; k < 10; k++) {
    offgem[k] = 0;
  }
  char s[20];
  int p = -1;
  do {
    printf("'What gem do you want to offer?'\n");
    getint(&k);
    if ((k < 0) || (k >= 10) || (*(inv + k) == 0)) {
      printf("'Are you kidding me? Do you want to abort the trade?'\n[0]: No\n[1]: Yes\n");
      getint(&k);
      if (k == 1)
        return;
    } else if ((*(inv + k) > 22) || (*(inv + k) < 14)) {
      printf("'That's not a gem! Do you want to abort the trade?'\n[0]: No\n[1]: Yes\n");
      getint(&k);
      if (k == 1) {
        printf("You aborted the trade.\n");
        return;
      }
    } else {
      value += *(inv + k) % 13;
      p++;
      offgem[p] = *(inv + k);
    }
    if (value < valueitem(*(loot + *pos)))
      printf("'My item is valued %d gems and you offer is worth %d gems.'\n", valueitem(*(loot + *pos)), value);
    else {
      printf("'I'm satisfied with your offer of %d gems:", value);
      for (k = 0; k <= p; k++) {
        nameitem(s, offgem[k]);
        if (k == p) {
          printf(" %s gems.'\n", s);
        } else {
          printf(" %s gems,", s);
        }
      }
      k = -1;
      do {
        printf("'Do you accept the trade?'\n[0]: No\n[1]: Yes\n");
        getint(&k);
        if (k == 0) {
          printf("'Do you want to abort the trade?'\n[0]: No\n[1]: Yes\n");
          getint(&k);
          if (k == 1) {
            printf("You aborted the trade.\n");
            return;
          }
          printf("'Do you want to propose another offer?'\n[0]: No\n[1]: Yes\n");
          if (k == 0) {
            printf("You aborted the trade.\n");
            return;
          }
          for (k = 0; k < 10; k++) {
            offgem[k] = 0;
          }
          p = -1;
        } else if (k == 1) {
          for (k = 0; k <= p; k++) {
            *(inv + offgem[k]) = 0;
          }
          treasure(hpmax, hpnow, aces, inv, slave, future, map, loot, vision, end, pos, antimag, 0, 1, 0);
        }
      } while (k < 0);
    }
  } while (value < valueitem(*(loot + *pos)));
}
```