#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);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel,
                      unsigned long ulRxLevel) {
  {
    if (!(UARTBaseValid(ulBase))) {
      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",
          243);
    }
  };
  {
    if (!((ulTxLevel == 0x00000000) || (ulTxLevel == 0x00000001) ||
          (ulTxLevel == 0x00000002) || (ulTxLevel == 0x00000003) ||
          (ulTxLevel == 0x00000004))) {
      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",
          244);
    }
  };
  {
    if (!((ulRxLevel == 0x00000000) || (ulRxLevel == 0x00000008) ||
          (ulRxLevel == 0x00000010) || (ulRxLevel == 0x00000018) ||
          (ulRxLevel == 0x00000020))) {
      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",
          249);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000034))) = ulTxLevel | ulRxLevel;
}


x86 assembly (clang, -O0):
<UARTFIFOLevelSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    1157 <UARTFIFOLevelSet+0x37>
lea    0xeb3(%rip),%rdi
mov    $0xf3,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x0,-0x10(%rbp)
je     119f <UARTFIFOLevelSet+0x7f>
cmpq   $0x1,-0x10(%rbp)
je     119f <UARTFIFOLevelSet+0x7f>
cmpq   $0x2,-0x10(%rbp)
je     119f <UARTFIFOLevelSet+0x7f>
cmpq   $0x3,-0x10(%rbp)
je     119f <UARTFIFOLevelSet+0x7f>
cmpq   $0x4,-0x10(%rbp)
je     119f <UARTFIFOLevelSet+0x7f>
lea    0xe6b(%rip),%rdi
mov    $0xf4,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x0,-0x18(%rbp)
je     11e7 <UARTFIFOLevelSet+0xc7>
cmpq   $0x8,-0x18(%rbp)
je     11e7 <UARTFIFOLevelSet+0xc7>
cmpq   $0x10,-0x18(%rbp)
je     11e7 <UARTFIFOLevelSet+0xc7>
cmpq   $0x18,-0x18(%rbp)
je     11e7 <UARTFIFOLevelSet+0xc7>
cmpq   $0x20,-0x18(%rbp)
je     11e7 <UARTFIFOLevelSet+0xc7>
lea    0xe23(%rip),%rdi
mov    $0xf9,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rcx
or     -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x34(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFIFOLevelSet>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
je     1179 <UARTFIFOLevelSet+0x59>
cmp    $0x5,%r15
jb     114e <UARTFIFOLevelSet+0x2e>
lea    0xebc(%rip),%rdi
mov    $0xf4,%esi
call   1030 <AssertFailure@plt>
mov    %rbx,%rax
rol    $0x3d,%rax
cmp    $0x5,%rax
jb     116c <UARTFIFOLevelSet+0x4c>
lea    0xe9e(%rip),%rdi
mov    $0xf9,%esi
call   1030 <AssertFailure@plt>
or     %r15,%rbx
mov    %rbx,0x34(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe80(%rip),%rdi
mov    $0xf3,%esi
call   1030 <AssertFailure@plt>
cmp    $0x5,%r15
jae    113d <UARTFIFOLevelSet+0x1d>
jmp    114e <UARTFIFOLevelSet+0x2e>

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 @UARTFIFOLevelSet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = call i32 @UARTBaseValid(i64 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 243)
br label %12
12: ; preds = %10, %3
%13 = load i64, i64* %5
%14 = icmp eq i64 %13, 0
br i1 %14, label %29, label %15
15: ; preds = %12
%16 = load i64, i64* %5
%17 = icmp eq i64 %16, 1
br i1 %17, label %29, label %18
18: ; preds = %15
%19 = load i64, i64* %5
%20 = icmp eq i64 %19, 2
br i1 %20, label %29, label %21
21: ; preds = %18
%22 = load i64, i64* %5
%23 = icmp eq i64 %22, 3
br i1 %23, label %29, label %24
24: ; preds = %21
%25 = load i64, i64* %5
%26 = icmp eq i64 %25, 4
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 244)
br label %29
29: ; preds = %27, %24, %21, %18, %15, %12
%30 = load i64, i64* %6
%31 = icmp eq i64 %30, 0
br i1 %31, label %46, label %32
32: ; preds = %29
%33 = load i64, i64* %6
%34 = icmp eq i64 %33, 8
br i1 %34, label %46, label %35
35: ; preds = %32
%36 = load i64, i64* %6
%37 = icmp eq i64 %36, 16
br i1 %37, label %46, label %38
38: ; preds = %35
%39 = load i64, i64* %6
%40 = icmp eq i64 %39, 24
br i1 %40, label %46, label %41
41: ; preds = %38
%42 = load i64, i64* %6
%43 = icmp eq i64 %42, 32
br i1 %43, label %46, label %44
44: ; preds = %41
%45 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 249)
br label %46
46: ; preds = %44, %41, %38, %35, %32, %29
%47 = load i64, i64* %5
%48 = load i64, i64* %6
%49 = or i64 %47, %48
%50 = load i64, i64* %4
%51 = add i64 %50, 52
%52 = inttoptr i64 %51 to i64*
store volatile i64 %49, i64* %52
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 @UARTFIFOLevelSet(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 @UARTBaseValid(i64 %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 243)
br label %8
8: ; preds = %6, %3
%9 = icmp ult i64 %1, 5
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 244)
br label %12
12: ; preds = %10, %8
%13 = tail call i64 @llvm.fshl.i64(i64 %2, i64 %2, i64 61)
%14 = icmp ult i64 %13, 5
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 249)
br label %17
17: ; preds = %12, %15
%18 = or i64 %2, %1
%19 = add i64 %0, 52
%20 = inttoptr i64 %19 to i64*
store volatile i64 %18, i64* %20
ret void
}