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

```asm
<encode_pulse_distance>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  lea    D49(%rip),%rsi
  push   %r12
  mov    %rdx,%r12
  mov    $0x84d,%edx
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rcx,0x18(%rsp)
  call   <keymap_param@plt>
  mov    $0x753,%edx
  lea    D51(%rip),%rsi
  mov    %r15,%rdi
  mov    %eax,(%r12)
  call   <keymap_param@plt>
  mov    $0x4,%edx
  lea    D83(%rip),%rsi
  mov    %r15,%rdi
  mov    %eax,0x4(%r12)
  call   <keymap_param@plt>
  xor    %edx,%edx
  lea    D97(%rip),%rsi
  mov    %r15,%rdi
  mov    %eax,0x14(%rsp)
  mov    %eax,%ebx
  call   <keymap_param@plt>
  test   %eax,%eax
  je     L98
  test   %ebx,%ebx
  jle    L60
  movslq %ebx,%rax
  lea    D8(%rip),%r14
  xor    %ebx,%ebx
  mov    %rax,0x8(%rsp)
  lea    D92(%rip),%rbp
  jmp    L27
  nopl   0x0(%rax,%rax,1)
L84:
  mov    $0x659,%edx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
  mov    %eax,0xc(%r12,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,0x8(%rsp)
  je     L83
L27:
  mov    $0x271,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
  bt     %ebx,%r13d
  mov    %eax,0x8(%r12,%rbx,8)
  jb     L84
  mov    $0x177,%edx
  lea    D12(%rip),%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
  mov    %eax,0xc(%r12,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L27
L83:
  mov    0x14(%rsp),%eax
  lea    0x2(%rax,%rax,1),%ebx
  movslq %ebx,%rax
  add    $0x1,%ebx
  shl    $0x2,%rax
L88:
  mov    %r15,%rdi
  mov    $0x271,%edx
  lea    D59(%rip),%rsi
  add    %rax,%r12
  call   <keymap_param@plt>
  mov    %eax,(%r12)
  mov    0x18(%rsp),%rax
  mov    %ebx,(%rax)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L98:
  mov    0x14(%rsp),%ebx
  sub    $0x1,%ebx
  js     L60
  lea    0x8(%r12),%rbp
  lea    D8(%rip),%r14
  jmp    L77
  nopw   0x0(%rax,%rax,1)
L82:
  mov    $0x659,%edx
  lea    D92(%rip),%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
L45:
  sub    $0x1,%ebx
  mov    %eax,0x4(%rbp)
  add    $0x8,%rbp
  cmp    $0xffffffff,%ebx
  je     L83
L77:
  mov    $0x271,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
  bt     %ebx,%r13d
  mov    %eax,0x0(%rbp)
  jb     L82
  mov    $0x177,%edx
  lea    D12(%rip),%rsi
  mov    %r15,%rdi
  call   <keymap_param@plt>
  jmp    L45
  cs nopw 0x0(%rax,%rax,1)
L60:
  mov    $0x3,%ebx
  mov    $0x8,%eax
  jmp    L88
```

tool_calls: name: extract_symbolic_data
arguments: label: D49
type_guessed: string
name: extract_symbolic_data
arguments: label: D51
type_guessed: string
name: extract_symbolic_data
arguments: label: D83
type_guessed: string
name: extract_symbolic_data
arguments: label: D97
type_guessed: string
name: extract_symbolic_data
arguments: label: D8
type_guessed: string
name: extract_symbolic_data
arguments: label: D92
type_guessed: string
name: extract_symbolic_data
arguments: label: D12
type_guessed: string
name: extract_symbolic_data
arguments: label: D59
type_guessed: string

tool: D49: header_pulse

tool: D51: header_space

tool: D83: bits

tool: D97: reverse

tool: D8: bit_pulse

tool: D92: bit_1_space

tool: D12: bit_0_space

tool: D59: trailer_pulse

assistant: ```c
void encode_pulse_distance(struct keymap *map, uint32_t scancode, int *buf, int *length) {
  int len = 0, bits, i;
  buf[len++] = keymap_param(map, "header_pulse", 2125);
  buf[len++] = keymap_param(map, "header_space", 1875);
  bits = keymap_param(map, "bits", 4);
  if (keymap_param(map, "reverse", 0)) {
    for (i = 0; i < bits; i++) {
      buf[len++] = keymap_param(map, "bit_pulse", 625);
      if (scancode & (1 << i))
        buf[len++] = keymap_param(map, "bit_1_space", 1625);
      else
        buf[len++] = keymap_param(map, "bit_0_space", 375);
    }
  } else {
    for (i = bits - 1; i >= 0; i--) {
      buf[len++] = keymap_param(map, "bit_pulse", 625);
      if (scancode & (1 << i))
        buf[len++] = keymap_param(map, "bit_1_space", 1625);
      else
        buf[len++] = keymap_param(map, "bit_0_space", 375);
    }
  }
  buf[len++] = keymap_param(map, "trailer_pulse", 625);
  *length = len;
}
```