#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 */

/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(unsigned long volatile);
void SysCtlPWMClockSet(unsigned long ulConfig) {
  DEBUG_ASSERT((ulConfig == 0x00000000) || (ulConfig == 0x00100000) ||
               (ulConfig == 0x00120000) || (ulConfig == 0x00140000) ||
               (ulConfig == 0x00160000) || (ulConfig == 0x00180000) ||
               (ulConfig == 0x001A0000));
  DEBUG_ASSERT((*((volatile unsigned long *)(0x400FE010))) & 0x00100000);
  (*((volatile unsigned long *)(0x400FE060))) =
      (((*((volatile unsigned long *)(0x400FE060))) &
        ~(0x00100000 | 0x000E0000)) |
       ulConfig);
}


x86 assembly (clang, -O0):
<SysCtlPWMClockSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
mov    $0x1,%al
cmpq   $0x100000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
mov    $0x1,%al
cmpq   $0x120000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
mov    $0x1,%al
cmpq   $0x140000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
mov    $0x1,%al
cmpq   $0x160000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
mov    $0x1,%al
cmpq   $0x180000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1199 <SysCtlPWMClockSet+0x89>
cmpq   $0x1a0000,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe010,%eax
mov    (%rax),%rdi
and    $0x100000,%rdi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe060,%eax
mov    (%rax),%rcx
and    $0xffffffffffe1ffff,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe060,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPWMClockSet>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
rol    $0x2f,%rax
cmp    $0xd,%rax
jae    1130 <SysCtlPWMClockSet+0x20>
mov    $0x1,%edi
mov    $0x1f01,%ecx
bt     %eax,%ecx
jb     113d <SysCtlPWMClockSet+0x2d>
xor    %edi,%edi
cmp    $0x1a0000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x400fe010,%rdi
40
and    $0x100000,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0xffffffffffe1ffff,%rax
and    0x400fe060,%rax
40
or     %rbx,%rax
mov    %rax,0x400fe060
40
pop    %rbx
ret

LLVM IR (-O0):
define void @SysCtlPWMClockSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %23, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1048576
br i1 %7, label %23, label %8
8: ; preds = %5
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 1179648
br i1 %10, label %23, label %11
11: ; preds = %8
%12 = load i64, i64* %2
%13 = icmp eq i64 %12, 1310720
br i1 %13, label %23, label %14
14: ; preds = %11
%15 = load i64, i64* %2
%16 = icmp eq i64 %15, 1441792
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = load i64, i64* %2
%19 = icmp eq i64 %18, 1572864
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i64, i64* %2
%22 = icmp eq i64 %21, 1703936
br label %23
23: ; preds = %20, %17, %14, %11, %8, %5, %1
%24 = phi i1 [ true, %17 ], [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %22, %20 ]
%25 = zext i1 %24 to i32
%26 = sext i32 %25 to i64
%27 = call i32 @DEBUG_ASSERT(i64 %26)
%28 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%29 = and i64 %28, 1048576
%30 = call i32 @DEBUG_ASSERT(i64 %29)
%31 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%32 = and i64 %31, -1966081
%33 = load i64, i64* %2
%34 = or i64 %32, %33
store volatile i64 %34, i64* inttoptr (i64 1074782304 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlPWMClockSet(i64 %0) {
%2 = tail call i64 @llvm.fshl.i64(i64 %0, i64 %0, i64 47)
%3 = icmp ult i64 %2, 13
br i1 %3, label %7, label %4
4: ; preds = %7, %1
%5 = icmp eq i64 %0, 1703936
%6 = zext i1 %5 to i64
br label %12
7: ; preds = %1
%8 = trunc i64 %2 to i16
%9 = lshr i16 7937, %8
%10 = and i16 %9, 1
%11 = icmp eq i16 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %7, %4
%13 = phi i64 [ %6, %4 ], [ 1, %7 ]
%14 = tail call i32 @DEBUG_ASSERT(i64 %13)
%15 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%16 = and i64 %15, 1048576
%17 = tail call i32 @DEBUG_ASSERT(i64 %16)
%18 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%19 = and i64 %18, -1966081
%20 = or i64 %19, %0
store volatile i64 %20, i64* inttoptr (i64 1074782304 to i64*)
ret void
}