#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, scalar_t__);
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;
  }
}


x86 assembly (clang, -O0):
<print_mm_foscsel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1141 <print_mm_foscsel+0x31>
mov    -0x8(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <print_mm_foscsel+0x41>
mov    -0x8(%rbp),%rsi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0xc000,%rax
mov    %rax,-0x18(%rbp)
je     11eb <print_mm_foscsel+0xdb>
jmp    116a <print_mm_foscsel+0x5a>
mov    -0x18(%rbp),%rax
sub    $0x4000,%rax
je     11d5 <print_mm_foscsel+0xc5>
jmp    117f <print_mm_foscsel+0x6f>
mov    -0x18(%rbp),%rax
sub    $0x8000,%rax
je     11bf <print_mm_foscsel+0xaf>
jmp    1194 <print_mm_foscsel+0x84>
mov    -0x18(%rbp),%rax
sub    $0xc000,%rax
jne    11fb <print_mm_foscsel+0xeb>
jmp    11a9 <print_mm_foscsel+0x99>
lea    0xe90(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
jmp    11fb <print_mm_foscsel+0xeb>
lea    0xeca(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
jmp    11fb <print_mm_foscsel+0xeb>
lea    0xf05(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    11fb <print_mm_foscsel+0xeb>
lea    0xf40(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x1000,%rax
cmp    $0x0,%rax
je     1225 <print_mm_foscsel+0x115>
lea    0xf6e(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    1235 <print_mm_foscsel+0x125>
lea    0xfa2(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x400,%rax
cmp    $0x0,%rax
je     125f <print_mm_foscsel+0x14f>
lea    0xfd7(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    126f <print_mm_foscsel+0x15f>
lea    0x1003(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x300,%rax
mov    %rax,-0x20(%rbp)
je     1309 <print_mm_foscsel+0x1f9>
jmp    1288 <print_mm_foscsel+0x178>
mov    -0x20(%rbp),%rax
sub    $0x100,%rax
je     12f3 <print_mm_foscsel+0x1e3>
jmp    129d <print_mm_foscsel+0x18d>
mov    -0x20(%rbp),%rax
sub    $0x200,%rax
je     12dd <print_mm_foscsel+0x1cd>
jmp    12b2 <print_mm_foscsel+0x1a2>
mov    -0x20(%rbp),%rax
sub    $0x300,%rax
jne    1319 <print_mm_foscsel+0x209>
jmp    12c7 <print_mm_foscsel+0x1b7>
lea    0xfe0(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
jmp    1319 <print_mm_foscsel+0x209>
lea    0x1003(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
jmp    1319 <print_mm_foscsel+0x209>
lea    0x1021(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    1319 <print_mm_foscsel+0x209>
lea    0x103f(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x80,%rax
cmp    $0x0,%rax
je     1343 <print_mm_foscsel+0x233>
lea    0x1055(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
jmp    1353 <print_mm_foscsel+0x243>
lea    0x1076(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x40,%rax
cmp    $0x0,%rax
je     137b <print_mm_foscsel+0x26b>
lea    0x108c(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    138b <print_mm_foscsel+0x27b>
lea    0x10b0(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x10,%rax
cmp    $0x0,%rax
je     13b3 <print_mm_foscsel+0x2a3>
lea    0x10c9(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    13c3 <print_mm_foscsel+0x2b3>
lea    0x10ed(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x6,%eax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
sub    $0x4,%rax
ja     145e <print_mm_foscsel+0x34e>
mov    -0x28(%rbp),%rax
lea    0xc19(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1100(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    1472 <print_mm_foscsel+0x362>
lea    0x1127(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
jmp    1472 <print_mm_foscsel+0x362>
lea    0x114e(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
jmp    1472 <print_mm_foscsel+0x362>
lea    0x1175(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    1472 <print_mm_foscsel+0x362>
lea    0x1198(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
jmp    1472 <print_mm_foscsel+0x362>
mov    -0x8(%rbp),%rsi
and    $0x6,%rsi
lea    0x11b6(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mm_foscsel>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
lea    0xf02(%rip),%rax
lea    0xf11(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0xe,%eax
and    $0x3,%eax
lea    0xec0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfee(%rip),%rdi
xor    %esi,%esi
jmp    117c <print_mm_foscsel+0x6c>
lea    0xf41(%rip),%rdi
mov    $0x8,%esi
jmp    117c <print_mm_foscsel+0x6c>
lea    0xee3(%rip),%rdi
mov    $0xc,%esi
jmp    117c <print_mm_foscsel+0x6c>
lea    0xf76(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
test   $0x1000,%ebx
jne    1194 <print_mm_foscsel+0x84>
lea    0x104a(%rip),%rdi
xor    %esi,%esi
jmp    11a0 <print_mm_foscsel+0x90>
lea    0xff5(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
test   $0x400,%ebx
jne    11d3 <print_mm_foscsel+0xc3>
lea    0x10c1(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x8,%eax
and    $0x3,%eax
lea    0xe46(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1059(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x8,%eax
and    $0x3,%eax
lea    0xe1d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1158(%rip),%rdi
xor    %esi,%esi
jmp    122f <print_mm_foscsel+0x11f>
lea    0x10e5(%rip),%rdi
mov    $0x2,%esi
jmp    122f <print_mm_foscsel+0x11f>
lea    0x109e(%rip),%rdi
mov    $0x3,%esi
jmp    122f <print_mm_foscsel+0x11f>
lea    0x10fd(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
test   $0x80,%bl
jne    1244 <print_mm_foscsel+0x134>
lea    0x118c(%rip),%rdi
xor    %esi,%esi
jmp    1250 <print_mm_foscsel+0x140>
lea    0x114a(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
test   $0x40,%bl
jne    1265 <print_mm_foscsel+0x155>
lea    0x11dd(%rip),%rdi
xor    %esi,%esi
jmp    1271 <print_mm_foscsel+0x161>
lea    0x1198(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
test   $0x10,%bl
jne    1286 <print_mm_foscsel+0x176>
lea    0x1231(%rip),%rdi
xor    %esi,%esi
jmp    1292 <print_mm_foscsel+0x182>
lea    0x11ec(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
and    $0x6,%ebx
cmp    $0x4,%rbx
je     12b7 <print_mm_foscsel+0x1a7>
cmp    $0x2,%ebx
jne    12c9 <print_mm_foscsel+0x1b9>
lea    0x1257(%rip),%rdi
mov    $0x2,%esi
pop    %rbx
jmp    1030 <printf@plt>
lea    0x1282(%rip),%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <printf@plt>
lea    0x12a9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c" FOSCSEL = 0x%08X\0A\00"
@.str.1 = [22 x i8] c" AFOSCSEL = 0x%08X\0A\00"
@.str.2 = [80 x i8] c" %01x Clock switching enabled, Fail safe monitor enabled\0A\00"
@.str.3 = [81 x i8] c" %01x Clock switching disabled, Fail safe monitor enabled\0A\00"
@.str.4 = [81 x i8] c" %01x Clock switching enabled, Fail safe monitor disabled\0A\00"
@.str.5 = [82 x i8] c" %01x Clock switching disabled, Fail safe monitor disabled\0A\00"
@.str.6 = [74 x i8] c" %01x SOSC crystal used (pins controlled by SOSC) \0A\00"
@.str.7 = [89 x i8] c" %01x External clock connected to SOSCO, pins controlled by PORTx\0A\00"
@.str.8 = [66 x i8] c" %01x OSC2/CLKO pin operated as normal I/O\0A\00"
@.str.9 = [69 x i8] c" %01x System clock connected to pin OSC2/CLKO\0A\00"
@.str.10 = [57 x i8] c" %01x Primary oscillator disabled\0A\00"
@.str.11 = [52 x i8] c" %01x HS Oscillator selected\0A\00"
@.str.12 = [52 x i8] c" %01x XT Oscillator selected\0A\00"
@.str.13 = [58 x i8] c" %01x EC (External Clock) selected\0A\00"
@.str.14 = [55 x i8] c" %01x Two-speed startup enabled\0A\00"
@.str.15 = [56 x i8] c" %01x Two-speed startup disabled\0A\00"
@.str.16 = [58 x i8] c" %01x Secondary oscillator enabled\0A\00"
@.str.17 = [59 x i8] c" %01x Secondary oscillator disabled\0A\00"
@.str.18 = [58 x i8] c" %01x FRC is input to PLL on reset\0A\00"
@.str.19 = [80 x i8] c" %01x Primary oscillator (POSC) is input to PLL on reset\0A\00"
@.str.20 = [61 x i8] c" %01x Primary or FRC oscillator + PLL\0A\00"
@.str.21 = [61 x i8] c" %01x Primary oscillator (XT, HS, EC)\0A\00"
@.str.22 = [61 x i8] c" %01x Reserved - check your settings!\0A\00"
@.str.23 = [57 x i8] c" %01x Secondary oscillator (SOSC)\0A\00"
@.str.24 = [60 x i8] c" %01x Low-power RC oscillator (LPRC)\0A\00"
@.str.25 = [60 x i8] c" %01x Fast RC (FRC) with Divide-by-N\0A\00"
define void @print_mm_foscsel(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 0, %5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %13
10: ; preds = %2
%11 = load i64, i64* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %10, %7
%14 = load i64, i64* %3
%15 = and i64 %14, 49152
switch i64 %15, label %24 [
i64 49152, label %16
i64 32768, label %18
i64 16384, label %20
i64 0, label %22
]
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0), i64 12)
br label %24
18: ; preds = %13
%19 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0), i64 8)
br label %24
20: ; preds = %13
%21 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.4, i64 0, i64 0), i64 4)
br label %24
22: ; preds = %13
%23 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.5, i64 0, i64 0), i64 0)
br label %24
24: ; preds = %13, %22, %20, %18, %16
%25 = load i64, i64* %3
%26 = and i64 %25, 4096
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.6, i64 0, i64 0), i64 1)
br label %32
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.7, i64 0, i64 0), i64 0)
br label %32
32: ; preds = %30, %28
%33 = load i64, i64* %3
%34 = and i64 %33, 1024
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.8, i64 0, i64 0), i64 4)
br label %40
38: ; preds = %32
%39 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0), i64 0)
br label %40
40: ; preds = %38, %36
%41 = load i64, i64* %3
%42 = and i64 %41, 768
switch i64 %42, label %51 [
i64 768, label %43
i64 512, label %45
i64 256, label %47
i64 0, label %49
]
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0), i64 3)
br label %51
45: ; preds = %40
%46 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.11, i64 0, i64 0), i64 2)
br label %51
47: ; preds = %40
%48 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 1)
br label %51
49: ; preds = %40
%50 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0), i64 0)
br label %51
51: ; preds = %40, %49, %47, %45, %43
%52 = load i64, i64* %3
%53 = and i64 %52, 128
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i64 8)
br label %59
57: ; preds = %51
%58 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0), i64 0)
br label %59
59: ; preds = %57, %55
%60 = load i64, i64* %3
%61 = and i64 %60, 64
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0), i64 4)
br label %67
65: ; preds = %59
%66 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.17, i64 0, i64 0), i64 0)
br label %67
67: ; preds = %65, %63
%68 = load i64, i64* %3
%69 = and i64 %68, 16
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %67
%72 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.18, i64 0, i64 0), i64 1)
br label %75
73: ; preds = %67
%74 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.19, i64 0, i64 0), i64 0)
br label %75
75: ; preds = %73, %71
%76 = load i64, i64* %3
%77 = and i64 %76, 6
switch i64 %77, label %88 [
i64 1, label %78
i64 2, label %80
i64 3, label %82
i64 4, label %84
i64 5, label %86
]
78: ; preds = %75
%79 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.20, i64 0, i64 0), i64 1)
br label %92
80: ; preds = %75
%81 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.21, i64 0, i64 0), i64 2)
br label %92
82: ; preds = %75
%83 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.22, i64 0, i64 0), i64 3)
br label %92
84: ; preds = %75
%85 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.23, i64 0, i64 0), i64 4)
br label %92
86: ; preds = %75
%87 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.24, i64 0, i64 0), i64 5)
br label %92
88: ; preds = %75
%89 = load i64, i64* %3
%90 = and i64 %89, 6
%91 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.25, i64 0, i64 0), i64 %90)
br label %92
92: ; preds = %88, %86, %84, %82, %80, %78
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c" FOSCSEL = 0x%08X\0A\00"
@.str.1 = [22 x i8] c" AFOSCSEL = 0x%08X\0A\00"
@.str.2 = [80 x i8] c" %01x Clock switching enabled, Fail safe monitor enabled\0A\00"
@.str.3 = [81 x i8] c" %01x Clock switching disabled, Fail safe monitor enabled\0A\00"
@.str.4 = [81 x i8] c" %01x Clock switching enabled, Fail safe monitor disabled\0A\00"
@.str.5 = [82 x i8] c" %01x Clock switching disabled, Fail safe monitor disabled\0A\00"
@.str.6 = [74 x i8] c" %01x SOSC crystal used (pins controlled by SOSC) \0A\00"
@.str.7 = [89 x i8] c" %01x External clock connected to SOSCO, pins controlled by PORTx\0A\00"
@.str.8 = [66 x i8] c" %01x OSC2/CLKO pin operated as normal I/O\0A\00"
@.str.9 = [69 x i8] c" %01x System clock connected to pin OSC2/CLKO\0A\00"
@.str.10 = [57 x i8] c" %01x Primary oscillator disabled\0A\00"
@.str.11 = [52 x i8] c" %01x HS Oscillator selected\0A\00"
@.str.12 = [52 x i8] c" %01x XT Oscillator selected\0A\00"
@.str.13 = [58 x i8] c" %01x EC (External Clock) selected\0A\00"
@.str.14 = [55 x i8] c" %01x Two-speed startup enabled\0A\00"
@.str.15 = [56 x i8] c" %01x Two-speed startup disabled\0A\00"
@.str.16 = [58 x i8] c" %01x Secondary oscillator enabled\0A\00"
@.str.17 = [59 x i8] c" %01x Secondary oscillator disabled\0A\00"
@.str.18 = [58 x i8] c" %01x FRC is input to PLL on reset\0A\00"
@.str.19 = [80 x i8] c" %01x Primary oscillator (POSC) is input to PLL on reset\0A\00"
@.str.21 = [61 x i8] c" %01x Primary oscillator (XT, HS, EC)\0A\00"
@.str.23 = [57 x i8] c" %01x Secondary oscillator (SOSC)\0A\00"
@.str.25 = [60 x i8] c" %01x Fast RC (FRC) with Divide-by-N\0A\00"
define void @print_mm_foscsel(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i64 %0)
%6 = lshr i64 %0, 14
%7 = and i64 %6, 3
switch i64 %7, label %16 [
i64 3, label %8
i64 2, label %10
i64 1, label %12
i64 0, label %14
]
8: ; preds = %2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0), i64 12)
br label %17
10: ; preds = %2
%11 = tail call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0), i64 8)
br label %17
12: ; preds = %2
%13 = tail call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.4, i64 0, i64 0), i64 4)
br label %17
14: ; preds = %2
%15 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.5, i64 0, i64 0), i64 0)
br label %17
16: ; preds = %2
unreachable
17: ; preds = %14, %12, %10, %8
%18 = and i64 %0, 4096
%19 = icmp eq i64 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = tail call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.6, i64 0, i64 0), i64 1)
br label %24
22: ; preds = %17
%23 = tail call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.7, i64 0, i64 0), i64 0)
br label %24
24: ; preds = %22, %20
%25 = and i64 %0, 1024
%26 = icmp eq i64 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.8, i64 0, i64 0), i64 4)
br label %31
29: ; preds = %24
%30 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0), i64 0)
br label %31
31: ; preds = %29, %27
%32 = lshr i64 %0, 8
%33 = and i64 %32, 3
switch i64 %33, label %42 [
i64 3, label %34
i64 2, label %36
i64 1, label %38
i64 0, label %40
]
34: ; preds = %31
%35 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0), i64 3)
br label %43
36: ; preds = %31
%37 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.11, i64 0, i64 0), i64 2)
br label %43
38: ; preds = %31
%39 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 1)
br label %43
40: ; preds = %31
%41 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0), i64 0)
br label %43
42: ; preds = %31
unreachable
43: ; preds = %40, %38, %36, %34
%44 = and i64 %0, 128
%45 = icmp eq i64 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i64 8)
br label %50
48: ; preds = %43
%49 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0), i64 0)
br label %50
50: ; preds = %48, %46
%51 = and i64 %0, 64
%52 = icmp eq i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0), i64 4)
br label %57
55: ; preds = %50
%56 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.17, i64 0, i64 0), i64 0)
br label %57
57: ; preds = %55, %53
%58 = and i64 %0, 16
%59 = icmp eq i64 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.18, i64 0, i64 0), i64 1)
br label %64
62: ; preds = %57
%63 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.19, i64 0, i64 0), i64 0)
br label %64
64: ; preds = %62, %60
%65 = and i64 %0, 6
switch i64 %65, label %70 [
i64 4, label %68
i64 2, label %66
]
66: ; preds = %64
%67 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.21, i64 0, i64 0), i64 2)
br label %72
68: ; preds = %64
%69 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.23, i64 0, i64 0), i64 4)
br label %72
70: ; preds = %64
%71 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.25, i64 0, i64 0), i64 %65)
br label %72
72: ; preds = %70, %68, %66
ret void
}