user: Translate the below assembly code into C programming language:

```asm
<insert_into_peaks>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L56
  movl   $0x1d,-0x8(%rbp)
  jmp    L77
L37:
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    0x4(%rax),%eax
  mov    %eax,0x4(%rdx)
  subl   $0x1,-0x8(%rbp)
L77:
  cmpl   $0x0,-0x8(%rbp)
  jg     L37
  mov    -0x18(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%edx
  mov    %edx,0x4(%rax)
L56:
  movl   $0x0,-0x4(%rbp)
  jmp    L9
L30:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L67
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L67
  movl   $0x1d,-0x8(%rbp)
  jmp    L45
L69:
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    0x4(%rax),%eax
  mov    %eax,0x4(%rdx)
  subl   $0x1,-0x8(%rbp)
L45:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jg     L69
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,0x4(%rdx)
L67:
  addl   $0x1,-0x4(%rbp)
L9:
  cmpl   $0x1a,-0x4(%rbp)
  jle    L30
  mov    -0x18(%rbp),%rax
  add    $0xe0,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L109
  mov    -0x18(%rbp),%rax
  add    $0xe8,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L109
  mov    -0x18(%rbp),%rax
  lea    0xe8(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  lea    0xe8(%rax),%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,0x4(%rdx)
L109:
  mov    $0x1,%eax
  pop    %rbp
  ret
```

assistant: ```c
int insert_into_peaks(peaks, max, max_place)
int max, max_place, peaks[30][2];
{
  int i, j;
  if (max > peaks[0][0]) {
    for (i = 30 - 1; i > 0; i--) {
      peaks[i][0] = peaks[i - 1][0];
      peaks[i][1] = peaks[i - 1][1];
    }
    peaks[0][0] = max;
    peaks[0][1] = max_place;
  }
  for (j = 0; j < 30 - 3; j++) {
    if (max < peaks[j][0] && max > peaks[j + 1][0]) {
      for (i = 30 - 1; i > j + 1; i--) {
        peaks[i][0] = peaks[i - 1][0];
        peaks[i][1] = peaks[i - 1][1];
      }
      peaks[j + 1][0] = max;
      peaks[j + 1][1] = max_place;
    }
  }
  if (max < peaks[30 - 2][0] && max > peaks[30 - 1][0]) {
    peaks[30 - 1][0] = max;
    peaks[30 - 1][1] = max_place;
  }
  return (1);
}
```