#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*/ AssertFailure(char *, int);
unsigned long SysCtlPWMClockGet(void) {
  {
    if (!((*((volatile unsigned long *)(0x400FE010))) & 0x00100000)) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c",
          2625);
    }
  };
  if (!((*((volatile unsigned long *)(0x400FE060))) & 0x00100000)) {
    return (0x00000000);
  } else {
    return ((*((volatile unsigned long *)(0x400FE060))) &
            (0x00100000 | 0x000E0000));
  }
}


x86 assembly (clang, -O0):
<SysCtlPWMClockGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400fe010,%eax
mov    (%rax),%rax
and    $0x100000,%rax
cmp    $0x0,%rax
jne    1141 <SysCtlPWMClockGet+0x31>
lea    0xec9(%rip),%rdi
mov    $0xa41,%esi
call   1030 <AssertFailure@plt>
mov    $0x400fe060,%eax
mov    (%rax),%rax
and    $0x100000,%rax
cmp    $0x0,%rax
jne    1166 <SysCtlPWMClockGet+0x56>
movq   $0x0,-0x8(%rbp)
jmp    1178 <SysCtlPWMClockGet+0x68>
mov    $0x400fe060,%eax
mov    (%rax),%rax
and    $0x1e0000,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPWMClockGet>:
push   %rax
testq  $0x100000,0x400fe010
jne    1130 <SysCtlPWMClockGet+0x20>
lea    0xeda(%rip),%rdi
mov    $0xa41,%esi
call   1030 <AssertFailure@plt>
testq  $0x100000,0x400fe060
jne    1142 <SysCtlPWMClockGet+0x32>
xor    %eax,%eax
pop    %rcx
ret
mov    0x400fe060,%rax
40
and    $0x1e0000,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c\00"
define i64 @SysCtlPWMClockGet() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%3 = and i64 %2, 1048576
%4 = icmp ne i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 2625)
br label %7
7: ; preds = %5, %0
%8 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%9 = and i64 %8, 1048576
%10 = icmp ne i64 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
store i64 0, i64* %1
br label %15
12: ; preds = %7
%13 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%14 = and i64 %13, 1966080
store i64 %14, i64* %1
br label %15
15: ; preds = %12, %11
%16 = load i64, i64* %1
ret i64 %16
}

LLVM IR (-O2):
@.str = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c\00"
define i64 @SysCtlPWMClockGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%2 = and i64 %1, 1048576
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 2625)
br label %6
6: ; preds = %4, %0
%7 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%8 = and i64 %7, 1048576
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%12 = and i64 %11, 1966080
br label %13
13: ; preds = %6, %10
%14 = phi i64 [ %12, %10 ], [ 0, %6 ]
ret i64 %14
}