#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_mk_devcfg3(uint32_t devcfg3, uint32_t alternate) {
  if (0 == alternate) {
    printf(" BF1DEVCFG3 = 0x%08X\n", devcfg3);
  } else {
    printf(" BF2DEVCFG3 = 0x%08X\n", devcfg3);
  }
  if (devcfg3 & 0x80000000) {
    printf(
        "                %01x        VBUSON pin: controlled by USB1 module\n",
        0x80000000 >> 28);
  } else {
    printf(
        "                %01x        VBUSON pin: controlled by port function\n",
        0);
  }
  if (devcfg3 & 0x40000000) {
    printf("                %01x        USBID pin: controlled by USB1 module\n",
           0x40000000 >> 28);
  } else {
    printf(
        "                %01x        USBID pin: controlled by port function\n",
        0);
  }
  if (devcfg3 & 0x20000000) {
    printf("                %01x        Peripheral Pin Select - Allow only one "
           "configuration\n",
           0x20000000 >> 28);
  } else {
    printf("                %01x        Peripheral Pin Select - Allow multiple "
           "configurations\n",
           0);
  }
  if (devcfg3 & 0x10000000) {
    printf("                %01x        Permission Module Disable - Allow only "
           "one configuration\n",
           0x10000000 >> 28);
  } else {
    printf("                %01x        Permission Module Disable - Allow "
           "multiple configurations\n",
           0);
  }
  if (devcfg3 & 0x08000000) {
    printf("                 %01x       Permission Group Lock - Allow only one "
           "configuration\n",
           0x08000000 >> 24);
  } else {
    printf("                 %01x       Permission Group Lock - Allow multiple "
           "configurations\n",
           0);
  }
  if (devcfg3 & 0x00800000) {
    printf(
        "                  %01x      VBUSON pin: controlled by USB2 module\n",
        0x00800000 >> 20);
  } else {
    printf(
        "                  %01x      VBUSON pin: controlled by port function\n",
        0);
  }
  if (devcfg3 & 0x00400000) {
    printf("                  %01x      USBID pin: controlled by USB2 module\n",
           0x00400000 >> 20);
  } else {
    printf(
        "                  %01x      USBID pin: controlled by port function\n",
        0);
  }
  if (devcfg3 & 0x00100000) {
    printf(
        "                  %01x      Write access to PWM IOCONx not locked\n",
        0x00100000 >> 20);
  } else {
    printf("                  %01x      Write access to PWM IOCONx locked\n",
           0);
  }
  printf("                    %04X USERID\n", devcfg3 & 0x0000FFFF);
}


x86 assembly (clang, -O0):
<print_mk_devcfg3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1141 <print_mk_devcfg3+0x31>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <print_mk_devcfg3+0x41>
mov    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movabs $0x80000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     117f <print_mk_devcfg3+0x6f>
lea    0xebc(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
jmp    118f <print_mk_devcfg3+0x7f>
lea    0xee9(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
je     11b9 <print_mk_devcfg3+0xa9>
lea    0xf0a(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    11c9 <print_mk_devcfg3+0xb9>
lea    0xf36(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x20000000,%rax
cmp    $0x0,%rax
je     11f3 <print_mk_devcfg3+0xe3>
lea    0xf56(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
jmp    1203 <print_mk_devcfg3+0xf3>
lea    0xf92(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x10000000,%rax
cmp    $0x0,%rax
je     122d <print_mk_devcfg3+0x11d>
lea    0xfc1(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    123d <print_mk_devcfg3+0x12d>
lea    0x1001(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x8000000,%rax
cmp    $0x0,%rax
je     1267 <print_mk_devcfg3+0x157>
lea    0x1034(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
jmp    1277 <print_mk_devcfg3+0x167>
lea    0x1070(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x800000,%rax
cmp    $0x0,%rax
je     12a1 <print_mk_devcfg3+0x191>
lea    0x109f(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
jmp    12b1 <print_mk_devcfg3+0x1a1>
lea    0x10cc(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x400000,%rax
cmp    $0x0,%rax
je     12db <print_mk_devcfg3+0x1cb>
lea    0x10ed(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
jmp    12eb <print_mk_devcfg3+0x1db>
lea    0x1119(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
and    $0x100000,%rax
cmp    $0x0,%rax
je     1315 <print_mk_devcfg3+0x205>
lea    0x1139(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
jmp    1325 <print_mk_devcfg3+0x215>
lea    0x1166(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
and    $0xffff,%rsi
lea    0x118a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mk_devcfg3>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
lea    0xee2(%rip),%rax
lea    0xef1(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
test   $0x80000000,%ebx
jne    1144 <print_mk_devcfg3+0x34>
lea    0xf2f(%rip),%rdi
xor    %esi,%esi
jmp    1150 <print_mk_devcfg3+0x40>
lea    0xee1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
test   $0x40000000,%ebx
jne    1168 <print_mk_devcfg3+0x58>
lea    0xf92(%rip),%rdi
xor    %esi,%esi
jmp    1174 <print_mk_devcfg3+0x64>
lea    0xf45(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
test   $0x20000000,%ebx
jne    118c <print_mk_devcfg3+0x7c>
lea    0x1004(%rip),%rdi
xor    %esi,%esi
jmp    1198 <print_mk_devcfg3+0x88>
lea    0xfa7(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
test   $0x10000000,%ebx
jne    11b0 <print_mk_devcfg3+0xa0>
lea    0x1089(%rip),%rdi
xor    %esi,%esi
jmp    11bc <print_mk_devcfg3+0xac>
lea    0x1028(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
test   $0x8000000,%ebx
jne    11d4 <print_mk_devcfg3+0xc4>
lea    0x110e(%rip),%rdi
xor    %esi,%esi
jmp    11e0 <print_mk_devcfg3+0xd0>
lea    0x10b1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
test   $0x800000,%ebx
jne    11f8 <print_mk_devcfg3+0xe8>
lea    0x1180(%rip),%rdi
xor    %esi,%esi
jmp    1204 <print_mk_devcfg3+0xf4>
lea    0x1132(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
test   $0x400000,%ebx
jne    121c <print_mk_devcfg3+0x10c>
lea    0x11e3(%rip),%rdi
xor    %esi,%esi
jmp    1228 <print_mk_devcfg3+0x118>
lea    0x1196(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
test   $0x100000,%ebx
jne    1240 <print_mk_devcfg3+0x130>
lea    0x1246(%rip),%rdi
xor    %esi,%esi
jmp    124c <print_mk_devcfg3+0x13c>
lea    0x11f8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
movzwl %bx,%esi
lea    0x1266(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c" BF1DEVCFG3 = 0x%08X\0A\00"
@.str.1 = [22 x i8] c" BF2DEVCFG3 = 0x%08X\0A\00"
@.str.2 = [67 x i8] c" %01x VBUSON pin: controlled by USB1 module\0A\00"
@.str.3 = [69 x i8] c" %01x VBUSON pin: controlled by port function\0A\00"
@.str.4 = [66 x i8] c" %01x USBID pin: controlled by USB1 module\0A\00"
@.str.5 = [68 x i8] c" %01x USBID pin: controlled by port function\0A\00"
@.str.6 = [82 x i8] c" %01x Peripheral Pin Select - Allow only one configuration\0A\00"
@.str.7 = [83 x i8] c" %01x Peripheral Pin Select - Allow multiple configurations\0A\00"
@.str.8 = [86 x i8] c" %01x Permission Module Disable - Allow only one configuration\0A\00"
@.str.9 = [87 x i8] c" %01x Permission Module Disable - Allow multiple configurations\0A\00"
@.str.10 = [82 x i8] c" %01x Permission Group Lock - Allow only one configuration\0A\00"
@.str.11 = [83 x i8] c" %01x Permission Group Lock - Allow multiple configurations\0A\00"
@.str.12 = [67 x i8] c" %01x VBUSON pin: controlled by USB2 module\0A\00"
@.str.13 = [69 x i8] c" %01x VBUSON pin: controlled by port function\0A\00"
@.str.14 = [66 x i8] c" %01x USBID pin: controlled by USB2 module\0A\00"
@.str.15 = [68 x i8] c" %01x USBID pin: controlled by port function\0A\00"
@.str.16 = [67 x i8] c" %01x Write access to PWM IOCONx not locked\0A\00"
@.str.17 = [63 x i8] c" %01x Write access to PWM IOCONx locked\0A\00"
@.str.18 = [33 x i8] c" %04X USERID\0A\00"
define void @print_mk_devcfg3(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, 2147483648
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0), i64 8)
br label %21
19: ; preds = %13
%20 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0), i64 0)
br label %21
21: ; preds = %19, %17
%22 = load i64, i64* %3
%23 = and i64 %22, 1073741824
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i64 4)
br label %29
27: ; preds = %21
%28 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i64 0)
br label %29
29: ; preds = %27, %25
%30 = load i64, i64* %3
%31 = and i64 %30, 536870912
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.6, i64 0, i64 0), i64 2)
br label %37
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.7, i64 0, i64 0), i64 0)
br label %37
37: ; preds = %35, %33
%38 = load i64, i64* %3
%39 = and i64 %38, 268435456
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.8, i64 0, i64 0), i64 1)
br label %45
43: ; preds = %37
%44 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.9, i64 0, i64 0), i64 0)
br label %45
45: ; preds = %43, %41
%46 = load i64, i64* %3
%47 = and i64 %46, 134217728
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.10, i64 0, i64 0), i64 8)
br label %53
51: ; preds = %45
%52 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.11, i64 0, i64 0), i64 0)
br label %53
53: ; preds = %51, %49
%54 = load i64, i64* %3
%55 = and i64 %54, 8388608
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.12, i64 0, i64 0), i64 8)
br label %61
59: ; preds = %53
%60 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.13, i64 0, i64 0), i64 0)
br label %61
61: ; preds = %59, %57
%62 = load i64, i64* %3
%63 = and i64 %62, 4194304
%64 = icmp ne i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.14, i64 0, i64 0), i64 4)
br label %69
67: ; preds = %61
%68 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.15, i64 0, i64 0), i64 0)
br label %69
69: ; preds = %67, %65
%70 = load i64, i64* %3
%71 = and i64 %70, 1048576
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i64 1)
br label %77
75: ; preds = %69
%76 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i64 0, i64 0), i64 0)
br label %77
77: ; preds = %75, %73
%78 = load i64, i64* %3
%79 = and i64 %78, 65535
%80 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i64 %79)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c" BF1DEVCFG3 = 0x%08X\0A\00"
@.str.1 = [22 x i8] c" BF2DEVCFG3 = 0x%08X\0A\00"
@.str.2 = [67 x i8] c" %01x VBUSON pin: controlled by USB1 module\0A\00"
@.str.3 = [69 x i8] c" %01x VBUSON pin: controlled by port function\0A\00"
@.str.4 = [66 x i8] c" %01x USBID pin: controlled by USB1 module\0A\00"
@.str.5 = [68 x i8] c" %01x USBID pin: controlled by port function\0A\00"
@.str.6 = [82 x i8] c" %01x Peripheral Pin Select - Allow only one configuration\0A\00"
@.str.7 = [83 x i8] c" %01x Peripheral Pin Select - Allow multiple configurations\0A\00"
@.str.8 = [86 x i8] c" %01x Permission Module Disable - Allow only one configuration\0A\00"
@.str.9 = [87 x i8] c" %01x Permission Module Disable - Allow multiple configurations\0A\00"
@.str.10 = [82 x i8] c" %01x Permission Group Lock - Allow only one configuration\0A\00"
@.str.11 = [83 x i8] c" %01x Permission Group Lock - Allow multiple configurations\0A\00"
@.str.12 = [67 x i8] c" %01x VBUSON pin: controlled by USB2 module\0A\00"
@.str.13 = [69 x i8] c" %01x VBUSON pin: controlled by port function\0A\00"
@.str.14 = [66 x i8] c" %01x USBID pin: controlled by USB2 module\0A\00"
@.str.15 = [68 x i8] c" %01x USBID pin: controlled by port function\0A\00"
@.str.16 = [67 x i8] c" %01x Write access to PWM IOCONx not locked\0A\00"
@.str.17 = [63 x i8] c" %01x Write access to PWM IOCONx locked\0A\00"
@.str.18 = [33 x i8] c" %04X USERID\0A\00"
define void @print_mk_devcfg3(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 = and i64 %0, 2147483648
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0), i64 8)
br label %12
10: ; preds = %2
%11 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0), i64 0)
br label %12
12: ; preds = %10, %8
%13 = and i64 %0, 1073741824
%14 = icmp eq i64 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i64 4)
br label %19
17: ; preds = %12
%18 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i64 0)
br label %19
19: ; preds = %17, %15
%20 = and i64 %0, 536870912
%21 = icmp eq i64 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.6, i64 0, i64 0), i64 2)
br label %26
24: ; preds = %19
%25 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.7, i64 0, i64 0), i64 0)
br label %26
26: ; preds = %24, %22
%27 = and i64 %0, 268435456
%28 = icmp eq i64 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %26
%30 = tail call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.8, i64 0, i64 0), i64 1)
br label %33
31: ; preds = %26
%32 = tail call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.9, i64 0, i64 0), i64 0)
br label %33
33: ; preds = %31, %29
%34 = and i64 %0, 134217728
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.10, i64 0, i64 0), i64 8)
br label %40
38: ; preds = %33
%39 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.11, i64 0, i64 0), i64 0)
br label %40
40: ; preds = %38, %36
%41 = and i64 %0, 8388608
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.12, i64 0, i64 0), i64 8)
br label %47
45: ; preds = %40
%46 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.13, i64 0, i64 0), i64 0)
br label %47
47: ; preds = %45, %43
%48 = and i64 %0, 4194304
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.14, i64 0, i64 0), i64 4)
br label %54
52: ; preds = %47
%53 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.15, i64 0, i64 0), i64 0)
br label %54
54: ; preds = %52, %50
%55 = and i64 %0, 1048576
%56 = icmp eq i64 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %54
%58 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i64 1)
br label %61
59: ; preds = %54
%60 = tail call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i64 0, i64 0), i64 0)
br label %61
61: ; preds = %59, %57
%62 = and i64 %0, 65535
%63 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i64 %62)
ret void
}