user: 这段汇编代码用C语言表示是什么样的：

```asm
<pmt_decode_group>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L112
L118:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L40
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  and    $0x7f,%eax
  mov    %eax,-0x14(%rbp)
  addq   $0x4,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  sub    -0x28(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jle    L94
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L94:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  sub    -0x38(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jle    L88
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L88:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  addq   $0x4,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x8(%rbp)
  jmp    L112
L40:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  addq   $0x4,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  sub    -0x28(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jle    L77
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L77:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  sub    -0x38(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jle    L4
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L4:
  mov    -0x18(%rbp),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x8(%rbp)
L112:
  mov    -0x10(%rbp),%rax
  sub    -0x28(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jl     L118
  mov    -0x8(%rbp),%rax
  sub    -0x38(%rbp),%rax
  sar    $0x2,%rax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  je     L37
  mov    -0x30(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L35
L37:
  mov    -0x1c(%rbp),%eax
L35:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D2
type_guessed: string
name: parse_data
arguments: tag: D11
type_guessed: string
name: parse_data
arguments: tag: D10
type_guessed: string

tool: D2: ERROR: attempted to read past end of input data.

tool: D11: ERROR: attempted to write past end of output buffer.

tool: D10: ERROR: decoded %d bytes, expected %d


assistant: ```c
int pmt_decode_group(uint8_t *raw_group_buf, int raw_group_size, uint8_t *decoded_group_buf, int decoded_group_buf_size) {
  uint8_t *src = raw_group_buf;
  uint8_t *dst = decoded_group_buf;
  while ((src - raw_group_buf) < raw_group_size) {
    if (*src & 0x80) {
      uint8_t run_length = *src & 0x7f;
      src++;
      if ((src - raw_group_buf) > raw_group_size) {
        printf("ERROR: attempted to read past end of input data.\n");
        return -1;
      }
      if ((dst + run_length - decoded_group_buf) > decoded_group_buf_size) {
        printf("ERROR: attempted to write past end of output buffer.\n");
        return -1;
      }
      memset(dst, *src, run_length);
      src++;
      dst += run_length;
    } else {
      uint8_t copy_count = *src;
      src++;
      if ((src - raw_group_buf) > raw_group_size) {
        printf("ERROR: attempted to read past end of input data.\n");
        return -1;
      }
      if ((dst + copy_count - decoded_group_buf) > decoded_group_buf_size) {
        printf("ERROR: attempted to write past end of output buffer.\n");
        return -1;
      }
      memcpy(dst, src, copy_count);
      src += copy_count;
      dst += copy_count;
    }
  }
  int decoded_bytes = dst - decoded_group_buf;
  if (decoded_bytes != decoded_group_buf_size) {
    printf("ERROR: decoded %d bytes, expected %d\n", decoded_bytes, decoded_group_buf_size);
    return -1;
  } else {
    return decoded_bytes;
  }
}
```