user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<gator_write_packed_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0xffffff80,%eax
  test   %eax,%eax
  jne    L37
  mov    -0xc(%rbp),%eax
  and    $0x7f,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    $0x1,%eax
  jmp    L54
L37:
  mov    -0xc(%rbp),%eax
  and    $0xffffc000,%eax
  test   %eax,%eax
  jne    L39
  mov    -0xc(%rbp),%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x7,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  and    $0x7f,%edx
  mov    %dl,(%rax)
  mov    $0x2,%eax
  jmp    L54
L39:
  mov    -0xc(%rbp),%eax
  and    $0xffe00000,%eax
  test   %eax,%eax
  jne    L79
  mov    -0xc(%rbp),%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x7,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0xe,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  and    $0x7f,%edx
  mov    %dl,(%rax)
  mov    $0x3,%eax
  jmp    L54
L79:
  mov    -0xc(%rbp),%eax
  and    $0xf0000000,%eax
  test   %eax,%eax
  jne    L7
  mov    -0xc(%rbp),%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x7,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0xe,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x15,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  and    $0x7f,%edx
  mov    %dl,(%rax)
  mov    $0x4,%eax
  jmp    L54
L7:
  mov    -0xc(%rbp),%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x7,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0xe,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x15,%eax
  or     $0xffffff80,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  shr    $0x1c,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    %dl,(%rax)
  mov    $0x5,%eax
L54:
  pop    %rbp
  ret
```

assistant: ```c
int gator_write_packed_int(char *buffer, unsigned int x) {
  if ((x & 0xffffff80) == 0) {
    buffer[0] = x & 0x7f;
    return 1;
  } else if ((x & 0xffffc000) == 0) {
    buffer[0] = x | 0x80;
    buffer[1] = (x >> 7) & 0x7f;
    return 2;
  } else if ((x & 0xffe00000) == 0) {
    buffer[0] = x | 0x80;
    buffer[1] = (x >> 7) | 0x80;
    buffer[2] = (x >> 14) & 0x7f;
    return 3;
  } else if ((x & 0xf0000000) == 0) {
    buffer[0] = x | 0x80;
    buffer[1] = (x >> 7) | 0x80;
    buffer[2] = (x >> 14) | 0x80;
    buffer[3] = (x >> 21) & 0x7f;
    return 4;
  } else {
    buffer[0] = x | 0x80;
    buffer[1] = (x >> 7) | 0x80;
    buffer[2] = (x >> 14) | 0x80;
    buffer[3] = (x >> 21) | 0x80;
    buffer[4] = (x >> 28) & 0x0f;
    return 5;
  }
}
```