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

```asm
<flush_large>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdx,0x8(%rsp)
  cmp    $0x2,%ecx
  jg     L28
  test   %ecx,%ecx
  jle    L89
  mov    0x68(%rsp),%rdx
  mov    $0x2,%esi
  call   <write_instruction@plt>
  mov    0x8(%rsp),%rbx
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    0x68(%rsp),%r9
  mov    0x60(%rsp),%r8
  mov    %rbp,%rdi
  mov    %rbx,%rsi
  call   <write_three_large@plt>
  cmp    $0x2,%r14d
  jne    L89
  mov    0x68(%rsp),%rdx
  mov    $0x2,%esi
  mov    %rbp,%rdi
  call   <write_instruction@plt>
  mov    0x68(%rsp),%r9
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    0x60(%rsp),%r8
  lea    0xc(%rbx),%rsi
  mov    %rbp,%rdi
  call   <write_three_large@plt>
L89:
  mov    (%r15),%edx
  mov    %edx,%eax
  sub    %r14d,%eax
  cmp    %r14d,%edx
  je     L25
  test   %eax,%eax
  jle    L25
  mov    0x8(%rsp),%rbx
  lea    (%r14,%r14,2),%eax
  xor    %esi,%esi
  cltq
  lea    (%rbx,%rax,4),%rcx
  nopl   0x0(%rax,%rax,1)
L20:
  xor    %eax,%eax
L52:
  mov    (%rcx,%rax,1),%edx
  mov    %edx,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    $0xc,%rax
  jne    L52
  mov    (%r15),%eax
  add    $0x1,%esi
  add    $0xc,%rcx
  add    $0xc,%rbx
  sub    %r14d,%eax
  cmp    %esi,%eax
  jg     L20
L25:
  mov    %eax,(%r15)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L28:
  mov    0x68(%rsp),%rdx
  mov    $0x6,%esi
  call   <write_instruction@plt>
  mov    0x68(%rsp),%rcx
  lea    -0x3(%r14),%esi
  mov    %rbp,%rdi
  mov    $0x4,%edx
  call   <Ptngc_writebits@plt>
  mov    0x8(%rsp),%rdi
  lea    -0x1(%r14),%eax
  mov    %r15,0x10(%rsp)
  lea    (%rax,%rax,2),%rax
  mov    0x60(%rsp),%r15
  mov    0x68(%rsp),%rbx
  mov    %r14d,0x1c(%rsp)
  lea    0xc(%rdi,%rax,4),%rax
  mov    %rdi,%r14
  mov    %rax,(%rsp)
  nopw   0x0(%rax,%rax,1)
L77:
  mov    %r14,%rsi
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  add    $0xc,%r14
  call   <write_three_large@plt>
  cmp    (%rsp),%r14
  jne    L77
  mov    0x10(%rsp),%r15
  mov    0x1c(%rsp),%r14d
  jmp    L89
```

assistant: ```c
void flush_large(struct coder *coder, int *has_large, int *has_large_ints, const int n, int *large_index, const int large_nbits, unsigned char *compress_buffer, unsigned char **output_ptr) {
  int i;
  if (n < 3) {
    for (i = 0; i < n; i++) {
      write_instruction(coder, 2, output_ptr);
      write_three_large(coder, has_large_ints + i * 3, large_index, large_nbits, compress_buffer, output_ptr);
    }
  } else {
    write_instruction(coder, 6, output_ptr);
    Ptngc_writebits(coder, n - 3, 4, output_ptr);
    for (i = 0; i < n; i++)
      write_three_large(coder, has_large_ints + i * 3, large_index, large_nbits, compress_buffer, output_ptr);
  }
  if (((*has_large) - n) != 0) {
    int j;
    for (i = 0; i < (*has_large) - n; i++)
      for (j = 0; j < 3; j++)
        has_large_ints[i * 3 + j] = has_large_ints[(i + n) * 3 + j];
  }
  *has_large = (*has_large) - n;
}
```