#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*/ CANBaseValid(unsigned long);
unsigned long CANIntNumberGet(unsigned long);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
void CANIntUnregister(unsigned long ulBase) {
  unsigned long ulIntNumber;
  {
    if (!(CANBaseValid(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_LM3S8962_Crossworks/Boot/lib/driverlib/canlib.c",
          1007);
    }
  };
  ulIntNumber = CANIntNumberGet(ulBase);
  IntUnregister(ulIntNumber);
  IntDisable(ulIntNumber);
}


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

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

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_LM3S8962_Crossworks/Boot/lib/driverlib/canlib.c\00"
define void @CANIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @CANBaseValid(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 ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1007)
br label %9
9: ; preds = %7, %1
%10 = load i64, i64* %2
%11 = call i64 @CANIntNumberGet(i64 %10)
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = call i32 @IntUnregister(i64 %12)
%14 = load i64, i64* %3
%15 = call i32 @IntDisable(i64 %14)
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_LM3S8962_Crossworks/Boot/lib/driverlib/canlib.c\00"
define void @CANIntUnregister(i64 %0) {
%2 = tail call i32 @CANBaseValid(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 ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1007)
br label %6
6: ; preds = %4, %1
%7 = tail call i64 @CANIntNumberGet(i64 %0)
%8 = tail call i32 @IntUnregister(i64 %7)
%9 = tail call i32 @IntDisable(i64 %7)
ret void
}