#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 UARTModemControlSet(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_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          685);
    }
  };
  {
    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",
          686);
    }
  };
  {
    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_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          687);
    }
  };
  ulTemp = (*((volatile unsigned long *)(ulBase + 0x00000030)));
  ulTemp |= (ulControl & (0x00000800 | 0x00000400));
  (*((volatile unsigned long *)(ulBase + 0x00000030))) = ulTemp;
}


x86 assembly (clang, -O0):
<UARTModemControlSet>:
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 <UARTModemControlSet+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10000000,%rax
je     1186 <UARTModemControlSet+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10010000,%rax
je     1186 <UARTModemControlSet+0x76>
mov    $0x400fe000,%eax
mov    (%rax),%rax
and    $0x70ff0000,%rax
cmp    $0x10030000,%rax
jne    1197 <UARTModemControlSet+0x87>
lea    0xe73(%rip),%rdi
mov    $0x2ad,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x4000d000,-0x8(%rbp)
40
je     11b6 <UARTModemControlSet+0xa6>
lea    0xe54(%rip),%rdi
mov    $0x2ae,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rax
and    $0xfffffffffffff3ff,%rax
cmp    $0x0,%rax
je     11db <UARTModemControlSet+0xcb>
lea    0xe2f(%rip),%rdi
mov    $0x2af,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xc00,%rax
or     -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):
<UARTModemControlSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
testq  $0x70000000,0x400fe000
je     1199 <UARTModemControlSet+0x89>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10000000,%eax
je     1199 <UARTModemControlSet+0x89>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10010000,%eax
je     1199 <UARTModemControlSet+0x89>
mov    0x400fe000,%rax
40
and    $0x70ff0000,%eax
cmp    $0x10030000,%eax
je     1199 <UARTModemControlSet+0x89>
cmp    $0x4000d000,%r14
jne    11b3 <UARTModemControlSet+0xa3>
test   $0xfffffffffffff3ff,%rbx
je     1187 <UARTModemControlSet+0x77>
lea    0xe83(%rip),%rdi
mov    $0x2af,%esi
call   1030 <AssertFailure@plt>
and    $0xc00,%ebx
or     %rbx,0x30(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe60(%rip),%rdi
mov    $0x2ad,%esi
call   1030 <AssertFailure@plt>
cmp    $0x4000d000,%r14
je     116d <UARTModemControlSet+0x5d>
lea    0xe46(%rip),%rdi
mov    $0x2ae,%esi
call   1030 <AssertFailure@plt>
test   $0xfffffffffffff3ff,%rbx
jne    1176 <UARTModemControlSet+0x66>
jmp    1187 <UARTModemControlSet+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_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTModemControlSet(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 685)
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 686)
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 687)
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 = load i64, i64* %5
%42 = or i64 %41, %40
store i64 %42, i64* %5
%43 = load i64, i64* %5
%44 = load i64, i64* %3
%45 = add i64 %44, 48
%46 = inttoptr i64 %45 to i64*
store volatile i64 %43, i64* %46
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_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTModemControlSet(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 685)
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 686)
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 687)
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 = or i64 %32, %33
store volatile i64 %34, i64* %31
ret void
}