#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 SysCtlBrownOutConfigSet(unsigned long ulConfig, unsigned long ulDelay) {
  {
    if (!(!(ulConfig & ~(0x00000002 | 0x00000001)))) {
      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",
          1819);
    }
  };
  {
    if (!(ulDelay < 8192)) {
      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",
          1820);
    }
  };
  (*((volatile unsigned long *)(0x400FE030))) = (ulDelay << 2) | ulConfig;
}


x86 assembly (clang, -O0):
<SysCtlBrownOutConfigSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffffc,%rax
cmp    $0x0,%rax
je     1143 <SysCtlBrownOutConfigSet+0x33>
lea    0xec7(%rip),%rdi
mov    $0x71b,%esi
call   1030 <AssertFailure@plt>
cmpq   $0x2000,-0x10(%rbp)
jb     1162 <SysCtlBrownOutConfigSet+0x52>
lea    0xea8(%rip),%rdi
mov    $0x71c,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe030,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlBrownOutConfigSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
cmp    $0x4,%rdi
jb     1131 <SysCtlBrownOutConfigSet+0x21>
lea    0xed9(%rip),%rdi
mov    $0x71b,%esi
call   1030 <AssertFailure@plt>
cmp    $0x2000,%rbx
jb     114b <SysCtlBrownOutConfigSet+0x3b>
lea    0xebf(%rip),%rdi
mov    $0x71c,%esi
call   1030 <AssertFailure@plt>
shl    $0x2,%rbx
or     %r14,%rbx
mov    %rbx,0x400fe030
40
add    $0x8,%rsp
pop    %rbx
pop    %r14
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 void @SysCtlBrownOutConfigSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = and i64 %5, -4
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1819)
br label %10
10: ; preds = %8, %2
%11 = load i64, i64* %4
%12 = icmp ult i64 %11, 8192
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1820)
br label %15
15: ; preds = %13, %10
%16 = load i64, i64* %4
%17 = shl i64 %16, 2
%18 = load i64, i64* %3
%19 = or i64 %17, %18
store volatile i64 %19, i64* inttoptr (i64 1074782256 to i64*)
ret void
}

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 void @SysCtlBrownOutConfigSet(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, 4
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1819)
br label %6
6: ; preds = %4, %2
%7 = icmp ult i64 %1, 8192
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1820)
br label %10
10: ; preds = %8, %6
%11 = shl i64 %1, 2
%12 = or i64 %11, %0
store volatile i64 %12, i64* inttoptr (i64 1074782256 to i64*)
ret void
}