user: 下面的汇编指令对应的C源代码是什么：

```asm
<trap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L185
  cmpl   $0x2,-0x2c(%rbp)
  jg     L135
L185:
  mov    $0x0,%eax
  jmp    L37
L135:
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  jmp    L103
L131:
  addl   $0x1,-0x10(%rbp)
L140:
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L69
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L131
  jmp    L69
L76:
  subl   $0x1,-0x8(%rbp)
L69:
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L29
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L76
  jmp    L29
L127:
  movl   $0x0,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L151
L65:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x14(%rbp)
  addl   $0x1,-0xc(%rbp)
L151:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L65
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  sub    -0x14(%rbp),%eax
  add    %eax,-0x18(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L29:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L159
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L127
  jmp    L159
L6:
  movl   $0x0,-0x14(%rbp)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L172
L22:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x14(%rbp)
  subl   $0x1,-0x4(%rbp)
L172:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L22
  mov    -0x8(%rbp),%eax
  sub    -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  sub    -0x14(%rbp),%eax
  add    %eax,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L159:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L103
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L6
L103:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L140
  mov    -0x18(%rbp),%eax
L37:
  pop    %rbp
  ret
```

assistant: ```c
int trap(int *height, int heightSize) {
  if (height == NULL || heightSize < 3) {
    return 0;
  }
  int traped = 0;
  int used = 0;
  int i = 0, ip = 0, j = heightSize - 1, jp = j;
  while (i < j) {
    while (height[i + 1] > height[i] && i < j) {
      i++;
    }
    while (height[j - 1] > height[j] && i < j) {
      j--;
    }
    while (height[i] <= height[j] && i < j) {
      used = 0;
      ip = i + 1;
      while (height[ip] < height[i]) {
        used += height[ip];
        ip++;
      }
      traped += (ip - i - 1) * height[i] - used;
      i = ip;
    }
    while (height[j] <= height[i] && i < j) {
      used = 0;
      jp = j - 1;
      while (height[jp] < height[j]) {
        used += height[jp];
        jp--;
      }
      traped += (j - jp - 1) * height[j] - used;
      j = jp;
    }
  }
  return traped;
}
```