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

```asm
<panel_utils_note_to_name>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x8,%rsp
  cmp    $0x7f,%esi
  ja     L62
L317:
  movslq %esi,%rax
  mov    %esi,%ecx
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x21,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,2),%edi
  mov    %eax,%ecx
  mov    %esi,%eax
  shl    $0x2,%edi
  sub    %edi,%eax
  test   %edx,%edx
  je     L309
  lea    -0x1(%rcx),%edx
  cmp    $0xb,%eax
  ja     L115
  lea    D147(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
  mov    $0x2341,%edx
  movb   $0x0,0x2(%rbp)
  mov    %dx,0x0(%rbp)
L115:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L309:
  cmp    $0xb,%eax
  ja     L115
  lea    D71(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  cs nopw 0x0(%rax,%rax,1)
L62:
  mov    $0x2d2d,%eax
  movb   $0x0,0x2(%rdi)
  mov    %ax,(%rdi)
  jmp    L317
  nopl   0x0(%rax)
  lea    D17(%rip),%rsi
  nop
L88:
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <sprintf@plt>
  test   %ebx,%ebx
  je     L115
L17:
  add    $0x8,%rsp
  mov    %rbp,%rdi
  lea    D44(%rip),%rsi
  pop    %rbx
  pop    %rbp
  jmp    1060 <strcat@plt>
  nopl   0x0(%rax,%rax,1)
  lea    D117(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D30(%rip),%rsi
L259:
  add    $0x8,%rsp
  mov    %rbp,%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1070 <sprintf@plt>
  nop
  lea    D124(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D135(%rip),%rsi
  jmp    L259
  nopl   0x0(%rax)
  lea    D60(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D23(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D78(%rip),%rsi
  jmp    L259
  nopl   0x0(%rax)
  lea    D16(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D111(%rip),%rsi
  jmp    L259
  nopl   0x0(%rax)
  lea    D45(%rip),%rsi
  jmp    L88
  nopl   0x0(%rax)
  lea    D102(%rip),%rsi
  jmp    L259
  nopl   0x0(%rax)
  mov    $0x42,%eax
  mov    %ax,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x43,%eax
  mov    %ax,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x2343,%eax
  movb   $0x0,0x2(%rbp)
  mov    %ax,0x0(%rbp)
  jmp    L115
  nopw   0x0(%rax,%rax,1)
  mov    $0x44,%eax
  mov    %ax,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  xchg   %ax,%ax
  mov    $0x2344,%r11d
  movb   $0x0,0x2(%rbp)
  mov    %r11w,0x0(%rbp)
  jmp    L115
  nopl   0x0(%rax)
  mov    $0x45,%r10d
  mov    %r10w,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  mov    $0x46,%r9d
  mov    %r9w,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  nopl   0x0(%rax,%rax,1)
  mov    $0x2346,%r8d
  movb   $0x0,0x2(%rbp)
  mov    %r8w,0x0(%rbp)
  jmp    L115
  nopl   0x0(%rax)
  mov    $0x47,%edi
  mov    %di,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
  xchg   %ax,%ax
  mov    $0x2347,%esi
  movb   $0x0,0x2(%rbp)
  mov    %si,0x0(%rbp)
  jmp    L115
  nopw   0x0(%rax,%rax,1)
  mov    $0x41,%ecx
  mov    %cx,0x0(%rbp)
  test   %ebx,%ebx
  je     L115
  jmp    L17
```

tool_calls: name: read_data
arguments: label: D17
type_infered: string
name: read_data
arguments: label: D44
type_infered: string
name: read_data
arguments: label: D117
type_infered: string
name: read_data
arguments: label: D30
type_infered: string
name: read_data
arguments: label: D124
type_infered: string
name: read_data
arguments: label: D135
type_infered: string
name: read_data
arguments: label: D60
type_infered: string
name: read_data
arguments: label: D23
type_infered: string
name: read_data
arguments: label: D78
type_infered: string
name: read_data
arguments: label: D16
type_infered: string
name: read_data
arguments: label: D111
type_infered: string
name: read_data
arguments: label: D45
type_infered: string
name: read_data
arguments: label: D102
type_infered: string

tool: D17: B%d

tool: D44:  

tool: D117: C%d

tool: D30: C#%d

tool: D124: D%d

tool: D135: D#%d

tool: D60: E%d

tool: D23: F%d

tool: D78: F#%d

tool: D16: G%d

tool: D111: G#%d

tool: D45: A%d

tool: D102: A#%d

assistant: ```c
void panel_utils_note_to_name(char *tempstr, int note, int octdisp, int padding) {
  int oct, degree;
  if (note < 0 || note > 0x7f) {
    sprintf(tempstr, "--");
  }
  oct = (note / 12) - 1;
  degree = note % 12;
  if (octdisp) {
    switch (degree) {
    case 0:
      sprintf(tempstr, "C%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 1:
      sprintf(tempstr, "C#%d", oct);
      break;
    case 2:
      sprintf(tempstr, "D%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 3:
      sprintf(tempstr, "D#%d", oct);
      break;
    case 4:
      sprintf(tempstr, "E%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 5:
      sprintf(tempstr, "F%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 6:
      sprintf(tempstr, "F#%d", oct);
      break;
    case 7:
      sprintf(tempstr, "G%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 8:
      sprintf(tempstr, "G#%d", oct);
      break;
    case 9:
      sprintf(tempstr, "A%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 10:
      sprintf(tempstr, "A#%d", oct);
      break;
    case 11:
      sprintf(tempstr, "B%d", oct);
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    }
  } else {
    switch (degree) {
    case 0:
      sprintf(tempstr, "C");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 1:
      sprintf(tempstr, "C#");
      break;
    case 2:
      sprintf(tempstr, "D");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 3:
      sprintf(tempstr, "D#");
      break;
    case 4:
      sprintf(tempstr, "E");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 5:
      sprintf(tempstr, "F");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 6:
      sprintf(tempstr, "F#");
      break;
    case 7:
      sprintf(tempstr, "G");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 8:
      sprintf(tempstr, "G#");
      break;
    case 9:
      sprintf(tempstr, "A");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    case 10:
      sprintf(tempstr, "A#");
      break;
    case 11:
      sprintf(tempstr, "B");
      if (padding) {
        strcat(tempstr, " ");
      }
      break;
    }
  }
}
```