user: What is the c source code of the assembly code below:

```asm
<GET_NBR>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  movslq %esi,%r13
  push   %r12
  push   %rbp
  lea    D11(%rip),%rbp
  push   %rbx
  mov    %r13,%rbx
  imul   $0x66666667,%r13,%r13
  mov    %ebx,%eax
  mov    %ebx,%r15d
  sar    $0x1f,%eax
  sar    $0x22,%r13
  sub    $0x18,%rsp
  sub    %eax,%r13d
  mov    %rdi,0x8(%rsp)
  lea    0x0(%r13,%r13,4),%eax
  add    %eax,%eax
  sub    %eax,%r15d
  xor    %eax,%eax
  call   <getchar@plt>
  lea    -0x30(%rax),%edx
  cmp    $0x9,%edx
  ja     L32
  jmp    L28
  nopl   (%rax)
L182:
  xor    %eax,%eax
  call   <getchar@plt>
L32:
  cmp    $0xa,%eax
  jne    L182
  mov    %ebx,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  lea    -0x30(%rax),%edx
  cmp    $0x9,%edx
  ja     L32
L28:
  lea    0x0(%r13,%r13,4),%r14d
  xor    %r12d,%r12d
  lea    D11(%rip),%rbp
  add    %r14d,%r14d
  nopl   0x0(%rax)
L188:
  cmp    %r12d,%r13d
  jg     L10
L77:
  jne    L149
  cmp    %edx,%r15d
  jl     L81
  xor    %eax,%eax
  lea    (%r14,%rdx,1),%r12d
  call   <getchar@plt>
L68:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%edx
  ja     L97
  cmp    %r12d,%r13d
  jle    L77
L10:
  lea    (%r12,%r12,4),%eax
  lea    (%rdx,%rax,2),%r12d
  xor    %eax,%eax
  call   <getchar@plt>
  jmp    L68
  nopl   0x0(%rax)
L149:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%eax
  jne    L149
  nopl   0x0(%rax)
L70:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  lea    -0x30(%rax),%edx
  cmp    $0x9,%edx
  jbe    L15
  nopw   0x0(%rax,%rax,1)
L47:
  cmp    $0xa,%eax
  je     L70
  xor    %eax,%eax
  call   <getchar@plt>
  jmp    L47
  xchg   %ax,%ax
L81:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%eax
  jne    L81
  nopl   0x0(%rax)
L6:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  lea    -0x30(%rax),%edx
  cmp    $0x9,%edx
  jbe    L15
  nopl   0x0(%rax,%rax,1)
L41:
  cmp    $0xa,%eax
  je     L6
  xor    %eax,%eax
  call   <getchar@plt>
  jmp    L41
  xchg   %ax,%ax
L75:
  xor    %eax,%eax
  call   <getchar@plt>
L97:
  cmp    $0xa,%eax
  jne    L75
  mov    0x8(%rsp),%rax
  mov    %r12d,(%rax)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L15:
  xor    %r12d,%r12d
  jmp    L188
```

tool_calls: name: retrieve_data
arguments: data_tag: D11
datatype: string

tool: D11:     Not a number (0..%d) - re-input: 

assistant: ```c
void GET_NBR(r, d) int *r, d;
{
  register int c, m, k, l, n;
  {
    n = 0;
    k = d / 10;
    l = d - 10 * (d / 10);
    c = getchar();
    n = 0;
    while ((c < '0') || (c > '9')) {
      while (c != '\n') {
        c = getchar();
      }
      printf("    Not a number (0..%d) - re-input: ", d);
      c = getchar();
    };
    while ((c >= '0') && (c <= '9')) {
      m = c - '0';
      if (n < k) {
        n = 10 * n + m;
        c = getchar();
      } else if (n == k) {
        if (m <= l) {
          n = 10 * n + m;
          c = getchar();
        } else {
          while (c != '\n') {
            c = getchar();
          }
          printf("    Not a number (0..%d) - re-input: ", d);
          c = getchar();
          n = 0;
          while ((c < '0') || (c > '9')) {
            while (c != '\n') {
              c = getchar();
            }
            printf("    Not a number (0..%d) - re-input: ", d);
            c = getchar();
          };
        }
      } else {
        while (c != '\n') {
          c = getchar();
        }
        printf("    Not a number (0..%d) - re-input: ", d);
        c = getchar();
        n = 0;
        while ((c < '0') || (c > '9')) {
          while (c != '\n') {
            c = getchar();
          }
          printf("    Not a number (0..%d) - re-input: ", d);
          c = getchar();
        };
      }
    }
    while (c != '\n') {
      c = getchar();
    }
    *r = n;
  }
}
```