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

```asm
<send_rtp_frame>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %ecx,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmpq   $0x0,0x70(%rsp)
  jle    L11
  mov    D42(%rip),%r8
  test   %rdx,%rdx
  jle    L50
  mov    D75(%rip),%rcx
  cmp    $0x578,%rdx
  jle    L19
L70:
  mov    %r12,%rax
  xor    %ebx,%ebx
  mov    %r14,%r12
  mov    %rax,%r14
L40:
  mov    0x68(%rsp),%eax
  mov    %rbx,%r9
  mov    %r15,%rsi
  mov    $0x578,%edx
  mov    %r12,%rdi
  sub    $0x578,%r14
  add    $0x15e0,%r15
  add    $0x578,%rbx
  push   %rax
  mov    0x68(%rsp),%eax
  push   %rax
  push   %r13
  push   %rbp
  mov    0x2c(%rsp),%eax
  push   %rax
  push   $0x0
  call   <send_rtp_packet@plt>
  mov    D75(%rip),%rax
  mov    D42(%rip),%r8
  add    $0x30,%rsp
  lea    0x1(%rax),%rcx
  mov    %rcx,D50(%rip)
  cmp    $0x578,%r14
  jg     L40
  mov    %r14,%rax
  mov    %r12,%r14
  mov    %rbx,%r9
  mov    %r15,%rsi
  mov    %rax,%r12
  mov    0x68(%rsp),%eax
  mov    %r14,%rdi
  mov    %r12,%rdx
  push   %rax
  mov    0x68(%rsp),%eax
  push   %rax
  push   %r13
  push   %rbp
  mov    0x2c(%rsp),%eax
  push   %rax
  push   $0x1
  call   <send_rtp_packet@plt>
  add    $0x30,%rsp
  addq   $0x1,D50(%rip)
  cmpq   $0x0,0x70(%rsp)
  jle    L81
L50:
  mov    0x70(%rsp),%rax
  add    %rax,D50(%rip)
L81:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L19:
  mov    0x68(%rsp),%eax
  xor    %r9d,%r9d
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  push   %rax
  mov    0x68(%rsp),%eax
  push   %rax
  push   %r13
  push   %rbp
  mov    0x2c(%rsp),%eax
  push   %rax
  push   $0x1
  call   <send_rtp_packet@plt>
  addq   $0x1,D50(%rip)
  add    $0x30,%rsp
  jmp    L50
  nopl   0x0(%rax,%rax,1)
L11:
  lea    0x10(%rsp),%rdi
  xor    %esi,%esi
  call   <gettimeofday@plt>
  mov    0x10(%rsp),%eax
  cltd
  shr    $0x10,%edx
  lea    (%rax,%rdx,1),%r8d
  mov    0x14(%rsp),%eax
  movzwl %r8w,%r8d
  sub    %edx,%r8d
  lea    (%rax,%rax,8),%edx
  movslq %edx,%rax
  imul   $0x15f90,%r8d,%r8d
  sar    $0x1f,%edx
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  sub    %edx,%eax
  add    %eax,%r8d
  movslq %r8d,%r8
  mov    %r8,D50(%rip)
  test   %r12,%r12
  jle    L81
  mov    D50(%rip),%rcx
  cmp    $0x578,%r12
  jg     L70
  mov    0x68(%rsp),%eax
  xor    %r9d,%r9d
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  push   %rax
  mov    0x68(%rsp),%eax
  push   %rax
  push   %r13
  push   %rbp
  mov    0x2c(%rsp),%eax
  push   %rax
  push   $0x1
  call   <send_rtp_packet@plt>
  addq   $0x1,D50(%rip)
  add    $0x30,%rsp
  jmp    L81
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void send_rtp_frame(struct UdpSocket *sock, uint8_t *Jpeg, uint32_t JpegLen, int w, int h, uint8_t format_code, uint8_t quality_code, uint8_t has_dri_header, uint32_t delta_t) {
  static uint32_t packetcounter = 0;
  static uint32_t timecounter = 0;
  uint32_t offset = 0;
  if (delta_t <= 0) {
    struct timeval tv;
    gettimeofday(&tv, 0);
    uint32_t t = (tv.tv_sec % (256 * 256)) * 90000 + tv.tv_usec * 9 / 100;
    timecounter = t;
  }
  for (; JpegLen > 0;) {
    uint32_t len = 1400;
    uint8_t lastpacket = 0;
    if (JpegLen <= len) {
      lastpacket = 1;
      len = JpegLen;
    }
    send_rtp_packet(sock, Jpeg, len, packetcounter, timecounter, offset, lastpacket, w, h, format_code, quality_code, has_dri_header);
    JpegLen -= len;
    Jpeg += len;
    offset += len;
    packetcounter++;
  }
  if (delta_t > 0) {
    timecounter += delta_t;
  }
}
```