user: Please show me the C implementation that matches the assembly code listed below:

```asm
<demo>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    $0x0,%eax
  call   <screen_width@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <screen_height@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <rand@plt>
  lea    -0x15(%r12),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%ebp
  lea    0x10(%rdx),%r14d
  mov    $0x0,%eax
  call   <rand@plt>
  lea    -0xa(%rbx),%ecx
  cltd
  idiv   %ecx
  mov    %edx,0xc(%rsp)
  lea    0x5(%rdx),%r13d
  mov    $0x0,%eax
  call   <rand@plt>
  sub    %r14d,%r12d
  lea    -0x5(%r12),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%r15d
  mov    $0x0,%eax
  call   <rand@plt>
  sub    %r13d,%ebx
  lea    -0x5(%rbx),%ecx
  cltd
  idiv   %ecx
  mov    %edx,0x4(%rsp)
  mov    %r14d,%ecx
  lea    D30(%rip),%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <draw_formatted@plt>
  mov    %r13d,%ecx
  lea    D39(%rip),%rdx
  mov    $0x1,%esi
  mov    $0x0,%edi
  call   <draw_formatted@plt>
  mov    %r15d,%ecx
  lea    D29(%rip),%rdx
  mov    $0x2,%esi
  mov    $0x0,%edi
  call   <draw_formatted@plt>
  mov    0x4(%rsp),%ebx
  mov    %ebx,%ecx
  lea    D2(%rip),%rdx
  mov    $0x3,%esi
  mov    $0x0,%edi
  call   <draw_formatted@plt>
  add    $0xb,%ebp
  lea    0x4(%r14,%r15,1),%eax
  mov    %eax,0x8(%rsp)
  lea    0x4(%r13,%rbx,1),%r12d
  cmp    %eax,%ebp
  jle    L15
L66:
  mov    $0x0,%eax
  call   <show_screen@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L69:
  mov    $0x23,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <draw_char@plt>
L6:
  add    $0x1,%ebx
  cmp    %r12d,%ebx
  jg     L62
L8:
  mov    0x4(%rsp),%r9d
  mov    %r15d,%r8d
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <inside_rect@plt>
  test   %eax,%eax
  je     L69
  mov    $0x2b,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <draw_char@plt>
  jmp    L6
L62:
  add    $0x1,%ebp
  cmp    0x8(%rsp),%ebp
  jg     L66
L15:
  mov    0xc(%rsp),%eax
  mov    %eax,%ebx
  cmp    %r12d,%eax
  jle    L8
  jmp    L62
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D30
datatype: string
name: extract_symbolic_data
arguments: data_label: D39
datatype: string
name: extract_symbolic_data
arguments: data_label: D29
datatype: string
name: extract_symbolic_data
arguments: data_label: D2
datatype: string

tool: D30: left  : %d


tool: D39: top   : %d


tool: D29: width : %d


tool: D2: height: %d


assistant: ```c
void demo() {
  const int X_MAX = screen_width();
  const int Y_MAX = screen_height();
  const int LEFT = 11;
  const int MARGIN = 5;
  int left = LEFT + MARGIN + rand() % (X_MAX - LEFT - 2 * MARGIN);
  int top = MARGIN + rand() % (Y_MAX - 2 * MARGIN);
  int width = rand() % (X_MAX - left - MARGIN);
  int height = rand() % (Y_MAX - top - MARGIN);
  draw_formatted(0, 0, "left  : %d\n", left);
  draw_formatted(0, 1, "top   : %d\n", top);
  draw_formatted(0, 2, "width : %d\n", width);
  draw_formatted(0, 3, "height: %d\n", height);
  int x = left - MARGIN;
  while (x < (left + width + MARGIN)) {
    int y = top - MARGIN;
    while (y < (top + height + MARGIN)) {
      bool inside = inside_rect(x, y, left, top, width, height);
      if (inside) {
        draw_char(x, y, '+');
      } else {
        draw_char(x, y, '#');
      }
      y++;
    }
    x++;
  }
  show_screen();
}
```