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

```asm
<selectTrade>:
  endbr64
  push   %r15
  lea    0x14(%rdi),%r9
  mov    %rdi,%rcx
  push   %r14
  mov    %r9,%rdx
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  lea    0x74(%rdi),%rsi
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
L8:
  lea    -0x14(%rdx),%rax
L96:
  negl   (%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L96
  lea    0x18(%rax),%rdx
  cmp    %rsi,%rdx
  jne    L8
  xor    %esi,%esi
  cmpl   $0x3,0x14(%rcx)
  lea    0xc(%rsp),%r13
  mov    $0x1,%eax
  je     L158
L185:
  cmp    $0x4,%rax
  je     L154
L120:
  add    $0x18,%rcx
  add    $0x1,%rsi
  add    $0x1,%rax
  cmpl   $0x3,0x14(%rcx)
  jne    L185
L158:
  mov    %esi,%r10d
  mov    %r9,%rdi
  xor    %edx,%edx
  test   %rsi,%rsi
  je     L0
L27:
  mov    (%rdi),%r8d
  add    $0x18,%rdi
  mov    %r8d,0x0(%r13,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r10d
  jg     L27
L0:
  cmp    $0x4,%rax
  je     L154
  mov    %rcx,%rdi
  mov    %rax,%rdx
L217:
  mov    0x2c(%rdi),%r8d
  add    $0x18,%rdi
  mov    %r8d,-0x4(%r13,%rdx,4)
  add    $0x1,%rdx
  cmp    $0x4,%edx
  jne    L217
  jmp    L120
  nopl   (%rax)
L154:
  xor    %r14d,%r14d
  xor    %r15d,%r15d
  mov    0xc(%rsp,%r14,4),%eax
  test   %eax,%eax
  jle    L118
L39:
  xor    %ebp,%ebp
  cmp    %ebx,%r15d
  setge  %bpl
  xor    %esi,%esi
  xor    %edi,%edi
  call   <trade_up@plt>
  add    %r15d,%ebp
  mov    %ebx,%esi
  movslq %ebp,%rbp
  lea    0x0(%rbp,%rbp,2),%rax
  lea    (%r12,%rax,8),%rdi
  call   <setup@plt>
  mov    %ebx,%edi
  call   <data_refresh@plt>
  xor    %eax,%eax
  call   <trade_refresh@plt>
  xor    %edi,%edi
  call   <io_printmap@plt>
  xor    %eax,%eax
  call   <io_printtrade@plt>
L83:
  mov    %ebx,%edx
  mov    %r15d,%esi
  mov    %r13,%rdi
  call   <io_selectTrade@plt>
  xor    %eax,%eax
  call   <io_getkey@plt>
  cmp    $0x4,%eax
  je     L172
  jg     L180
  test   %eax,%eax
  je     L31
  cmp    $0x1,%eax
  jne    L88
  lea    0x1(%r15),%r8d
L147:
  mov    $0xaaaaaaab,%ecx
  mov    %r8,%rax
  imul   %rcx,%r8
  shr    $0x21,%r8
  lea    (%r8,%r8,2),%edx
  sub    %edx,%eax
  movslq %eax,%r14
  mov    %r14,%r15
L88:
  mov    %ebx,%edi
  call   <trade_down@plt>
  mov    0xc(%rsp,%r14,4),%eax
  test   %eax,%eax
  jg     L39
L118:
  mov    %ebx,%edi
  call   <trade_down@plt>
  xor    %edi,%edi
  call   <io_printmap@plt>
  jmp    L83
  nopw   0x0(%rax,%rax,1)
L180:
  cmp    $0x63,%eax
  jne    L177
  mov    $0xffffffff,%r15d
L69:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  add    $0x28,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L177:
  cmp    $0x74,%eax
  jne    L88
L172:
  xor    %eax,%eax
  cmp    %ebx,%r15d
  setge  %al
  add    %eax,%r15d
  jmp    L69
  nopw   0x0(%rax,%rax,1)
L31:
  lea    0x2(%r15),%r8d
  jmp    L147
L65:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int selectTrade(int accepted[4][6], int player) {
  int cursor = 0;
  int i, j, accepted2[3];
  for (i = 0; i < 4; i++)
    for (j = 0; j < 5; j++) {
      accepted[i][j] *= -1;
    }
  for (i = 0; i < 4; i++)
    if (accepted[i][5] == 3) {
      for (j = 0; j < i; j++)
        accepted2[j] = accepted[j][5];
      for (j = i + 1; j < 4; j++)
        accepted2[j - 1] = accepted[j][5];
    }
  while (1) {
    if (accepted2[cursor] > 0) {
      int cursplayer;
      if (cursor >= player)
        cursplayer = cursor + 1;
      else
        cursplayer = cursor;
      trade_up(0, 0);
      setup(accepted[cursplayer], player);
      data_refresh(player);
      trade_refresh();
      io_printmap(0);
      io_printtrade();
    } else {
      trade_down(player);
      io_printmap(0);
    }
    io_selectTrade(accepted2, cursor, player);
    switch (io_getkey()) {
    case 0:
      cursor = (cursor + 2) % 3;
      break;
    case 1:
      cursor = (cursor + 1) % 3;
      break;
    case 4:
    case 't':
      if (cursor >= player)
        cursor++;
      return cursor;
      break;
    case 'c':
      return -1;
    default:
      break;
    }
    trade_down(player);
  }
}
```