#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);
void UARTModemControlClear(unsigned long ulBase, unsigned long ulControl) {
  unsigned long ulTemp;
  {
    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_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          834);
    }
  };
  {
    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_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          835);
    }
  };
  {
    if (!((ulControl & ~(0x00000800 | 0x00000400)) == 0)) {
      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/"
          "uartlib.c",
          836);
    }
  };
  ulTemp = (*((volatile unsigned long *)(ulBase + 0x00000030)));
  ulTemp &= ~(ulControl & (0x00000800 | 0x00000400));
  (*((volatile unsigned long *)(ulBase + 0x00000030))) = ulTemp;
}


x86 assembly (clang, -O0):
<UARTModemControlClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70000000,%rax
cmp    $0x0,%rax
je     1186 <UARTModemControlClear+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10000000,%rax
je     1186 <UARTModemControlClear+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10010000,%rax
je     1186 <UARTModemControlClear+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10030000,%rax
jne    1197 <UARTModemControlClear+0x87>
lea    0xe73(%rip),%rdi
mov    $0x342,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x4000d000,-0x8(%rbp)
40
je     11b6 <UARTModemControlClear+0xa6>
lea    0xe54(%rip),%rdi
mov    $0x343,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rax
and    $0xfffffffffffff3ff,%rax
cmp    $0x0,%rax
je     11db <UARTModemControlClear+0xcb>
lea    0xe2f(%rip),%rdi
mov    $0x344,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xc00,%rax
xor    $0xffffffffffffffff,%rax
and    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x30(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
testq  $0x70000000,0x400fe000
je     119c <UARTModemControlClear+0x8c>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10000000,%eax
je     119c <UARTModemControlClear+0x8c>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10010000,%eax
je     119c <UARTModemControlClear+0x8c>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10030000,%eax
je     119c <UARTModemControlClear+0x8c>
cmp    $0x4000d000,%r14
jne    11b6 <UARTModemControlClear+0xa6>
test   $0xfffffffffffff3ff,%rbx
je     1187 <UARTModemControlClear+0x77>
lea    0xe83(%rip),%rdi
mov    $0x344,%esi
call   1030 <AssertFailure@plt>
not    %ebx
or     $0xfffffffffffff3ff,%rbx
and    %rbx,0x30(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe5d(%rip),%rdi
mov    $0x342,%esi
call   1030 <AssertFailure@plt>
cmp    $0x4000d000,%r14
je     116d <UARTModemControlClear+0x5d>
lea    0xe43(%rip),%rdi
mov    $0x343,%esi
call   1030 <AssertFailure@plt>
test   $0xfffffffffffff3ff,%rbx
jne    1176 <UARTModemControlClear+0x66>
jmp    1187 <UARTModemControlClear+0x77>

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_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTModemControlClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%7 = and i64 %6, 1879048192
%8 = icmp eq i64 %7, 0
br i1 %8, label %21, label %9
9: ; preds = %2
%10 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%11 = and i64 %10, 1895759872
%12 = icmp eq i64 %11, 268435456
br i1 %12, label %21, 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, 268500992
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load volatile i64, i64* inttoptr (i64 1074782208 to i64*)
%19 = and i64 %18, 1895759872
%20 = icmp eq i64 %19, 268632064
br i1 %20, label %21, label %23
21: ; preds = %17, %13, %9, %2
%22 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 834)
br label %23
23: ; preds = %21, %17
%24 = load i64, i64* %3
%25 = icmp eq i64 %24, 1073795072
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 835)
br label %28
28: ; preds = %26, %23
%29 = load i64, i64* %4
%30 = and i64 %29, -3073
%31 = icmp eq i64 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %28
%33 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 836)
br label %34
34: ; preds = %32, %28
%35 = load i64, i64* %3
%36 = add i64 %35, 48
%37 = inttoptr i64 %36 to i64*
%38 = load volatile i64, i64* %37
store i64 %38, i64* %5
%39 = load i64, i64* %4
%40 = and i64 %39, 3072
%41 = xor i64 %40, -1
%42 = load i64, i64* %5
%43 = and i64 %42, %41
store i64 %43, i64* %5
%44 = load i64, i64* %5
%45 = load i64, i64* %3
%46 = add i64 %45, 48
%47 = inttoptr i64 %46 to i64*
store volatile i64 %44, i64* %47
ret void
}

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_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTModemControlClear(i64 %0, i64 %1) {
%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 = %2
%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, %2
%19 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 834)
br label %20
20: ; preds = %18, %14
%21 = icmp eq i64 %0, 1073795072
br i1 %21, label %24, label %22
22: ; preds = %20
%23 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 835)
br label %24
24: ; preds = %22, %20
%25 = and i64 %1, -3073
%26 = icmp eq i64 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 836)
br label %29
29: ; preds = %27, %24
%30 = add i64 %0, 48
%31 = inttoptr i64 %30 to i64*
%32 = load volatile i64, i64* %31
%33 = and i64 %1, 3072
%34 = xor i64 %33, -1
%35 = and i64 %32, %34
store volatile i64 %35, i64* %31
ret void
}