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

```asm
<convert_to_decimal>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    %eax,0xc(%rsp)
  sub    $0x1,%eax
  js     L41
  cltq
  xor    %r15d,%r15d
  lea    D6(%rip),%r13
  xor    %r12d,%r12d
  add    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L17:
  movsbl 0x0(%rbp),%r14d
  mov    %r15d,%esi
  add    $0x1,%r15d
  mov    %r14d,%eax
  cmp    $0x10,%ebx
  jne    L65
  sub    $0x41,%eax
  cmp    $0x5,%al
  ja     L82
  movzbl %al,%eax
  mov    $0x10,%edi
  movslq 0x0(%r13,%rax,4),%rax
  add    %r13,%rax
  notrack jmp *%rax
  cs nopw 0x0(%rax,%rax,1)
  call   <powerfunc@plt>
  movsbl %al,%eax
  imul   $0xe,%eax,%eax
  cltq
  add    %rax,%r12
L62:
  sub    $0x1,%rbp
  cmp    %r15d,0xc(%rsp)
  jne    L17
L50:
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
  call   <powerfunc@plt>
  movsbl %al,%eax
  lea    (%rax,%rax,2),%ecx
  lea    (%rax,%rcx,4),%eax
  cltq
  add    %rax,%r12
  jmp    L62
  nopl   (%rax)
  call   <powerfunc@plt>
  movsbl %al,%eax
  lea    (%rax,%rax,2),%eax
  shl    $0x2,%eax
  cltq
  add    %rax,%r12
  jmp    L62
  nopl   (%rax)
  call   <powerfunc@plt>
  movsbl %al,%eax
  lea    (%rax,%rax,4),%ecx
  lea    (%rax,%rcx,2),%eax
  cltq
  add    %rax,%r12
  jmp    L62
  nopl   (%rax)
  call   <powerfunc@plt>
  movsbl %al,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cltq
  add    %rax,%r12
  jmp    L62
  nopl   0x0(%rax)
  call   <powerfunc@plt>
  movsbl %al,%ecx
  mov    %ecx,%eax
  shl    $0x4,%eax
  sub    %ecx,%eax
  cltq
  add    %rax,%r12
  jmp    L62
  nopl   0x0(%rax)
L65:
  mov    %ebx,%edi
L8:
  call   <powerfunc@plt>
  sub    $0x30,%r14d
  movsbl %al,%eax
  imul   %eax,%r14d
  movslq %r14d,%r14
  add    %r14,%r12
  jmp    L62
L82:
  mov    $0x10,%edi
  jmp    L8
  nopl   0x0(%rax)
L41:
  xor    %r12d,%r12d
  jmp    L50
```

assistant: ```c
long int convert_to_decimal(char *array, int base) {
  long int decimal_numb = 0;
  int power = 0;
  int counter = 0;
  int length;
  length = strlen(array);
  while (length - 1 - counter >= 0) {
    if (base == 16) {
      switch (array[length - 1 - counter]) {
      case 'A': {
        decimal_numb = decimal_numb + 10 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      case 'B': {
        decimal_numb = decimal_numb + 11 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      case 'C': {
        decimal_numb = decimal_numb + 12 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      case 'D': {
        decimal_numb = decimal_numb + 13 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      case 'E': {
        decimal_numb = decimal_numb + 14 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      case 'F': {
        decimal_numb = decimal_numb + 15 * powerfunc(base, power);
        counter++;
        power++;
        break;
      }
      default: {
        decimal_numb = decimal_numb + (array[length - 1 - counter++] - '0') * powerfunc(base, power);
        power++;
      }
      }
    } else {
      decimal_numb = decimal_numb + (array[length - 1 - counter++] - '0') * powerfunc(base, power);
      power++;
    }
  }
  return decimal_numb;
}
```