#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 UARTModemControlGet(unsigned long ulBase) {
  {
    if (!(!((((*((volatile unsigned long *)(0x400FE000))) & 0x70000000) ==
             0x00000000) ||
            (((*((volatile unsigned long *)(0x400FE000))) &
              (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00000000))) &&
          !(((*((volatile unsigned long *)(0x400FE000))) &
             (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00010000)) &&
          !(((*((volatile unsigned long *)(0x400FE000))) &
             (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00030000)))) {
      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_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          764);
    }
  };
  {
    if (!(ulBase == 0x4000D000)) {
      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_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          765);
    }
  };
  return ((*((volatile unsigned long *)(ulBase + 0x00000030))) &
          (0x00000800 | 0x00000400));
}


x86 assembly (clang, -O0):
<UARTModemControlGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70000000,%rax
cmp    $0x0,%rax
je     1182 <UARTModemControlGet+0x72>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10000000,%rax
je     1182 <UARTModemControlGet+0x72>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10010000,%rax
je     1182 <UARTModemControlGet+0x72>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10030000,%rax
jne    1193 <UARTModemControlGet+0x83>
lea    0xe77(%rip),%rdi
mov    $0x2fc,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x4000d000,-0x8(%rbp)
40
je     11b2 <UARTModemControlGet+0xa2>
lea    0xe58(%rip),%rdi
mov    $0x2fd,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
and    $0xc00,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlGet>:
push   %rbx
mov    %rdi,%rbx
testq  $0x70000000,0x400fe000
je     115e <UARTModemControlGet+0x4e>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10000000,%eax
je     115e <UARTModemControlGet+0x4e>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10010000,%eax
je     115e <UARTModemControlGet+0x4e>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10030000,%eax
jne    116f <UARTModemControlGet+0x5f>
lea    0xe9b(%rip),%rdi
mov    $0x2fc,%esi
call   1030 <AssertFailure@plt>
cmp    $0x4000d000,%rbx
je     1189 <UARTModemControlGet+0x79>
lea    0xe81(%rip),%rdi
mov    $0x2fd,%esi
call   1030 <AssertFailure@plt>
mov    0x30(%rbx),%rax
and    $0xc00,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [201 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_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define i64 @UARTModemControlGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%4 = and i64 %3, 1879048192
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%8 = and i64 %7, 1895759872
%9 = icmp eq i64 %8, 268435456
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%12 = and i64 %11, 1895759872
%13 = icmp eq i64 %12, 268500992
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%16 = and i64 %15, 1895759872
%17 = icmp eq i64 %16, 268632064
br i1 %17, label %18, label %20
18: ; preds = %14, %10, %6, %1
%19 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 764)
br label %20
20: ; preds = %18, %14
%21 = load i64, i64* %2
%22 = icmp eq i64 %21, 1073795072
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 765)
br label %25
25: ; preds = %23, %20
%26 = load i64, i64* %2
%27 = add i64 %26, 48
%28 = inttoptr i64 %27 to i64*
%29 = load volatile i64, i64* %28
%30 = and i64 %29, 3072
ret i64 %30
}

LLVM IR (-O2):
@.str = [201 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_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define i64 @UARTModemControlGet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%3 = and i64 %2, 1879048192
%4 = icmp eq i64 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%7 = and i64 %6, 1895759872
%8 = icmp eq i64 %7, 268435456
br i1 %8, label %17, label %9
9: ; preds = %5
%10 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%11 = and i64 %10, 1895759872
%12 = icmp eq i64 %11, 268500992
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%15 = and i64 %14, 1895759872
%16 = icmp eq i64 %15, 268632064
br i1 %16, label %17, label %19
17: ; preds = %13, %9, %5, %1
%18 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 764)
br label %19
19: ; preds = %17, %13
%20 = icmp eq i64 %0, 1073795072
br i1 %20, label %23, label %21
21: ; preds = %19
%22 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 765)
br label %23
23: ; preds = %21, %19
%24 = add i64 %0, 48
%25 = inttoptr i64 %24 to i64*
%26 = load volatile i64, i64* %25
%27 = and i64 %26, 3072
ret i64 %27
}