user: Translate the below assembly code into C programming language:

```asm
<print_mm_foscsel>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  test   %rsi,%rsi
  jne    L316
  mov    %rdi,%rsi
  lea    D206(%rip),%rdi
  call   <printf@plt>
L155:
  mov    %rbx,%rax
  and    $0xc000,%eax
  cmp    $0x8000,%rax
  je     L148
  jg     L120
  test   %rax,%rax
  je     L188
  cmp    $0x4000,%rax
  jne    L73
  mov    $0x4,%esi
  lea    D199(%rip),%rdi
  call   <printf@plt>
  jmp    L73
L316:
  mov    %rdi,%rsi
  lea    D103(%rip),%rdi
  call   <printf@plt>
  jmp    L155
L120:
  cmp    $0xc000,%rax
  jne    L73
  mov    $0xc,%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
L73:
  test   $0x10,%bh
  je     L186
  mov    $0x1,%esi
  lea    D173(%rip),%rdi
  call   <printf@plt>
L185:
  test   $0x4,%bh
  je     L250
  mov    $0x4,%esi
  lea    D34(%rip),%rdi
  call   <printf@plt>
L121:
  mov    %rbx,%rax
  and    $0x300,%eax
  cmp    $0x200,%rax
  je     L327
  jg     L237
  test   %rax,%rax
  je     L176
  cmp    $0x100,%rax
  jne    L48
  mov    $0x1,%esi
  lea    D56(%rip),%rdi
  call   <printf@plt>
  jmp    L48
L148:
  mov    $0x8,%esi
  lea    D138(%rip),%rdi
  call   <printf@plt>
  jmp    L73
L188:
  mov    $0x0,%esi
  lea    D267(%rip),%rdi
  call   <printf@plt>
  jmp    L73
L186:
  mov    $0x0,%esi
  lea    D2(%rip),%rdi
  call   <printf@plt>
  jmp    L185
L250:
  mov    $0x0,%esi
  lea    D183(%rip),%rdi
  call   <printf@plt>
  jmp    L121
L237:
  cmp    $0x300,%rax
  jne    L48
  mov    $0x3,%esi
  lea    D130(%rip),%rdi
  call   <printf@plt>
L48:
  test   $0x80,%bl
  je     L117
  mov    $0x8,%esi
  lea    D180(%rip),%rdi
  call   <printf@plt>
L20:
  test   $0x40,%bl
  je     L56
  mov    $0x4,%esi
  lea    D141(%rip),%rdi
  call   <printf@plt>
L96:
  test   $0x10,%bl
  je     L194
  mov    $0x1,%esi
  lea    D218(%rip),%rdi
  call   <printf@plt>
L13:
  and    $0x6,%ebx
  cmp    $0x5,%rbx
  ja     L159
  lea    D226(%rip),%rdx
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L327:
  mov    $0x2,%esi
  lea    D28(%rip),%rdi
  call   <printf@plt>
  jmp    L48
L176:
  mov    $0x0,%esi
  lea    D150(%rip),%rdi
  call   <printf@plt>
  jmp    L48
L117:
  mov    $0x0,%esi
  lea    D248(%rip),%rdi
  call   <printf@plt>
  jmp    L20
L56:
  mov    $0x0,%esi
  lea    D263(%rip),%rdi
  call   <printf@plt>
  jmp    L96
L194:
  mov    $0x0,%esi
  lea    D114(%rip),%rdi
  call   <printf@plt>
  jmp    L13
  mov    $0x1,%esi
  lea    D172(%rip),%rdi
  call   <printf@plt>
L282:
  pop    %rbx
  ret
  mov    $0x2,%esi
  lea    D82(%rip),%rdi
  call   <printf@plt>
  jmp    L282
  mov    $0x3,%esi
  lea    D197(%rip),%rdi
  call   <printf@plt>
  jmp    L282
  mov    $0x4,%esi
  lea    D260(%rip),%rdi
  call   <printf@plt>
  jmp    L282
  mov    $0x5,%esi
  lea    D191(%rip),%rdi
  call   <printf@plt>
  jmp    L282
L159:
  mov    %rbx,%rsi
  lea    D208(%rip),%rdi
  call   <printf@plt>
  jmp    L282
```

tool_calls: name: unpack_data
arguments: label: D206
type_infered: string
name: unpack_data
arguments: label: D199
type_infered: string
name: unpack_data
arguments: label: D103
type_infered: string
name: unpack_data
arguments: label: D18
type_infered: string
name: unpack_data
arguments: label: D173
type_infered: string
name: unpack_data
arguments: label: D34
type_infered: string
name: unpack_data
arguments: label: D56
type_infered: string
name: unpack_data
arguments: label: D138
type_infered: string
name: unpack_data
arguments: label: D267
type_infered: string
name: unpack_data
arguments: label: D2
type_infered: string
name: unpack_data
arguments: label: D183
type_infered: string
name: unpack_data
arguments: label: D130
type_infered: string
name: unpack_data
arguments: label: D180
type_infered: string
name: unpack_data
arguments: label: D141
type_infered: string
name: unpack_data
arguments: label: D218
type_infered: string
name: unpack_data
arguments: label: D28
type_infered: string
name: unpack_data
arguments: label: D150
type_infered: string
name: unpack_data
arguments: label: D248
type_infered: string
name: unpack_data
arguments: label: D263
type_infered: string
name: unpack_data
arguments: label: D114
type_infered: string
name: unpack_data
arguments: label: D172
type_infered: string
name: unpack_data
arguments: label: D82
type_infered: string
name: unpack_data
arguments: label: D197
type_infered: string
name: unpack_data
arguments: label: D260
type_infered: string
name: unpack_data
arguments: label: D191
type_infered: string
name: unpack_data
arguments: label: D208
type_infered: string

tool: D206:     FOSCSEL = 0x%08X


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


tool: D103:    AFOSCSEL = 0x%08X


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


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


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


tool: D56:                      %01x   XT Oscillator selected


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


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


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


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


tool: D130:                      %01x   Primary oscillator disabled


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


tool: D141:                       %01x  Secondary oscillator enabled


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


tool: D28:                      %01x   HS Oscillator selected


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


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


tool: D263:                       %01x  Secondary oscillator disabled


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


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


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


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


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


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


tool: D208:                        %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;
  }
}
```