user: Demonstrate the C code that generates the assembly output below:

```asm
<stringToNumber>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r14
  mov    %rdx,%rbp
  cmpb   $0x30,(%rdi)
  je     L195
L5:
  mov    $0x0,%ebx
L307:
  mov    %ebx,%r13d
  movsbl (%r12,%rbx,1),%edi
  call   <isdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L307
L101:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L102
  movslq %r13d,%rdx
  movzbl (%r12,%rdx,1),%edx
L264:
  cmp    %al,%dl
  je     L112
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  jne    L264
L102:
  movslq %r13d,%rax
  cmpb   $0x0,(%r12,%rax,1)
  jne    L95
  mov    $0x0,%r15d
  jmp    L15
L195:
  movsbl 0x1(%rdi),%edi
  call   <tolower@plt>
  cmp    $0x78,%al
  jne    L5
  mov    $0x2,%ebx
L84:
  mov    %ebx,%r13d
  movsbl (%r12,%rbx,1),%edi
  call   <isxdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L84
  jmp    L101
L184:
  movsbl 0x1(%r12),%edi
  call   <tolower@plt>
  cmp    $0x78,%al
  jne    L135
  cmp    $0xa,%r13d
  jg     L71
  lea    -0x1(%r13),%eax
  cmp    $0x2,%r13d
  jle    L42
  cltq
  lea    (%r12,%rax,1),%rbp
  lea    -0x8(,%r13,4),%r13d
  mov    $0x0,%ebx
  mov    $0x0,%r12d
L28:
  movsbl 0x0(%rbp),%edi
  call   <hexToDec@plt>
  test   %eax,%eax
  js     L308
  mov    %ebx,%ecx
  shl    %cl,%eax
  or     %eax,%r12d
  jns    L85
  add    $0x4,%ebx
  sub    $0x1,%rbp
  cmp    %r13d,%ebx
  jne    L28
  jmp    L272
L137:
  mov    $0x0,%r12d
  jmp    L272
L42:
  mov    $0x0,%r12d
  jmp    L272
L71:
  mov    $0xffffffff,%r15d
  jmp    L215
L308:
  mov    $0xffffffff,%r15d
  jmp    L215
L85:
  mov    $0xffffffff,%r15d
  jmp    L215
L247:
  mov    $0xffffffff,%r15d
  jmp    L215
L210:
  mov    $0xffffffff,%r15d
  jmp    L215
L95:
  mov    $0xffffffff,%r15d
  jmp    L215
L112:
  test   %dl,%dl
  je     L281
  lea    0x1(%r13),%r15d
L15:
  cmpb   $0x30,(%r12)
  je     L184
L135:
  lea    -0x1(%r13),%ebp
  test   %r13d,%r13d
  jle    L137
  movslq %ebp,%rbp
  add    %r12,%rbp
  movslq %r13d,%rax
  lea    -0x2(%r12,%rax,1),%rdx
  lea    -0x1(%r13),%eax
  sub    %rax,%rdx
  mov    %rdx,%r13
  mov    $0x1,%ebx
  mov    $0x0,%r12d
L214:
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L247
  movsbl 0x0(%rbp),%eax
  sub    $0x30,%eax
  imul   %ebx,%eax
  add    %eax,%r12d
  jns    L210
  lea    (%rbx,%rbx,4),%ebx
  add    %ebx,%ebx
  sub    $0x1,%rbp
  cmp    %r13,%rbp
  jne    L214
L272:
  mov    %r12d,(%r14)
L215:
  mov    %r15d,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L281:
  mov    $0x0,%r15d
  jmp    L15
```

assistant: ```c
int stringToNumber(const char *string, unsigned int *number, const char *delimiter) {
  int isHex = (string[0] == '0' && tolower(string[1]) == 'x');
  uint64_t num = 0;
  int index = 0;
  int i;
  if (isHex)
    for (i = 2; isxdigit(string[i]); i++)
      ;
  else
    for (i = 0; isdigit(string[i]); i++)
      ;
  while (*delimiter != '\0' && *delimiter != string[i])
    ++delimiter;
  if (*delimiter != string[i])
    return -1;
  if (*delimiter != '\0')
    index = i + 1;
  if (string[0] == '0' && tolower(string[1]) == 'x') {
    int shift = 0;
    int dec;
    if (i > 10)
      return -1;
    while (i-- > 2) {
      dec = hexToDec(string[i]);
      if (dec < 0)
        return -1;
      num |= ((uint64_t)dec << shift);
      if (num > (uint64_t)((unsigned int)-1))
        return -1;
      shift += 4;
    }
  } else {
    uint64_t multiplier = 1;
    while (i-- > 0) {
      if (isdigit(string[i]))
        num += ((uint64_t)(string[i] - '0') * multiplier);
      else
        return -1;
      if (num > (uint64_t)((unsigned int)-1))
        return -1;
      multiplier *= 10;
    }
  }
  *number = (unsigned int)num;
  return index;
}
```