user: 请从给定的汇编指令推导出C源代码:

```asm
<parse_ttx_pes>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    (%rdx),%esi
  mov    %rdi,%rbx
  lea    D34(%rip),%rdi
  lea    0x1(%rsi),%eax
  mov    %eax,(%rdx)
  mov    %r12,%rdx
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rbx),%edx
  mov    0x4(%rbx),%ecx
  mov    0x8(%rbx),%r8d
  test   %edx,%edx
  jne    L96
  test   %ecx,%ecx
  jne    L96
  cmp    $0x1,%r8d
  je     L6
L96:
  mov    0x0(%rbp),%esi
  pop    %rbx
  lea    D58(%rip),%rdi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  sub    $0x1,%esi
  jmp    1080 <printf@plt>
  nopl   0x0(%rax,%rax,1)
L6:
  mov    0xc(%rbx),%edx
  cmp    $0xbd,%edx
  jne    L38
  lea    0x10(%rbx),%rdi
  call   <read_be16@plt>
  mov    %rax,%rdx
  lea    -0x6(%r12),%rax
  cmp    %rdx,%rax
  jne    L5
  movabs $0xd37a6f4de9bd37a7,%rax
  movabs $0x1642c8590b21642,%rdx
  imul   %r12,%rax
  ror    $0x3,%rax
  cmp    %rdx,%rax
  ja     L17
  testb  $0x4,0x18(%rbx)
  je     L22
  mov    0x20(%rbx),%edx
  cmp    $0x24,%edx
  jne    L20
  lea    -0x2d(%r12),%rsi
  lea    0xb4(%rbx),%rdi
  call   <parse_ttx@plt>
  mov    0x0(%rbp),%esi
  lea    D68(%rip),%rdi
  sub    $0x1,%esi
L13:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  jmp    1080 <printf@plt>
  nopl   (%rax)
L38:
  mov    0x0(%rbp),%esi
  pop    %rbx
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  sub    $0x1,%esi
  jmp    1080 <printf@plt>
L20:
  mov    0x0(%rbp),%esi
  pop    %rbx
  mov    $0x24,%ecx
  lea    D73(%rip),%rdi
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  sub    $0x1,%esi
  jmp    1080 <printf@plt>
  nopl   (%rax)
L5:
  mov    0x0(%rbp),%esi
  pop    %rbx
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  sub    $0x1,%esi
  jmp    1080 <printf@plt>
  nopl   0x0(%rax,%rax,1)
L17:
  mov    0x0(%rbp),%esi
  lea    D15(%rip),%rdi
  sub    $0x1,%esi
  jmp    L13
  nop
L22:
  mov    0x0(%rbp),%esi
  lea    D64(%rip),%rdi
  sub    $0x1,%esi
  jmp    L13
```

tool_calls: name: unpack_data
arguments: data_tag: D34
type: string
name: unpack_data
arguments: data_tag: D58
type: string
name: unpack_data
arguments: data_tag: D68
type: string
name: unpack_data
arguments: data_tag: D63
type: string
name: unpack_data
arguments: data_tag: D73
type: string
name: unpack_data
arguments: data_tag: D14
type: string
name: unpack_data
arguments: data_tag: D15
type: string
name: unpack_data
arguments: data_tag: D64
type: string

tool: D34: TTX_PES[%u] : Received PES packet of size %zu.


tool: D58: TTX_PES[%u] : PES magic number incorrect : %hhx%hhx%hhx.


tool: D68: TTX_PES[%u] : Finished.


tool: D63: TTX_PES[%u] : PES stream ID incorrect : %hhx.


tool: D73: TTX_PES[%u] : Header length %hhu different from expected (%hhu).


tool: D14: TTX_PES[%u] : PES packet length mismatch : %hu.


tool: D15: TTX_PES[%u] : Declared PES packet length incorrect.


tool: D64: TTX_PES[%u] : Data alignment indicator set to zero.


assistant: ```c
void parse_ttx_pes(const uint8_t *pes, size_t size, void *user_data) {
  unsigned int *ttx_pes_pkt_no = user_data;
  ++(*ttx_pes_pkt_no);
  do {
    printf("TTX_PES[%u] : "
           "Received PES packet of size %zu.\n",
           *ttx_pes_pkt_no - 1, size);
  } while (0);
  if (pes[0] != 0x00 || pes[1] != 0x00 || pes[2] != 0x01) {
    do {
      printf("TTX_PES[%u] : "
             "PES magic number incorrect : %hhx%hhx%hhx.\n",
             *ttx_pes_pkt_no - 1, pes[0], pes[1], pes[2]);
    } while (0);
    return;
  }
  if (pes[3] != 0xBD) {
    do {
      printf("TTX_PES[%u] : "
             "PES stream ID incorrect : %hhx.\n",
             *ttx_pes_pkt_no - 1, pes[3]);
    } while (0);
    return;
  }
  uint16_t pes_pkt_len = read_be16(pes + 4);
  if (pes_pkt_len != size - 6) {
    do {
      printf("TTX_PES[%u] : "
             "PES packet length mismatch : %hu.\n",
             *ttx_pes_pkt_no - 1, pes_pkt_len);
    } while (0);
    return;
  }
  if (((pes_pkt_len + 6) % 184) != 0) {
    do {
      printf("TTX_PES[%u] : "
             "Declared PES packet length incorrect.\n",
             *ttx_pes_pkt_no - 1);
    } while (0);
    return;
  }
  if (!(pes[6] & 0x04)) {
    do {
      printf("TTX_PES[%u] : "
             "Data alignment indicator set to zero.\n",
             *ttx_pes_pkt_no - 1);
    } while (0);
    return;
  }
  if (pes[8] != 0x24) {
    do {
      printf("TTX_PES[%u] : "
             "Header length %hhu different from expected (%hhu).\n",
             *ttx_pes_pkt_no - 1, pes[8], 0x24);
    } while (0);
    return;
  }
  parse_ttx(pes + 9 + 0x24, size - 9 - 0x24);
  do {
    printf("TTX_PES[%u] : "
           "Finished.\n",
           *ttx_pes_pkt_no - 1);
  } while (0);
}
```