user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x190,%edx
  xor    %esi,%esi
  push   %r14
  lea    D9(%rip),%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1e8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1d8(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rbx
  mov    %rbx,%rdi
  call   <memset@plt>
  lea    0xc(%rsp),%rsi
  mov    %r14,%rdi
  movl   $0x1,0x40(%rsp)
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L170
  mov    $0x1,%ebp
  xor    %r13d,%r13d
  lea    0x10(%rsp),%r15
  nopl   0x0(%rax)
L92:
  lea    (%r15,%rbp,4),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    (%r15,%rbp,4),%r12d
  mov    0xc(%rsp),%eax
  add    $0x1,%rbp
  add    %r13d,%r12d
  movslq %r12d,%r13
  cmp    %ebp,%eax
  jge    L92
  test   %eax,%eax
  jle    L20
  test   %r13d,%r13d
  js     L45
  sub    $0x1,%eax
  lea    0x14(%rsp),%rsi
  lea    0x18(%rsp,%rax,4),%rdi
  nopl   0x0(%rax,%rax,1)
L100:
  mov    %r13,%rax
  nopl   0x0(%rax,%rax,1)
L93:
  mov    (%rbx,%rax,4),%ecx
  test   %ecx,%ecx
  je     L1
  mov    (%rsi),%edx
  add    %eax,%edx
  movslq %edx,%rdx
  add    %ecx,0x40(%rsp,%rdx,4)
L1:
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L93
  add    $0x4,%rsi
  cmp    %rdi,%rsi
  jne    L100
L130:
  xor    %ebp,%ebp
  lea    D22(%rip),%r13
  nopl   0x0(%rax)
L107:
  mov    (%rbx,%rbp,4),%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %ebp,%r12d
  jge    L107
  lea    0x1(%r12),%edx
  cmp    $0x2,%r12d
  jbe    L157
  mov    %edx,%eax
  pxor   %xmm0,%xmm0
  shr    $0x2,%eax
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x50(%rsp,%rax,1),%rax
  nopl   0x0(%rax)
L43:
  movdqa %xmm0,%xmm1
  add    $0x10,%rbx
  pcmpgtd -0x10(%rbx),%xmm1
  pand   %xmm1,%xmm0
  pandn  -0x10(%rbx),%xmm1
  por    %xmm1,%xmm0
  cmp    %rax,%rbx
  jne    L43
  movdqa %xmm0,%xmm2
  mov    %edx,%eax
  psrldq $0x8,%xmm2
  and    $0xfffffffc,%eax
  and    $0x3,%edx
  movdqa %xmm2,%xmm1
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm2
  pandn  %xmm0,%xmm1
  por    %xmm2,%xmm1
  movdqa %xmm1,%xmm2
  psrldq $0x4,%xmm2
  movdqa %xmm2,%xmm0
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm2
  pandn  %xmm1,%xmm0
  por    %xmm2,%xmm0
  movd   %xmm0,%esi
  je     L106
L31:
  movslq %eax,%rdx
  mov    0x40(%rsp,%rdx,4),%edx
  cmp    %edx,%esi
  cmovl  %edx,%esi
  lea    0x1(%rax),%edx
  cmp    %r12d,%edx
  jg     L106
  movslq %edx,%rdx
  mov    0x40(%rsp,%rdx,4),%edx
  cmp    %edx,%esi
  cmovl  %edx,%esi
  add    $0x2,%eax
  cmp    %eax,%r12d
  jl     L106
  cltq
  mov    0x40(%rsp,%rax,4),%eax
  cmp    %eax,%esi
  cmovl  %eax,%esi
L106:
  xor    %eax,%eax
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    0x1d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L125
  add    $0x1e8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L170:
  mov    0x40(%rsp),%edx
  xor    %esi,%esi
  xor    %eax,%eax
  lea    D22(%rip),%rdi
  call   <printf@plt>
  mov    0x40(%rsp),%esi
  xor    %eax,%eax
  test   %esi,%esi
  cmovs  %eax,%esi
  jmp    L106
L20:
  test   %r13d,%r13d
  jns    L130
L45:
  xor    %esi,%esi
  jmp    L106
L157:
  xor    %esi,%esi
  xor    %eax,%eax
  jmp    L31
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D9
data_type: string
name: read_data
arguments: data_label: D22
data_type: string
name: read_data
arguments: data_label: D30
data_type: string

tool: D9: %d

tool: D22: coinChange[%d] = %d


tool: D30: Max Way to Give Money = %d


assistant: ```c
int main() {
  int i, j;
  int coinNumber;
  int coinNumberStore[10];
  int highestGivingTotal = 0;
  int coinChange[100];
  memset(coinChange, 0, sizeof(coinChange));
  coinChange[0] = 1;
  scanf("%d", &coinNumber);
  for (i = 1; i <= coinNumber; i++) {
    scanf("%d", &coinNumberStore[i]);
    highestGivingTotal += coinNumberStore[i];
  }
  for (i = 1; i <= coinNumber; i++) {
    for (j = highestGivingTotal; j >= 0; j--) {
      if (coinChange[j] != 0) {
        coinChange[j + coinNumberStore[i]] = coinChange[j] + coinChange[j + coinNumberStore[i]];
      }
    }
  }
  for (j = 0; j <= highestGivingTotal; j++) {
    printf("coinChange[%d] = %d\n", j, coinChange[j]);
  }
  int MaxWayToGiveMoney = 0;
  for (j = 0; j <= highestGivingTotal; j++) {
    if (coinChange[j] >= MaxWayToGiveMoney)
      MaxWayToGiveMoney = coinChange[j];
  }
  printf("Max Way to Give Money = %d\n", MaxWayToGiveMoney);
  return 0;
}
```