user: What is the c source code of the assembly code below:

```asm
<del_track>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  lea    -0x1(%rdx),%edi
  push   %rbx
  mov    %edx,%ebx
  sub    $0x58,%rsp
  mov    %edi,0x4(%rsp)
  imul   %esi,%edi
  mov    %esi,0x8(%rsp)
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %r15d,%r15d
  jle    L178
  mov    %r13d,%eax
  lea    0x2(%r13),%edi
  lea    0x1(%r13),%esi
  mov    $0x1,%edx
  shr    $0x2,%eax
  mov    %esi,0xc(%rsp)
  lea    -0x1(%rax),%r8d
  mov    %r13d,%eax
  mov    %edi,0x18(%rsp)
  and    $0xfffffffc,%eax
  add    $0x1,%r8
  lea    0x1(%rax),%ecx
  mov    %eax,0x2c(%rsp)
  add    $0x2,%eax
  shl    $0x4,%r8
  mov    %eax,0x44(%rsp)
  mov    %ebx,%eax
  sub    %r13d,%eax
  mov    %ecx,0x3c(%rsp)
  cmp    %edi,%ebx
  lea    -0x1(%rax),%ecx
  cmovge %ecx,%edx
  sub    $0x2,%eax
  xor    %r11d,%r11d
  mov    %eax,0x1c(%rsp)
  mov    %edx,%ecx
  mov    %edx,0x24(%rsp)
  shr    $0x2,%edx
  and    $0xfffffffc,%ecx
  lea    -0x1(%rdx),%edi
  add    %ecx,%esi
  mov    %ecx,0x28(%rsp)
  add    $0x1,%rdi
  lea    -0x1(%rsi),%edx
  lea    0x1(%rsi),%ecx
  mov    %esi,0x38(%rsp)
  shl    $0x4,%rdi
  mov    %edx,0x30(%rsp)
  lea    0x2(%rsi),%edx
  lea    -0x1(%r13),%esi
  mov    %esi,0x20(%rsp)
  mov    %rsi,0x48(%rsp)
  mov    %ecx,0x34(%rsp)
  xor    %ecx,%ecx
  mov    %edx,0x40(%rsp)
  xor    %edx,%edx
  nopl   0x0(%rax)
L111:
  test   %r13d,%r13d
  jle    L166
  movslq %ecx,%rax
  lea    (%r12,%rax,4),%rsi
  movslq %edx,%rax
  lea    0x4(,%rax,4),%rax
  mov    %rsi,%r9
  lea    0x0(%rbp,%rax,1),%r10
  sub    %r10,%r9
  cmp    $0x8,%r9
  jbe    L5
  cmpl   $0x2,0x20(%rsp)
  jbe    L5
  lea    -0x4(%rbp,%rax,1),%r9
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L167:
  movdqu (%r9,%rax,1),%xmm0
  movups %xmm0,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %r8,%rax
  jne    L167
  mov    0x2c(%rsp),%r14d
  cmp    %r14d,%r13d
  je     L166
  lea    (%rdx,%r14,1),%eax
  mov    0x3c(%rsp),%r10d
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  lea    (%rcx,%r14,1),%eax
  cltq
  mov    %esi,(%r12,%rax,4)
  cmp    %r10d,%r13d
  jle    L166
  lea    (%rdx,%r10,1),%eax
  mov    0x44(%rsp),%r14d
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  lea    (%rcx,%r10,1),%eax
  cltq
  mov    %esi,(%r12,%rax,4)
  cmp    %r14d,%r13d
  jle    L166
  lea    (%rdx,%r14,1),%eax
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  lea    (%rcx,%r14,1),%eax
  cltq
  mov    %esi,(%r12,%rax,4)
L166:
  movslq 0xc(%rsp),%rax
  cmp    %eax,%ebx
  jle    L41
  movslq %edx,%r15
  movslq %ecx,%r10
  lea    0x1(%r15,%rax,1),%r9
  mov    %r15,0x10(%rsp)
  lea    (%r10,%rax,1),%rsi
  shl    $0x2,%r9
  cmpl   $0x2,0x1c(%rsp)
  lea    -0x4(%r12,%rsi,4),%rsi
  seta   %r15b
  cmp    0x18(%rsp),%ebx
  setge  %r14b
  test   %r14b,%r15b
  je     L107
  lea    0x0(%rbp,%r9,1),%r15
  mov    %rsi,%r14
  sub    %r15,%r14
  cmp    $0x8,%r14
  jbe    L107
  lea    -0x4(%rbp,%r9,1),%r9
  xor    %eax,%eax
  nopl   (%rax)
L156:
  movdqu (%r9,%rax,1),%xmm1
  movups %xmm1,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L156
  mov    0x28(%rsp),%esi
  cmp    %esi,0x24(%rsp)
  je     L41
  mov    0x38(%rsp),%r10d
  mov    0x34(%rsp),%r15d
  lea    (%rdx,%r10,1),%eax
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  mov    0x30(%rsp),%eax
  add    %ecx,%eax
  cltq
  mov    %esi,(%r12,%rax,4)
  cmp    %ebx,%r15d
  jge    L41
  lea    (%rdx,%r15,1),%eax
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  lea    (%rcx,%r10,1),%eax
  cltq
  mov    %esi,(%r12,%rax,4)
  mov    0x40(%rsp),%eax
  cmp    %eax,%ebx
  jle    L41
  add    %edx,%eax
  cltq
  mov    0x0(%rbp,%rax,4),%esi
  lea    (%r15,%rcx,1),%eax
  cltq
  mov    %esi,(%r12,%rax,4)
L41:
  add    $0x1,%r11d
  add    %ebx,%edx
  add    0x4(%rsp),%ecx
  cmp    %r11d,0x8(%rsp)
  jne    L111
L178:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x58,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L5:
  mov    0x48(%rsp),%r14
  lea    -0x4(%rbp,%rax,1),%r10
  xor    %eax,%eax
  nopl   0x0(%rax)
L63:
  mov    (%r10,%rax,4),%r9d
  mov    %r9d,(%rsi,%rax,4)
  mov    %rax,%r9
  add    $0x1,%rax
  cmp    %r9,%r14
  jne    L63
  jmp    L166
  nopl   0x0(%rax)
L107:
  mov    0x10(%rsp),%rsi
  lea    (%r12,%r10,4),%r9
  lea    0x0(%rbp,%rsi,4),%rsi
  xchg   %ax,%ax
L118:
  mov    (%rsi,%rax,4),%r10d
  mov    %r10d,-0x4(%r9,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L118
  jmp    L41
```

assistant: ```c
int *del_track(int *old_pattern, int pattern_length, int old_num_tracks, int track_del_idx) {
  int *new_pattern = malloc((old_num_tracks - 1) * pattern_length * sizeof(int));
  int new_num_tracks = old_num_tracks - 1;
  for (int p = 0; p < pattern_length; p++) {
    for (int t = 0; t < track_del_idx; t++) {
      new_pattern[p * new_num_tracks + t] = old_pattern[p * old_num_tracks + t];
    }
    for (int t = track_del_idx + 1; t < old_num_tracks; t++) {
      int nt = t - 1;
      new_pattern[p * new_num_tracks + nt] = old_pattern[p * old_num_tracks + t];
    }
  }
  free(old_pattern);
  return new_pattern;
}
```