user: What is the c source code of the assembly code below?

```asm
<removemost>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  mov    %rdx,%rdi
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <checkpositiveace@plt>
  test   %rax,%rax
  je     L100
  cmpl   $0x1,0x4(%rbx)
  je     L134
  cmpl   $0x1,(%rbx)
  je     L79
  cmpl   $0x1,0x8(%rbx)
  je     L77
  cmpl   $0x1,0xc(%rbx)
  je     L126
L100:
  mov    %rbp,%rdi
  call   <checkpositiveinv@plt>
  test   %eax,%eax
  je     L123
  mov    %rbp,%rdi
  mov    %rsp,%r12
  call   <mostvalueinv@plt>
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  call   <nameitem@plt>
  mov    %r12,%rsi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movl   $0x0,0x0(%rbp)
L75:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L123:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  lea    D23(%rip),%rdi
L57:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10c0 <puts@plt>
  nopw   0x0(%rax,%rax,1)
L77:
  movl   $0x0,0x8(%rbx)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  lea    D48(%rip),%rdi
  jmp    L57
L126:
  movl   $0x0,0xc(%rbx)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  lea    D40(%rip),%rdi
  jmp    L57
L134:
  movl   $0x0,0x4(%rbx)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  lea    D53(%rip),%rdi
  jmp    L57
L79:
  movl   $0x0,(%rbx)
  lea    D49(%rip),%rdi
  call   <puts@plt>
  mov    0x0(%r13),%eax
  lea    -0x5(%rax),%edi
  mov    %edi,0x0(%r13)
  mov    (%r12),%esi
  call   <min@plt>
  mov    %eax,(%r12)
  jmp    L75
L127:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D9
type_infered: string
name: disassemble_data
arguments: label: D23
type_infered: string
name: disassemble_data
arguments: label: D48
type_infered: string
name: disassemble_data
arguments: label: D40
type_infered: string
name: disassemble_data
arguments: label: D53
type_infered: string
name: disassemble_data
arguments: label: D49
type_infered: string

tool: D9: 'Not bad, I will take your %s.'
The black priestess disappears!


tool: D23: 'Damn, your bag is empty!'
The black priestess disappears!

tool: D48: 'Nice, I will take your Scepter of Leynos.'
The black priestess disappears!

tool: D40: 'Nice, I will take your Bracelet of Armok.'
The black priestess disappears!

tool: D53: 'Nice, I will take your Bag of Meres.'
The black priestess disappears!

tool: D49: 'Nice, I will take your Ruby of Gaza.'
The black priestess disappears!

assistant: ```c
void removemost(int *hpmax, int *hpnow, int *aces, int *inv) {
  if (checkpositiveace(aces)) {
    if (*(aces + 1) == 1) {
      *(aces + 1) = 0;
      printf("'Nice, I will take your Bag of Meres.'\nThe black priestess disappears!\n");
      return;
    }
    if (*(aces) == 1) {
      *(aces) = 0;
      printf("'Nice, I will take your Ruby of Gaza.'\nThe black priestess disappears!\n");
      *hpmax = *hpmax - 5;
      *hpnow = min(*hpmax, *hpnow);
      return;
    }
    if (*(aces + 2) == 1) {
      *(aces + 2) = 0;
      printf("'Nice, I will take your Scepter of Leynos.'\nThe black priestess disappears!\n");
      return;
    }
    if (*(aces + 3) == 1) {
      *(aces + 3) = 0;
      printf("'Nice, I will take your Bracelet of Armok.'\nThe black priestess disappears!\n");
      return;
    }
  }
  if (!checkpositiveinv(inv)) {
    printf("'Damn, your bag is empty!'\nThe black priestess disappears!\n");
    return;
  }
  int p = mostvalueinv(inv);
  if (p = 0) {
    printf("'I can't take anything from you!'\nThe black priestess disappears!\n");
    return;
  }
  char s[20];
  nameitem(s, *(inv + p));
  printf("'Not bad, I will take your %s.'\nThe black priestess disappears!\n", s);
  *(inv + p) = 0;
}
```