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

```asm
<snmp_length>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jbe    L101
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jns    L106
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x7f,%eax
  add    %edx,%eax
  cmp    %eax,-0x24(%rbp)
  ja     L106
L101:
  mov    -0x18(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <FRAMERR@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L83
L106:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x30(%rbp),%rdx
  mov    %ecx,(%rdx)
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L87
  mov    -0x8(%rbp),%eax
  and    $0x7f,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jne    L56
  mov    -0x18(%rbp),%rax
  lea    D14(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <FRAMERR@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L83
L56:
  movl   $0x0,-0x8(%rbp)
  jmp    L77
L102:
  mov    -0x8(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%esi
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    -0x30(%rbp),%rdx
  mov    %ecx,(%rdx)
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %esi,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x10000,-0x8(%rbp)
  jbe    L77
  mov    -0x18(%rbp),%rax
  lea    D14(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <FRAMERR@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L83
L77:
  cmpl   $0x0,-0x4(%rbp)
  jne    L102
L87:
  mov    -0x8(%rbp),%eax
L83:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D8
type: string
name: unpack_data
arguments: data_tag: D14
type: string

tool: D8: snmp: truncated


tool: D14: snmp: unexpected value


assistant: ```c
const unsigned snmp_length(struct NetFrame *frame, const unsigned char *px, unsigned length, unsigned *r_offset) {
  unsigned result;
  if ((*r_offset >= length) || (px[*r_offset] & 0x80) && ((*r_offset) + (px[*r_offset] & 0x7F) >= length)) {
    FRAMERR(frame, "snmp: truncated\n");
    *r_offset = length;
    return 0xFFFFffff;
  }
  result = px[(*r_offset)++];
  if (result & 0x80) {
    unsigned length_of_length = result & 0x7F;
    if (length_of_length == 0) {
      FRAMERR(frame, "snmp: unexpected value\n");
      *r_offset = length;
      return 0xFFFFffff;
    }
    result = 0;
    while (length_of_length) {
      result = result * 256 + px[(*r_offset)++];
      if (result > 0x10000) {
        FRAMERR(frame, "snmp: unexpected value\n");
        *r_offset = length;
        return 0xFFFFffff;
      }
    }
  }
  return result;
}
```