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

```asm
<getNumber>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x18,%rsp
  call   <getacount@plt>
  test   %eax,%eax
  jle    L117
  add    $0x1,%eax
  mov    %ebx,%r11d
  lea    -0x1(%rbx),%r15d
  mov    %ebx,%r9d
  mov    %eax,0xc(%rsp)
  mov    %ebx,%eax
  and    $0xfffffffc,%r11d
  mov    $0x1,%ecx
  shr    $0x2,%eax
  xor    %r13d,%r13d
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%r12,%rax,1),%r8
  lea    0x10(%rbp,%rax,1),%rdi
  nopw   0x0(%rax,%rax,1)
L44:
  xor    %eax,%eax
  xor    %edx,%edx
  test   %ebx,%ebx
  jle    L109
  cmp    $0x2,%r15d
  jbe    L128
  movd   %ecx,%xmm6
  mov    %r12,%rax
  pxor   %xmm2,%xmm2
  pshufd $0x0,%xmm6,%xmm1
  cs nopw 0x0(%rax,%rax,1)
L169:
  movdqu (%rax),%xmm0
  movdqu (%rax),%xmm4
  movdqa %xmm1,%xmm3
  add    $0x10,%rax
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm3
  pandn  %xmm4,%xmm0
  por    %xmm3,%xmm0
  paddd  %xmm0,%xmm2
  cmp    %r8,%rax
  jne    L169
  movdqa %xmm2,%xmm0
  mov    %r11d,%edx
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm2
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%eax
  cmp    %ebx,%r11d
  je     L143
L33:
  movslq %edx,%r10
  lea    0x0(,%r10,4),%rsi
  mov    (%r12,%r10,4),%r10d
  cmp    %r10d,%ecx
  cmovle %ecx,%r10d
  add    %r10d,%eax
  lea    0x1(%rdx),%r10d
  cmp    %r10d,%ebx
  jle    L153
  mov    0x4(%r12,%rsi,1),%r10d
  cmp    %r10d,%ecx
  cmovle %ecx,%r10d
  add    $0x2,%edx
  add    %r10d,%eax
  cmp    %edx,%ebx
  jle    L48
  mov    0x8(%r12,%rsi,1),%edx
  cmp    %edx,%ecx
  cmovle %ecx,%edx
  add    %edx,%eax
L48:
  cmp    $0x2,%r15d
  jbe    L131
L16:
  movd   %ecx,%xmm7
  pshufd $0x0,%xmm7,%xmm1
L143:
  mov    %rbp,%rdx
  pxor   %xmm2,%xmm2
  nopl   0x0(%rax)
L170:
  movdqu (%rdx),%xmm0
  movdqu (%rdx),%xmm5
  movdqa %xmm1,%xmm3
  add    $0x10,%rdx
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm3
  pandn  %xmm5,%xmm0
  por    %xmm3,%xmm0
  paddd  %xmm0,%xmm2
  cmp    %rdx,%rdi
  jne    L170
  movdqa %xmm2,%xmm0
  mov    %r11d,%esi
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm2
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%edx
  cmp    %ebx,%r11d
  je     L109
L176:
  movslq %esi,%r10
  lea    0x0(,%r10,4),%r14
  mov    0x0(%rbp,%r10,4),%r10d
  cmp    %r10d,%ecx
  cmovle %ecx,%r10d
  add    $0x1,%esi
  add    %r10d,%edx
  cmp    %esi,%ebx
  jle    L109
L158:
  mov    0x4(%rbp,%r14,1),%r10d
  cmp    %r10d,%ecx
  cmovle %ecx,%r10d
  add    $0x1,%esi
  add    %r10d,%edx
  cmp    %esi,%ebx
  jle    L109
  mov    0x8(%rbp,%r14,1),%esi
  cmp    %esi,%ecx
  cmovle %ecx,%esi
  add    %esi,%edx
L109:
  mov    %r9d,%esi
  add    $0x1,%ecx
  add    %ebx,%r9d
  sub    %edx,%esi
  sub    %esi,%eax
  lea    0x1(%r13,%rax,1),%r13d
  cmp    0xc(%rsp),%ecx
  jne    L44
L114:
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L128:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L33
L131:
  mov    0x0(%rbp),%edx
  mov    $0x1,%esi
  cmp    %edx,%ecx
  cmovle %ecx,%edx
  xor    %r14d,%r14d
  jmp    L158
L153:
  cmp    $0x2,%r15d
  ja     L16
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L176
L117:
  xor    %r13d,%r13d
  jmp    L114
```

assistant: ```c
int getNumber(int apple[], int orange[], int len) {
  int X = getacount(apple, orange, len);
  int gifts = 0;
  for (int x = 1; x <= X; x++) {
    int mA = 0;
    for (int j = 0; j < len; j++) {
      mA += apple[j] < x ? apple[j] : x;
    }
    int mO = 0;
    for (int j = 0; j < len; j++) {
      mO += orange[j] < x ? orange[j] : x;
    }
    gifts += mA - (len * x - mO) + 1;
  }
  return gifts;
}
```