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

```asm
<print_mm_foscsel>:
  endbr64
  test   %rsi,%rsi
  push   %rbx
  mov    %rdi,%rsi
  mov    %rdi,%rbx
  jne    L107
  lea    D66(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rax
  and    $0xc000,%eax
  cmp    $0x8000,%rax
  je     L249
L154:
  jg     L31
  test   %rax,%rax
  je     L34
  cmp    $0x4000,%rax
  jne    L241
  mov    $0x4,%esi
  lea    D101(%rip),%rdi
  call   <printf@plt>
L241:
  test   $0x10,%bh
  je     L283
L79:
  mov    $0x1,%esi
  lea    D221(%rip),%rdi
  call   <printf@plt>
  test   $0x4,%bh
  je     L168
L87:
  mov    $0x4,%esi
  lea    D254(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rax
  and    $0x300,%eax
  cmp    $0x200,%rax
  je     L236
L74:
  jg     L12
  test   %rax,%rax
  je     L226
  cmp    $0x100,%rax
  jne    L186
  mov    $0x1,%esi
  lea    D87(%rip),%rdi
  call   <printf@plt>
L186:
  test   $0x80,%bl
  je     L227
L160:
  mov    $0x8,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  test   $0x40,%bl
  je     L133
L248:
  mov    $0x4,%esi
  lea    D250(%rip),%rdi
  call   <printf@plt>
  test   $0x10,%bl
  je     L143
L59:
  mov    $0x1,%esi
  lea    D60(%rip),%rdi
  call   <printf@plt>
L11:
  and    $0x6,%ebx
  cmp    $0x5,%rbx
  ja     L108
  lea    D170(%rip),%rdx
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L12:
  cmp    $0x300,%rax
  jne    L186
  mov    $0x3,%esi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  test   $0x80,%bl
  jne    L160
L227:
  xor    %esi,%esi
  lea    D152(%rip),%rdi
  call   <printf@plt>
  test   $0x40,%bl
  jne    L248
L133:
  xor    %esi,%esi
  lea    D265(%rip),%rdi
  call   <printf@plt>
  test   $0x10,%bl
  jne    L59
L143:
  xor    %esi,%esi
  lea    D126(%rip),%rdi
  call   <printf@plt>
  jmp    L11
  nopl   0x0(%rax,%rax,1)
L31:
  cmp    $0xc000,%rax
  jne    L241
  mov    $0xc,%esi
  lea    D208(%rip),%rdi
  call   <printf@plt>
  test   $0x10,%bh
  jne    L79
L283:
  xor    %esi,%esi
  lea    D251(%rip),%rdi
  call   <printf@plt>
  test   $0x4,%bh
  jne    L87
L168:
  xor    %esi,%esi
  lea    D241(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rax
  and    $0x300,%eax
  cmp    $0x200,%rax
  jne    L74
L236:
  mov    $0x2,%esi
  lea    D137(%rip),%rdi
  call   <printf@plt>
  jmp    L186
  nopl   (%rax)
L107:
  lea    D235(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rax
  and    $0xc000,%eax
  cmp    $0x8000,%rax
  jne    L154
L249:
  mov    $0x8,%esi
  lea    D206(%rip),%rdi
  call   <printf@plt>
  jmp    L241
  cs nopw 0x0(%rax,%rax,1)
L226:
  xor    %esi,%esi
  lea    D29(%rip),%rdi
  call   <printf@plt>
  jmp    L186
  nopl   0x0(%rax,%rax,1)
L34:
  xor    %esi,%esi
  lea    D218(%rip),%rdi
  call   <printf@plt>
  jmp    L241
  nopl   0x0(%rax,%rax,1)
  mov    $0x5,%esi
  lea    D202(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
  mov    $0x1,%esi
  lea    D73(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
  mov    $0x2,%esi
  lea    D5(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
  mov    $0x3,%esi
  lea    D40(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
  nopw   0x0(%rax,%rax,1)
  mov    $0x4,%esi
  lea    D70(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
L108:
  mov    %rbx,%rsi
  lea    D56(%rip),%rdi
  pop    %rbx
  jmp    1050 <printf@plt>
```

tool_calls: name: read_data
arguments: data_label: D66
type: string
name: read_data
arguments: data_label: D101
type: string
name: read_data
arguments: data_label: D221
type: string
name: read_data
arguments: data_label: D254
type: string
name: read_data
arguments: data_label: D87
type: string
name: read_data
arguments: data_label: D9
type: string
name: read_data
arguments: data_label: D250
type: string
name: read_data
arguments: data_label: D60
type: string
name: read_data
arguments: data_label: D0
type: string
name: read_data
arguments: data_label: D152
type: string
name: read_data
arguments: data_label: D265
type: string
name: read_data
arguments: data_label: D126
type: string
name: read_data
arguments: data_label: D208
type: string
name: read_data
arguments: data_label: D251
type: string
name: read_data
arguments: data_label: D241
type: string
name: read_data
arguments: data_label: D137
type: string
name: read_data
arguments: data_label: D235
type: string
name: read_data
arguments: data_label: D206
type: string
name: read_data
arguments: data_label: D29
type: string
name: read_data
arguments: data_label: D218
type: string
name: read_data
arguments: data_label: D202
type: string
name: read_data
arguments: data_label: D73
type: string
name: read_data
arguments: data_label: D5
type: string
name: read_data
arguments: data_label: D40
type: string
name: read_data
arguments: data_label: D70
type: string
name: read_data
arguments: data_label: D56
type: string

tool: D66:     FOSCSEL = 0x%08X


tool: D101:                     %01x    Clock switching enabled, Fail safe monitor disabled


tool: D221:                     %01x    SOSC crystal used (pins controlled by SOSC) 


tool: D254:                      %01x   OSC2/CLKO pin operated as normal I/O


tool: D87:                      %01x   XT Oscillator selected


tool: D9:                       %01x  Two-speed startup enabled


tool: D250:                       %01x  Secondary oscillator enabled


tool: D60:                       %01x  FRC is input to PLL on reset


tool: D0:                      %01x   Primary oscillator disabled


tool: D152:                       %01x  Two-speed startup disabled


tool: D265:                       %01x  Secondary oscillator disabled


tool: D126:                       %01x  Primary oscillator (POSC) is input to PLL on reset


tool: D208:                     %01x    Clock switching enabled, Fail safe monitor enabled


tool: D251:                     %01x    External clock connected to SOSCO, pins controlled by PORTx


tool: D241:                      %01x   System clock connected to pin OSC2/CLKO


tool: D137:                      %01x   HS Oscillator selected


tool: D235:    AFOSCSEL = 0x%08X


tool: D206:                     %01x    Clock switching disabled, Fail safe monitor enabled


tool: D29:                      %01x   EC (External Clock) selected


tool: D218:                     %01x    Clock switching disabled, Fail safe monitor disabled


tool: D202:                        %01x Low-power RC oscillator (LPRC)


tool: D73:                        %01x Primary or FRC oscillator + PLL


tool: D5:                        %01x Primary oscillator (XT, HS, EC)


tool: D40:                        %01x Reserved - check your settings!


tool: D70:                        %01x Secondary oscillator (SOSC)


tool: D56:                        %01x Fast RC (FRC) with Divide-by-N


assistant: ```c
void print_mm_foscsel(uint32_t foscsel, uint32_t alternate) {
  if (0 == alternate) {
    printf("    FOSCSEL = 0x%08X\n", foscsel);
  } else {
    printf("   AFOSCSEL = 0x%08X\n", foscsel);
  }
  switch (foscsel & 0x0000C000) {
  case 0x0000C000:
    printf("                    %01x    Clock switching enabled, Fail safe monitor enabled\n", 0x0000C000 >> 12);
    break;
  case 0x00008000:
    printf("                    %01x    Clock switching disabled, Fail safe monitor enabled\n", 0x00008000 >> 12);
    break;
  case 0x00004000:
    printf("                    %01x    Clock switching enabled, Fail safe monitor disabled\n", 0x00004000 >> 12);
    break;
  case 0x00000000:
    printf("                    %01x    Clock switching disabled, Fail safe monitor disabled\n", 0x00000000 >> 12);
    break;
  }
  if (foscsel & 0x00001000) {
    printf("                    %01x    SOSC crystal used (pins controlled by SOSC) \n", 0x00001000 >> 12);
  } else {
    printf("                    %01x    External clock connected to SOSCO, pins controlled by PORTx\n", 0);
  }
  if (foscsel & 0x00000400) {
    printf("                     %01x   OSC2/CLKO pin operated as normal I/O\n", 0x00000400 >> 8);
  } else {
    printf("                     %01x   System clock connected to pin OSC2/CLKO\n", 0);
  }
  switch (foscsel & 0x00000300) {
  case 0x00000300:
    printf("                     %01x   Primary oscillator disabled\n", 0x00000300 >> 8);
    break;
  case 0x00000200:
    printf("                     %01x   HS Oscillator selected\n", 0x00000200 >> 8);
    break;
  case 0x00000100:
    printf("                     %01x   XT Oscillator selected\n", 0x00000100 >> 8);
    break;
  case 0x00000000:
    printf("                     %01x   EC (External Clock) selected\n", 0x00000000 >> 8);
    break;
  }
  if (foscsel & 0x00000080) {
    printf("                      %01x  Two-speed startup enabled\n", 0x00000080 >> 4);
  } else {
    printf("                      %01x  Two-speed startup disabled\n", 0);
  }
  if (foscsel & 0x00000040) {
    printf("                      %01x  Secondary oscillator enabled\n", 0x00000040 >> 4);
  } else {
    printf("                      %01x  Secondary oscillator disabled\n", 0);
  }
  if (foscsel & 0x00000010) {
    printf("                      %01x  FRC is input to PLL on reset\n", 0x00000010 >> 4);
  } else {
    printf("                      %01x  Primary oscillator (POSC) is input to PLL on reset\n", 0);
  }
  switch (foscsel & 0x00000006) {
  case 0x00000001:
    printf("                       %01x Primary or FRC oscillator + PLL\n", 0x00000001);
    break;
  case 0x00000002:
    printf("                       %01x Primary oscillator (XT, HS, EC)\n", 0x00000002);
    break;
  case 0x00000003:
    printf("                       %01x Reserved - check your settings!\n", 0x00000003);
    break;
  case 0x00000004:
    printf("                       %01x Secondary oscillator (SOSC)\n", 0x00000004);
    break;
  case 0x00000005:
    printf("                       %01x Low-power RC oscillator (LPRC)\n", 0x00000005);
    break;
  default:
    printf("                       %01x Fast RC (FRC) with Divide-by-N\n", (foscsel & 0x00000006));
    break;
  }
}
```