user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<Parser_SectionSDT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L79
  movzbl (%rdi),%eax
  mov    %rdi,%r12
  mov    %eax,%edx
  and    $0xfffffffb,%edx
  cmp    $0x42,%dl
  jne    L76
  movzbl 0x1(%rdi),%ebx
  movzbl 0x2(%rdi),%eax
  lea    D161(%rip),%rsi
  mov    $0x40,%edi
  lea    D160(%rip),%r15
  shl    $0x8,%ebx
  and    $0xf00,%bx
  or     %eax,%ebx
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  movzbl (%r12),%edx
  lea    D191(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  call   <Parser_TsPacketLog@plt>
  movzbl 0x1(%r12),%edx
  lea    D184(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  shr    $0x7,%dl
  movzbl %dl,%edx
  call   <Parser_TsPacketLog@plt>
  movswl %bx,%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D11(%rip),%rsi
  call   <Parser_TsPacketLog@plt>
  movzwl 0x3(%r12),%edx
  lea    D108(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  rol    $0x8,%dx
  movzwl %dx,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl 0x5(%r12),%edx
  lea    D71(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  sar    %edx
  and    $0x1f,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl 0x5(%r12),%edx
  lea    D181(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  and    $0x1,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl 0x6(%r12),%edx
  lea    D89(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  call   <Parser_TsPacketLog@plt>
  movzbl 0x7(%r12),%edx
  lea    D14(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  call   <Parser_TsPacketLog@plt>
  movzwl 0x8(%r12),%edx
  lea    D23(%rip),%rsi
  xor    %eax,%eax
  mov    $0x40,%edi
  rol    $0x8,%dx
  movzwl %dx,%edx
  call   <Parser_TsPacketLog@plt>
  movswq %bx,%rax
  mov    $0x40,%edi
  lea    D55(%rip),%rsi
  movzbl (%r12,%rax,1),%edx
  movzbl 0x2(%r12,%rax,1),%ecx
  shl    $0x10,%edx
  or     %ecx,%edx
  movzbl -0x1(%r12,%rax,1),%ecx
  movzbl 0x1(%r12,%rax,1),%eax
  shl    $0x18,%ecx
  or     %ecx,%edx
  shl    $0x8,%eax
  sub    $0xc,%ebx
  or     %eax,%edx
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  movzwl %bx,%eax
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  je     L112
  movl   $0x0,0x4(%rsp)
  mov    $0xb,%ebx
L111:
  lea    0x3(%rbx),%ebp
  mov    $0x40,%edi
  lea    0x2(%rbx),%r14d
  xor    %eax,%eax
  add    %r12,%rbp
  lea    D54(%rip),%rsi
  add    %r12,%r14
  call   <Parser_TsPacketLog@plt>
  movzbl 0x0(%rbp),%r13d
  lea    0x4(%rbx),%eax
  lea    D110(%rip),%rsi
  movzbl (%r12,%rax,1),%eax
  mov    $0x40,%edi
  shl    $0x8,%r13d
  and    $0xf00,%r13w
  or     %eax,%r13d
  mov    %ebx,%eax
  movzbl (%r12,%rax,1),%edx
  lea    0x1(%rbx),%eax
  mov    %r13w,0xa(%rsp)
  add    $0x5,%ebx
  movzbl (%r12,%rax,1),%eax
  shl    $0x8,%edx
  or     %eax,%edx
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  movzbl (%r14),%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D18(%rip),%rsi
  sar    %edx
  and    $0x1,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl (%r14),%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D8(%rip),%rsi
  movswl %r13w,%r14d
  and    $0x1,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl 0x0(%rbp),%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D20(%rip),%rsi
  shr    $0x5,%dl
  movzbl %dl,%edx
  call   <Parser_TsPacketLog@plt>
  movzbl 0x0(%rbp),%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D7(%rip),%rsi
  sar    $0x4,%edx
  and    $0x1,%edx
  call   <Parser_TsPacketLog@plt>
  mov    %r14d,%edx
  mov    $0x40,%edi
  xor    %eax,%eax
  lea    D170(%rip),%rsi
  call   <Parser_TsPacketLog@plt>
  test   %r13w,%r13w
  je     L121
  xor    %ebp,%ebp
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L118:
  mov    $0x40,%edi
  call   <x00_Tag_DescriptorParser@plt>
  mov    %eax,%r13d
L42:
  add    $0x2,%r13d
  mov    %r15,%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  movzwl %r13w,%r13d
  add    %r13d,%ebp
  add    %r13d,%ebx
  cmp    %r14d,%ebp
  jae    L121
L75:
  lea    D159(%rip),%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  mov    %ebx,%esi
  add    %r12,%rsi
  movzbl (%rsi),%eax
  cmp    $0x48,%al
  je     L4
  cmp    $0x5d,%al
  jne    L118
  mov    $0x40,%edi
  call   <x5D_Tag_DescriptorParser@plt>
  mov    %eax,%r13d
  jmp    L42
  nopl   0x0(%rax)
L4:
  mov    $0x40,%edi
  call   <x48_Tag_DescriptorParser@plt>
  mov    %eax,%r13d
  jmp    L42
  nop
L121:
  mov    %r15,%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  movzwl 0xa(%rsp),%r13d
  add    $0x5,%r13d
  movzwl %r13w,%r13d
  add    %r13d,0x4(%rsp)
  mov    0x4(%rsp),%eax
  cmp    0xc(%rsp),%eax
  jb     L111
L112:
  mov    %r15,%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  xor    %eax,%eax
L89:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  movzbl %al,%edx
  lea    D202(%rip),%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  mov    $0xffffffff,%eax
  jmp    L89
L79:
  lea    D42(%rip),%rsi
  mov    $0x40,%edi
  xor    %eax,%eax
  call   <Parser_TsPacketLog@plt>
  mov    $0xffffffff,%eax
  jmp    L89
```

tool_calls: name: disassemble_data
arguments: label: D161
datatype: string
name: disassemble_data
arguments: label: D160
datatype: string
name: disassemble_data
arguments: label: D191
datatype: string
name: disassemble_data
arguments: label: D184
datatype: string
name: disassemble_data
arguments: label: D11
datatype: string
name: disassemble_data
arguments: label: D108
datatype: string
name: disassemble_data
arguments: label: D71
datatype: string
name: disassemble_data
arguments: label: D181
datatype: string
name: disassemble_data
arguments: label: D89
datatype: string
name: disassemble_data
arguments: label: D14
datatype: string
name: disassemble_data
arguments: label: D23
datatype: string
name: disassemble_data
arguments: label: D55
datatype: string
name: disassemble_data
arguments: label: D54
datatype: string
name: disassemble_data
arguments: label: D110
datatype: string
name: disassemble_data
arguments: label: D18
datatype: string
name: disassemble_data
arguments: label: D8
datatype: string
name: disassemble_data
arguments: label: D20
datatype: string
name: disassemble_data
arguments: label: D7
datatype: string
name: disassemble_data
arguments: label: D170
datatype: string
name: disassemble_data
arguments: label: D159
datatype: string
name: disassemble_data
arguments: label: D202
datatype: string
name: disassemble_data
arguments: label: D42
datatype: string

tool: D161: ****************SDT Info****************


tool: D160: ****************************************


tool: D191: SDT table id = 0x%x


tool: D184: SDT section_syntax_indicator = 0x%x


tool: D11: SDT section_length = 0x%x


tool: D108: SDT transport_stream_id = 0x%x


tool: D71: SDT version_number = 0x%x


tool: D181: SDT current_next_indicator = 0x%x


tool: D89: SDT section_number = 0x%x


tool: D14: SDT last_section_number = 0x%x


tool: D23: SDT original_network_id = 0x%x


tool: D55: SDT crc = 0x%08x


tool: D54: ****************SDT Service Info****************


tool: D110: SDT service_id = 0x%x


tool: D18: SDT EIT_schedule_flag = 0x%x


tool: D8: SDT EIT_present_following_flag = 0x%x


tool: D20: SDT running_status = 0x%x


tool: D7: SDT free_CA_mode = 0x%x


tool: D170: SDT descriptors_loop_length = 0x%x


tool: D159: ****************SDT Service Descriptor Info****************


tool: D202: SDT table id is error : %x


tool: D42: SDT error: section is NULL !


assistant: ```c
int Parser_SectionSDT(unsigned char *section) {
  unsigned short descriptor_offset = 0;
  unsigned short service_offset = 0;
  unsigned short section_len = 0;
  unsigned short descriptor_loop_len = 0;
  unsigned short service_loop_len = 0;
  unsigned int i = 0, j = 0;
  unsigned int data_offset = 0;
  int ret = -1;
  if (NULL == section) {
    Parser_TsPacketLog((0x00000040), "SDT error: section is NULL !\n");
    return -1;
  }
  if ((0x42 != section[0]) && (0x46 != section[0])) {
    Parser_TsPacketLog((0x00000040), "SDT table id is error : %x\n", section[0]);
    return -1;
  }
  section_len = ((section[1] & 0x0F) << 8) | (section[2] & 0xFF);
  Parser_TsPacketLog((0x00000040), "****************SDT Info****************\n");
  Parser_TsPacketLog((0x00000040), "SDT table id = 0x%x\n", section[0]);
  Parser_TsPacketLog((0x00000040), "SDT section_syntax_indicator = 0x%x\n", (section[1] & 0x80) >> 7);
  Parser_TsPacketLog((0x00000040), "SDT section_length = 0x%x\n", section_len);
  Parser_TsPacketLog((0x00000040), "SDT transport_stream_id = 0x%x\n", ((section[3] & 0xFF) << 8) | (section[4] & 0xFF));
  Parser_TsPacketLog((0x00000040), "SDT version_number = 0x%x\n", (section[5] & 0x3E) >> 1);
  Parser_TsPacketLog((0x00000040), "SDT current_next_indicator = 0x%x\n", section[5] & 0x01);
  Parser_TsPacketLog((0x00000040), "SDT section_number = 0x%x\n", section[6]);
  Parser_TsPacketLog((0x00000040), "SDT last_section_number = 0x%x\n", section[7]);
  Parser_TsPacketLog((0x00000040), "SDT original_network_id = 0x%x\n", ((section[8] & 0xFF) << 8) | (section[9] & 0xFF));
  Parser_TsPacketLog((0x00000040), "SDT crc = 0x%08x\n", (section[section_len - 1] << 24) | ((section[section_len] & 0xFF) << 16) | ((section[section_len + 1] & 0xFF) << 8) | (section[section_len + 2] & 0xFF));
  data_offset += 11;
  service_loop_len = section_len - 12;
  for (i = 0; i < service_loop_len; i += service_offset) {
    Parser_TsPacketLog((0x00000040), "****************SDT Service Info****************\n");
    descriptor_loop_len = ((section[data_offset + 3] & 0x0F) << 8) | (section[data_offset + 4] & 0xFF);
    Parser_TsPacketLog((0x00000040), "SDT service_id = 0x%x\n", ((section[data_offset] & 0xFF) << 8) | (section[data_offset + 1] & 0xFF));
    Parser_TsPacketLog((0x00000040), "SDT EIT_schedule_flag = 0x%x\n", (section[data_offset + 2] & 0x02) >> 1);
    Parser_TsPacketLog((0x00000040), "SDT EIT_present_following_flag = 0x%x\n", (section[data_offset + 2] & 0x01));
    Parser_TsPacketLog((0x00000040), "SDT running_status = 0x%x\n", (section[data_offset + 3] & 0xE0) >> 5);
    Parser_TsPacketLog((0x00000040), "SDT free_CA_mode = 0x%x\n", (section[data_offset + 3] & 0x10) >> 4);
    Parser_TsPacketLog((0x00000040), "SDT descriptors_loop_length = 0x%x\n", descriptor_loop_len);
    data_offset += 5;
    for (j = 0; j < descriptor_loop_len; j += descriptor_offset) {
      Parser_TsPacketLog((0x00000040), "****************SDT Service Descriptor Info****************\n");
      switch (section[data_offset]) {
      case 0x48:
        descriptor_offset = x48_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      case 0x5D:
        descriptor_offset = x5D_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      default:
        descriptor_offset = x00_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      }
      descriptor_offset += 2;
      data_offset += descriptor_offset;
      Parser_TsPacketLog((0x00000040), "****************************************\n");
    }
    service_offset = descriptor_loop_len + 5;
    Parser_TsPacketLog((0x00000040), "****************************************\n");
  }
  Parser_TsPacketLog((0x00000040), "****************************************\n");
  ret = 0;
  return ret;
}
```