user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<gen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %esi,0x28(%rsp)
  cmp    %edi,%esi
  jl     L57
  lea    D5(%rip),%r13
  mov    %edi,%r14d
L37:
  mov    0x28(%rsp),%eax
  mov    %r13,%rdi
  lea    (%rax,%r14,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %eax,0x2c(%rsp)
  call   <printf@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %r14d,%eax
  jl     L152
L59:
  mov    0x1c(%rsp),%eax
  mov    %r13,%rdi
  lea    (%rax,%r14,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %eax,0x30(%rsp)
  call   <printf@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x20(%rsp)
  cmp    %r14d,%eax
  jl     L179
L159:
  mov    0x20(%rsp),%eax
  mov    %r13,%rdi
  lea    (%rax,%r14,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %eax,0x34(%rsp)
  call   <printf@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x24(%rsp)
  cmp    %r14d,%eax
  jl     L131
L76:
  mov    0x24(%rsp),%eax
  mov    %r13,%rdi
  lea    (%rax,%r14,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %eax,0x38(%rsp)
  call   <printf@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    %r14d,%eax
  jl     L44
L79:
  mov    0x8(%rsp),%eax
  mov    %r13,%rdi
  add    %r14d,%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%esi
  lea    -0x1(%rbx),%r15d
  call   <printf@plt>
  cmp    %r14d,%r15d
  jl     L40
  mov    %ebx,0xc(%rsp)
  mov    %r14d,%ebx
L133:
  lea    (%r15,%rbx,1),%eax
  mov    %r13,%rdi
  mov    %eax,%ebp
  shr    $0x1f,%ebp
  add    %eax,%ebp
  sar    %ebp
  mov    %ebp,%esi
  call   <printf@plt>
  lea    -0x1(%rbp),%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jl     L78
  mov    %ebp,0x10(%rsp)
  mov    %ebx,%ebp
L47:
  mov    0x14(%rsp),%eax
  mov    %r13,%rdi
  add    %ebp,%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%esi
  lea    -0x1(%rbx),%r14d
  call   <printf@plt>
  cmp    %ebp,%r14d
  jl     L17
  mov    %ebx,0x18(%rsp)
  mov    %r14d,%ebx
L82:
  lea    (%rbx,%rbp,1),%eax
  mov    %r13,%rdi
  mov    %eax,%r12d
  shr    $0x1f,%r12d
  add    %eax,%r12d
  sar    %r12d
  mov    %r12d,%esi
  lea    -0x1(%r12),%r14d
  call   <printf@plt>
  cmp    %ebp,%r14d
  jl     L71
  mov    %r12d,%ecx
  mov    %ebx,%r12d
  mov    %r14d,%ebx
  mov    %ebp,%r14d
L65:
  lea    (%rbx,%r14,1),%edx
  mov    %r13,%rdi
  mov    %ecx,0x3c(%rsp)
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,%ebp
  mov    %eax,%esi
  call   <printf@plt>
  mov    %r14d,%edi
  lea    -0x1(%rbp),%esi
  lea    0x1(%rbp),%r14d
  call   <gen>
  cmp    %r14d,%ebx
  mov    0x3c(%rsp),%ecx
  jge    L65
  mov    %r12d,%ebx
  mov    %ecx,%r12d
L71:
  lea    0x1(%r12),%ebp
  cmp    %ebp,%ebx
  jge    L82
  mov    0x18(%rsp),%ebx
L17:
  lea    0x1(%rbx),%ebp
  cmp    %ebp,0x14(%rsp)
  jge    L47
  mov    0x10(%rsp),%ebp
L78:
  lea    0x1(%rbp),%ebx
  cmp    %ebx,%r15d
  jge    L133
  mov    0xc(%rsp),%ebx
L40:
  lea    0x1(%rbx),%r14d
  cmp    %r14d,0x8(%rsp)
  jge    L79
L44:
  mov    0x38(%rsp),%r14d
  add    $0x1,%r14d
  cmp    %r14d,0x24(%rsp)
  jge    L76
L131:
  mov    0x34(%rsp),%r14d
  add    $0x1,%r14d
  cmp    %r14d,0x20(%rsp)
  jge    L159
L179:
  mov    0x30(%rsp),%r14d
  add    $0x1,%r14d
  cmp    %r14d,0x1c(%rsp)
  jge    L59
L152:
  mov    0x2c(%rsp),%r14d
  add    $0x1,%r14d
  cmp    0x28(%rsp),%r14d
  jle    L37
L57:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D5
type_guessed: string

tool: D5: %d


assistant: ```c
void gen(int lo, int hi) {
  if (lo > hi)
    return;
  int mid = (lo + hi) / 2;
  printf("%d\n", mid);
  gen(lo, mid - 1);
  gen(mid + 1, hi);
}
```