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

```asm
<change_rec>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %edx,0x64(%rsp)
  movl   $0x0,0x50(%rsp)
  test   %edx,%edx
  je     L360
  movl   $0xffffffff,0x50(%rsp)
  js     L360
  test   %esi,%esi
  jle    L360
  lea    -0x1(%rsi),%eax
  mov    %rdi,0x58(%rsp)
  lea    0x4(%rdi,%rax,4),%rax
  mov    %rax,0x30(%rsp)
L426:
  mov    0x58(%rsp),%rdx
  mov    0x64(%rsp),%eax
  sub    (%rdx),%eax
  mov    %eax,0x54(%rsp)
  je     L1
  js     L660
  mov    %rdi,0x40(%rsp)
  movl   $0xffffffff,0x60(%rsp)
L247:
  mov    0x40(%rsp),%rdx
  mov    0x54(%rsp),%eax
  sub    (%rdx),%eax
  mov    %eax,0x48(%rsp)
  je     L468
  js     L18
  mov    %rdi,0x28(%rsp)
  movl   $0xffffffff,0x4c(%rsp)
L422:
  mov    0x28(%rsp),%rdx
  mov    0x48(%rsp),%eax
  sub    (%rdx),%eax
  mov    %eax,0x38(%rsp)
  je     L562
  js     L489
  mov    %rdi,0x18(%rsp)
  movl   $0xffffffff,0x3c(%rsp)
L461:
  mov    0x18(%rsp),%rdx
  mov    0x38(%rsp),%eax
  sub    (%rdx),%eax
  mov    %eax,0x20(%rsp)
  je     L127
  js     L140
  movq   $0x0,0x10(%rsp)
  movl   $0xffffffff,0x24(%rsp)
L136:
  mov    0x10(%rsp),%rdx
  mov    0x20(%rsp),%eax
  sub    (%rdi,%rdx,4),%eax
  mov    %eax,0xc(%rsp)
  je     L496
  js     L245
  xor    %r15d,%r15d
  mov    $0xffffffff,%r10d
L444:
  mov    0xc(%rsp),%r12d
  sub    (%rdi,%r15,4),%r12d
  je     L214
  js     L342
  xor    %ebx,%ebx
  mov    $0xffffffff,%r14d
L301:
  mov    %r12d,%r13d
  sub    (%rdi,%rbx,4),%r13d
  je     L548
  js     L691
  xor    %r9d,%r9d
  mov    $0xffffffff,%ebp
L409:
  mov    %r13d,%ecx
  sub    (%rdi,%r9,4),%ecx
  je     L395
  js     L135
  xor    %r11d,%r11d
  mov    $0xffffffff,%r8d
L225:
  mov    %ecx,%edx
  sub    (%rdi,%r11,4),%edx
  mov    %r9,0x88(%rsp)
  mov    %r8d,0x84(%rsp)
  mov    %r10d,0x80(%rsp)
  mov    %ecx,0x7c(%rsp)
  mov    %r11,0x70(%rsp)
  mov    %esi,0x78(%rsp)
  mov    %rdi,0x68(%rsp)
  call   <change_rec>
  mov    0x68(%rsp),%rdi
  mov    0x78(%rsp),%esi
  cmp    $0xffffffff,%eax
  mov    0x70(%rsp),%r11
  mov    0x7c(%rsp),%ecx
  mov    0x80(%rsp),%r10d
  mov    0x84(%rsp),%r8d
  mov    0x88(%rsp),%r9
  je     L533
  cmp    $0xffffffff,%r8d
  je     L32
  cmp    %r8d,%eax
  jl     L32
L533:
  add    $0x1,%r11
  cmp    %r11d,%esi
  jg     L225
  cmp    $0xffffffff,%r8d
  je     L135
  lea    0x1(%r8),%ecx
  cmp    $0xfffffffe,%r8d
  je     L135
L395:
  cmp    $0xffffffff,%ebp
  je     L254
  cmp    %ebp,%ecx
  jl     L254
L135:
  add    $0x1,%r9
  cmp    %r9d,%esi
  jg     L409
  cmp    $0xffffffff,%ebp
  je     L691
  lea    0x1(%rbp),%r13d
  cmp    $0xfffffffe,%ebp
  je     L691
L548:
  cmp    $0xffffffff,%r14d
  je     L19
  cmp    %r14d,%r13d
  jl     L19
L691:
  add    $0x1,%rbx
  cmp    %ebx,%esi
  jg     L301
  cmp    $0xffffffff,%r14d
  je     L342
  lea    0x1(%r14),%r12d
  cmp    $0xfffffffe,%r14d
  je     L342
L214:
  cmp    $0xffffffff,%r10d
  je     L40
  cmp    %r10d,%r12d
  jl     L40
L342:
  add    $0x1,%r15
  cmp    %r15d,%esi
  jg     L444
  cmp    $0xffffffff,%r10d
  je     L245
  lea    0x1(%r10),%eax
  mov    %eax,0xc(%rsp)
  cmp    $0xfffffffe,%r10d
  je     L245
L496:
  mov    0x24(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L643
  cmp    %eax,0xc(%rsp)
  jl     L643
L245:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  cmp    %eax,%esi
  jg     L136
  mov    0x24(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L140
  lea    0x1(%rax),%edx
  mov    %edx,0x20(%rsp)
  cmp    $0xfffffffe,%eax
  je     L140
L127:
  mov    0x3c(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L611
  cmp    %eax,0x20(%rsp)
  jl     L611
L140:
  addq   $0x4,0x18(%rsp)
  mov    0x18(%rsp),%rax
  cmp    %rax,0x30(%rsp)
  jne    L461
  mov    0x3c(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L489
  lea    0x1(%rax),%edx
  mov    %edx,0x38(%rsp)
  cmp    $0xfffffffe,%eax
  je     L489
L562:
  mov    0x4c(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L326
  cmp    %eax,0x38(%rsp)
  jl     L326
L489:
  addq   $0x4,0x28(%rsp)
  mov    0x28(%rsp),%rax
  cmp    %rax,0x30(%rsp)
  jne    L422
  mov    0x4c(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L18
  lea    0x1(%rax),%edx
  mov    %edx,0x48(%rsp)
  cmp    $0xfffffffe,%eax
  je     L18
L468:
  mov    0x60(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L109
  cmp    %eax,0x48(%rsp)
  jl     L109
L18:
  addq   $0x4,0x40(%rsp)
  mov    0x40(%rsp),%rax
  cmp    %rax,0x30(%rsp)
  jne    L247
  mov    0x60(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L660
  lea    0x1(%rax),%edx
  mov    %edx,0x54(%rsp)
  cmp    $0xfffffffe,%eax
  je     L660
L1:
  mov    0x50(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L498
  cmp    %eax,0x54(%rsp)
  jl     L498
L660:
  addq   $0x4,0x58(%rsp)
  mov    0x58(%rsp),%rax
  cmp    %rax,0x30(%rsp)
  jne    L426
  mov    0x50(%rsp),%eax
  cmp    $0xffffffff,%eax
  je     L360
  add    $0x1,%eax
  mov    %eax,0x50(%rsp)
L360:
  mov    0x50(%rsp),%eax
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L254:
  mov    %ecx,%ebp
  jmp    L135
  nop
L19:
  mov    %r13d,%r14d
  jmp    L691
  nopl   0x0(%rax,%rax,1)
L40:
  mov    %r12d,%r10d
  jmp    L342
  nopl   0x0(%rax,%rax,1)
L643:
  mov    0xc(%rsp),%eax
  mov    %eax,0x24(%rsp)
  jmp    L245
  nopl   (%rax)
L32:
  mov    %eax,%r8d
  jmp    L533
L611:
  mov    0x20(%rsp),%eax
  mov    %eax,0x3c(%rsp)
  jmp    L140
L326:
  mov    0x38(%rsp),%eax
  mov    %eax,0x4c(%rsp)
  jmp    L489
L109:
  mov    0x48(%rsp),%eax
  mov    %eax,0x60(%rsp)
  jmp    L18
L498:
  mov    0x54(%rsp),%eax
  mov    %eax,0x50(%rsp)
  jmp    L660
```

assistant: ```c
int change_rec(int *denom, int size, int amount) {
  if (amount == 0)
    return 0;
  if (amount < 0)
    return -1;
  int min = -1;
  for (int i = 0; i < size; i++) {
    int temp = change_rec(denom, size, amount - denom[i]);
    if (temp == -1)
      continue;
    if (min == -1 || temp < min)
      min = temp;
  }
  return min == -1 ? -1 : min + 1;
}
```