user: Please show me the C implementation that matches the assembly code listed below:

```asm
<find_sum_bits>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x118,%rsp
  mov    %rdi,0x10(%rsp)
  xor    %edi,%edi
  cmp    $0x1,%ecx
  setg   %dil
  mov    %edx,0x108(%rsp)
  mov    %ecx,0x7c(%rsp)
  mov    %r9,0x100(%rsp)
  call   <assert@plt>
  cmp    %r15d,%ebp
  jge    L142
  lea    -0x1(%rbx),%ecx
  mov    %ebx,%eax
  lea    -0x5(%rbx),%edx
  mov    %r15d,%esi
  mov    %ecx,0xf0(%rsp)
  lea    -0x2(%rbx),%ecx
  sub    $0x8,%eax
  sub    %ebp,%esi
  mov    %ecx,0xd0(%rsp)
  lea    -0x3(%rbx),%ecx
  mov    %ecx,0xb0(%rsp)
  lea    -0x4(%rbx),%ecx
  mov    %eax,0x48(%rsp)
  mov    %r15d,%eax
  mov    %ecx,0x8c(%rsp)
  add    $0x1,%eax
  lea    -0x6(%rbx),%ecx
  mov    %edx,0xa0(%rsp)
  lea    -0x7(%rbx),%edx
  lea    0x1(%rbp),%ebx
  mov    %ecx,0x38(%rsp)
  mov    %edx,0x4c(%rsp)
  mov    %esi,0xdc(%rsp)
  mov    %eax,0x10c(%rsp)
  jmp    L559
L364:
  mov    0xdc(%rsp),%eax
  cmp    %ebp,%eax
  jle    L142
  lea    0x1(%rbx),%esi
  mov    %ebx,0xc0(%rsp)
  mov    %eax,%ecx
  mov    %esi,0xe4(%rsp)
  cmp    $0x9,%eax
  jg     L445
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdx
  movslq %r14d,%rax
  add    $0x1,%r14d
  bts    %rcx,%rdx
  mov    %rdx,(%rsi,%rax,8)
L445:
  subl   $0x1,0xdc(%rsp)
  mov    0xe4(%rsp),%ebx
  mov    0xc0(%rsp),%ecx
  cmp    %ecx,0x108(%rsp)
  jle    L142
L559:
  mov    0x100(%rsp),%rax
  lea    -0x1(%rbx),%ebp
  xor    %edi,%edi
  mov    %rax,%r15
  bts    %rbp,%r15
  cmp    %r15,%rax
  mov    %r15,0xf8(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0x7c(%rsp)
  je     L364
  xor    %edi,%edi
  cmpl   $0x1,0xf0(%rsp)
  mov    %ebx,0xc0(%rsp)
  setg   %dil
  call   <assert@plt>
  mov    0xdc(%rsp),%eax
  cmp    %eax,%ebx
  jge    L414
  mov    0xc0(%rsp),%edx
  mov    0x10c(%rsp),%ecx
  lea    0x1(%rdx),%esi
  mov    %edx,%eax
  add    %eax,%eax
  mov    %esi,0xe4(%rsp)
  mov    %esi,0xb8(%rsp)
  mov    %ecx,%esi
  sub    %edx,%ecx
  sub    %eax,%esi
  lea    0x1(%rcx),%eax
  mov    %ecx,0xf4(%rsp)
  mov    %esi,0xd8(%rsp)
  mov    %eax,0xc8(%rsp)
  jmp    L536
L240:
  mov    0xd8(%rsp),%eax
  cmp    %ebx,%eax
  jle    L445
  lea    0x1(%rbp),%esi
  mov    %ebp,0xcc(%rsp)
  mov    %esi,0xe0(%rsp)
  mov    %eax,%esi
  cmp    $0x9,%eax
  jg     L359
  mov    %r15,%rdx
  movslq %r14d,%rax
  add    $0x1,%r14d
  bts    %rsi,%rdx
  mov    0x10(%rsp),%rsi
  mov    %rdx,(%rsi,%rax,8)
L359:
  mov    0xe0(%rsp),%eax
  subl   $0x1,0xd8(%rsp)
  mov    0xf4(%rsp),%edx
  mov    %eax,0xb8(%rsp)
  cmp    %edx,0xcc(%rsp)
  jge    L445
L536:
  mov    0xf8(%rsp),%rax
  mov    0xb8(%rsp),%ebp
  xor    %edi,%edi
  mov    %rax,%r15
  lea    -0x1(%rbp),%ebx
  bts    %rbx,%r15
  cmp    %r15,%rax
  mov    %r15,0xe8(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0xf0(%rsp)
  je     L240
  mov    0xb8(%rsp),%ebx
  xor    %edi,%edi
  cmpl   $0x1,0xd0(%rsp)
  setg   %dil
  mov    %ebx,0xcc(%rsp)
  call   <assert@plt>
  cmp    0xd8(%rsp),%ebx
  jge    L305
  mov    0xb8(%rsp),%eax
  mov    0xc8(%rsp),%esi
  lea    0x1(%rax),%ecx
  mov    %ecx,0xe0(%rsp)
  mov    %ecx,%ebx
  mov    %eax,%ecx
  add    %eax,%eax
  sub    %eax,%esi
  add    %ecx,%eax
  mov    0xf4(%rsp),%ecx
  mov    %esi,0x9c(%rsp)
  sub    %eax,%ecx
  mov    %ecx,0xd4(%rsp)
  jmp    L286
L663:
  mov    0x9c(%rsp),%eax
  cmp    %ebp,%eax
  jle    L359
  mov    %ebx,%esi
  mov    %ebx,0xbc(%rsp)
  add    $0x1,%esi
  mov    %esi,0xc4(%rsp)
  mov    %eax,%esi
  cmp    $0x9,%eax
  jg     L272
  mov    %r15,%rdx
  movslq %r14d,%rax
  add    $0x1,%r14d
  bts    %rsi,%rdx
  mov    0x10(%rsp),%rsi
  mov    %rdx,(%rsi,%rax,8)
L272:
  mov    0xc8(%rsp),%eax
  subl   $0x1,0x9c(%rsp)
  subl   $0x2,0xd4(%rsp)
  mov    0xc4(%rsp),%ebx
  sub    0xb8(%rsp),%eax
  cmp    %eax,0xbc(%rsp)
  jge    L359
L286:
  mov    0xe8(%rsp),%rax
  lea    -0x1(%rbx),%ebp
  xor    %edi,%edi
  mov    %rax,%r15
  bts    %rbp,%r15
  cmp    %r15,%rax
  mov    %r15,0xa8(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0xd0(%rsp)
  je     L663
  xor    %edi,%edi
  cmpl   $0x1,0xb0(%rsp)
  mov    %ebx,0xbc(%rsp)
  setg   %dil
  call   <assert@plt>
  mov    0x9c(%rsp),%eax
  cmp    %eax,%ebx
  jge    L629
  mov    0xbc(%rsp),%ecx
  mov    0xc8(%rsp),%edx
  sub    0xb8(%rsp),%edx
  lea    0x1(%rcx),%eax
  mov    %eax,0xc4(%rsp)
  mov    %eax,%ebx
  lea    (%rcx,%rcx,2),%eax
  sub    %eax,%edx
  mov    0xd4(%rsp),%eax
  mov    %edx,0xb4(%rsp)
  mov    %eax,0x70(%rsp)
  jmp    L554
L452:
  mov    0x70(%rsp),%eax
  cmp    %eax,%ebp
  jge    L272
  lea    0x1(%rbx),%ecx
  mov    %ebx,0x98(%rsp)
  mov    %ecx,0xa4(%rsp)
  mov    %eax,%ecx
  cmp    $0x9,%eax
  jg     L196
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdx
  movslq %r14d,%rax
  add    $0x1,%r14d
  bts    %rcx,%rdx
  mov    %rdx,(%rsi,%rax,8)
L196:
  subl   $0x1,0x70(%rsp)
  mov    0xa4(%rsp),%ebx
  subl   $0x2,0xb4(%rsp)
  mov    0x9c(%rsp),%esi
  cmp    %esi,0x98(%rsp)
  jge    L272
L554:
  mov    0xa8(%rsp),%rax
  lea    -0x1(%rbx),%ebp
  xor    %edi,%edi
  mov    %rax,%r15
  bts    %rbp,%r15
  cmp    %r15,%rax
  mov    %r15,0x80(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0xb0(%rsp)
  je     L452
  xor    %edi,%edi
  cmpl   $0x1,0x8c(%rsp)
  mov    %ebx,0x98(%rsp)
  setg   %dil
  call   <assert@plt>
  mov    0x70(%rsp),%eax
  cmp    %eax,%ebx
  jge    L526
  mov    0x98(%rsp),%ecx
  mov    0x9c(%rsp),%esi
  mov    %r14d,%r15d
  lea    0x1(%rcx),%eax
  mov    %eax,0xa4(%rsp)
  mov    %eax,%ebx
  lea    (%rcx,%rcx,2),%eax
  sub    %eax,%esi
  mov    0xb4(%rsp),%eax
  mov    %esi,0x88(%rsp)
  mov    %eax,0x1c(%rsp)
  jmp    L34
L339:
  mov    0x1c(%rsp),%eax
  cmp    %eax,%ebp
  jge    L468
  mov    %ebx,%ecx
  mov    %ebx,0x64(%rsp)
  add    $0x1,%ecx
  mov    %ecx,0x78(%rsp)
  mov    %eax,%ecx
  cmp    $0x9,%eax
  jg     L634
  mov    %r14,%rdx
  movslq %r15d,%rax
  add    $0x1,%r15d
  bts    %rcx,%rdx
  mov    0x10(%rsp),%rcx
  mov    %rdx,(%rcx,%rax,8)
L634:
  subl   $0x1,0x1c(%rsp)
  mov    0x78(%rsp),%ebx
  subl   $0x2,0x88(%rsp)
  mov    0x70(%rsp),%ecx
  cmp    %ecx,0x64(%rsp)
  jge    L468
L34:
  mov    0x80(%rsp),%rax
  lea    -0x1(%rbx),%ebp
  xor    %edi,%edi
  mov    %rax,%r14
  bts    %rbp,%r14
  cmp    %r14,%rax
  mov    %r14,0x90(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0x8c(%rsp)
  je     L339
  xor    %edi,%edi
  cmpl   $0x1,0xa0(%rsp)
  mov    %ebx,0x64(%rsp)
  setg   %dil
  call   <assert@plt>
  mov    0x1c(%rsp),%eax
  cmp    %eax,%ebx
  jge    L605
  mov    0x64(%rsp),%esi
  mov    0x70(%rsp),%ecx
  mov    %r15d,%r13d
  mov    0x88(%rsp),%r14d
  lea    0x1(%rsi),%eax
  mov    %ecx,%edx
  mov    %esi,0x44(%rsp)
  mov    %eax,0x78(%rsp)
  mov    %eax,0xc(%rsp)
  lea    0x2(%rsi),%eax
  mov    %eax,0x30(%rsp)
  lea    (%rsi,%rsi,2),%eax
  sub    %eax,%edx
  lea    0x0(,%rsi,4),%eax
  neg    %eax
  mov    %edx,0x2c(%rsp)
  lea    -0x2(%rcx,%rax,1),%eax
  mov    %eax,0x28(%rsp)
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L111:
  cmp    %r14d,%r15d
  jge    L522
  mov    0xc(%rsp),%eax
  mov    %eax,0x18(%rsp)
  cmp    $0x9,%r14d
  jg     L237
  mov    0x10(%rsp),%rcx
  mov    %rbx,%rdx
  movslq %r13d,%rax
  add    $0x1,%r13d
  bts    %r14,%rdx
  mov    %rdx,(%rcx,%rax,8)
L237:
  addl   $0x1,0x44(%rsp)
  mov    0x1c(%rsp),%esi
  sub    $0x1,%r14d
  addl   $0x1,0xc(%rsp)
  addl   $0x1,0x30(%rsp)
  subl   $0x2,0x2c(%rsp)
  subl   $0x3,0x28(%rsp)
  cmp    %esi,0x18(%rsp)
  jge    L522
L21:
  mov    0x90(%rsp),%rax
  mov    0x44(%rsp),%r15d
  xor    %edi,%edi
  mov    %rax,%rbx
  bts    %r15,%rbx
  cmp    %rbx,%rax
  mov    %rbx,0x68(%rsp)
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0xa0(%rsp)
  je     L111
  mov    0xc(%rsp),%ebx
  xor    %edi,%edi
  cmpl   $0x1,0x38(%rsp)
  setg   %dil
  mov    %ebx,0x18(%rsp)
  call   <assert@plt>
  cmp    %r14d,%ebx
  jge    L237
  mov    0x28(%rsp),%eax
  mov    0x2c(%rsp),%r15d
  mov    %r14d,0x20(%rsp)
  mov    0x30(%rsp),%ebp
  mov    %eax,0x3c(%rsp)
  jmp    L466
  nopl   0x0(%rax,%rax,1)
L589:
  cmp    %r15d,%r12d
  jge    L576
  mov    %ebp,%eax
  mov    %ebp,0x24(%rsp)
  add    $0x1,%eax
  mov    %eax,0x40(%rsp)
  cmp    $0x9,%r15d
  jg     L37
  mov    0x10(%rsp),%rsi
  movslq %r13d,%rax
  bts    %r15,%rbx
  add    $0x1,%r13d
  mov    %rbx,(%rsi,%rax,8)
L37:
  subl   $0x2,0x3c(%rsp)
  mov    0x40(%rsp),%ebp
  sub    $0x1,%r15d
  mov    0x20(%rsp),%ecx
  cmp    %ecx,0x24(%rsp)
  jge    L439
L466:
  mov    0x68(%rsp),%rax
  lea    -0x1(%rbp),%r12d
  xor    %edi,%edi
  mov    %rax,%rbx
  bts    %r12,%rbx
  cmp    %rbx,%rax
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0x38(%rsp)
  je     L589
  xor    %edi,%edi
  cmpl   $0x1,0x4c(%rsp)
  mov    %ebp,0x24(%rsp)
  setg   %dil
  call   <assert@plt>
  mov    0x24(%rsp),%eax
  cmp    %r15d,%ebp
  jge    L13
  mov    0x20(%rsp),%ecx
  lea    0x1(%rax),%r14d
  lea    (%rax,%rax,2),%eax
  mov    0x3c(%rsp),%ebp
  mov    %r14d,0x40(%rsp)
  sub    %eax,%ecx
  mov    %ecx,0x74(%rsp)
  jmp    L14
  nopl   (%rax)
L375:
  mov    0x34(%rsp),%edx
  cmp    %ebp,%edx
  jge    L37
  mov    %r14d,0x34(%rsp)
  cmp    $0x9,%ebp
  jg     L653
  mov    0x10(%rsp),%rsi
  movslq %r13d,%rax
  bts    %rbp,%r12
  add    $0x1,%r13d
  mov    %r12,(%rsi,%rax,8)
L653:
  subl   $0x2,0x74(%rsp)
  add    $0x1,%r14d
  sub    $0x1,%ebp
  cmp    %r15d,0x34(%rsp)
  jge    L37
L14:
  mov    %r15d,%edx
  mov    %rbx,%r12
  xor    %edi,%edi
  sub    %ebp,%edx
  bts    %rdx,%r12
  mov    %edx,0x34(%rsp)
  cmp    %r12,%rbx
  setne  %dil
  call   <assert@plt>
  cmpl   $0x2,0x4c(%rsp)
  je     L375
  xor    %edi,%edi
  cmpl   $0x1,0x48(%rsp)
  mov    %r14d,0x34(%rsp)
  setg   %dil
  call   <assert@plt>
  cmp    %ebp,%r14d
  jge    L653
  cmpl   $0x2,0x48(%rsp)
  mov    0x74(%rsp),%edx
  je     L57
  mov    0x7c(%rsp),%eax
  mov    %r12,%r10
  mov    %r14d,%r12d
  lea    -0x9(%rax),%ecx
L544:
  mov    %r10,%r9
  mov    %r10,0x58(%rsp)
  bts    %r12,%r9
  mov    %ecx,0x60(%rsp)
  cmp    %r9,%r10
  mov    %r9,0x50(%rsp)
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %ebp,%edx
  mov    0x60(%rsp),%ecx
  mov    0x50(%rsp),%r9
  sub    %r12d,%edx
  mov    0x10(%rsp),%rdi
  add    $0x1,%r12d
  mov    %r13d,%esi
  mov    %r12d,%r8d
  mov    %ecx,0x50(%rsp)
  call   <find_sum_bits>
  cmp    %ebp,%r12d
  mov    0x50(%rsp),%ecx
  mov    0x58(%rsp),%r10
  mov    %eax,%r13d
  jne    L544
  jmp    L653
  nopl   0x0(%rax)
L57:
  mov    %r15d,0x58(%rsp)
  mov    %r13d,%r15d
  mov    %r14d,0x60(%rsp)
  mov    %ebp,%r14d
  mov    %r12,%rbp
  mov    %edx,%r12d
  mov    %rbx,0x50(%rsp)
  jmp    L486
  nopl   (%rax)
L639:
  cmp    $0x9,%r12d
  jg     L593
  mov    0x10(%rsp),%rsi
  mov    %rbx,%rax
  movslq %r15d,%rdi
  add    $0x1,%r15d
  bts    %r12,%rax
  mov    %rax,(%rsi,%rdi,8)
L593:
  sub    $0x1,%r12d
  je     L377
L486:
  mov    %r14d,%r13d
  mov    %rbp,%rbx
  xor    %edi,%edi
  sub    %r12d,%r13d
  bts    %r13,%rbx
  cmp    %rbx,%rbp
  setne  %dil
  call   <assert@plt>
  cmp    %r12d,%r13d
  jl     L639
L377:
  mov    %r14d,%ebp
  mov    %r15d,%r13d
  mov    0x50(%rsp),%rbx
  mov    0x60(%rsp),%r14d
  mov    0x58(%rsp),%r15d
  jmp    L653
  nopl   (%rax)
L439:
  mov    %ecx,%r14d
  jmp    L237
L522:
  mov    %r13d,%r15d
  jmp    L634
L576:
  mov    0x20(%rsp),%r14d
  jmp    L237
L13:
  add    $0x1,%eax
  mov    %eax,0x40(%rsp)
  jmp    L37
L468:
  mov    %r15d,%r14d
  jmp    L196
L605:
  mov    0x64(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x78(%rsp)
  jmp    L634
L526:
  mov    0x98(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0xa4(%rsp)
  jmp    L196
L629:
  mov    0xbc(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0xc4(%rsp)
  jmp    L272
L142:
  add    $0x118,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L305:
  mov    0xcc(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0xe0(%rsp)
  jmp    L359
L414:
  mov    0xc0(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0xe4(%rsp)
  jmp    L445
```

assistant: ```c
int find_sum_bits(unsigned long *array, int idx, int value_left, int addends_left, int min_addend, unsigned long bitmask_so_far) {
  int i;
  assert(addends_left >= 2);
  for (i = min_addend; i < value_left; i++) {
    unsigned long new_bitmask = bitmask_so_far | (1L << i);
    assert(bitmask_so_far != new_bitmask);
    if (addends_left == 2) {
      int j = value_left - i;
      if (j <= i)
        break;
      if (j > 9)
        continue;
      array[idx++] = new_bitmask | (1L << j);
    } else
      idx = find_sum_bits(array, idx, value_left - i, addends_left - 1, i + 1, new_bitmask);
  }
  return idx;
}
```