#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*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
unsigned long UARTIntNumberGet(unsigned long);
void UARTIntUnregister(unsigned long ulBase) {
  unsigned long ulInt;
  {
    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",
          1417);
    }
  };
  ulInt = UARTIntNumberGet(ulBase);
  IntDisable(ulInt);
  IntUnregister(ulInt);
}


x86 assembly (clang, -O0):
<UARTIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    117f <UARTIntUnregister+0x2f>
lea    0xe8b(%rip),%rdi
mov    $0x589,%esi
call   1040 <AssertFailure@plt>
mov    -0x8(%rbp),%rdi
call   1030 <UARTIntNumberGet@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <IntDisable@plt>
mov    -0x10(%rbp),%rdi
call   1070 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntUnregister>:
push   %rbx
mov    %rdi,%rbx
call   1060 <UARTBaseValid@plt>
test   %eax,%eax
jne    116e <UARTIntUnregister+0x1e>
lea    0xe9c(%rip),%rdi
mov    $0x589,%esi
call   1040 <AssertFailure@plt>
mov    %rbx,%rdi
call   1030 <UARTIntNumberGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IntDisable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <IntUnregister@plt>

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 @UARTIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @UARTBaseValid(i64 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1417)
br label %9
9: ; preds = %7, %1
%10 = load i64, i64* %2
%11 = call i64 @UARTIntNumberGet(i64 %10)
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = call i32 @IntDisable(i64 %12)
%14 = load i64, i64* %3
%15 = call i32 @IntUnregister(i64 %14)
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 @UARTIntUnregister(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1417)
br label %6
6: ; preds = %4, %1
%7 = tail call i64 @UARTIntNumberGet(i64 %0)
%8 = tail call i32 @IntDisable(i64 %7)
%9 = tail call i32 @IntUnregister(i64 %7)
ret void
}