#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 */
typedef scalar_t__ uint_fast8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(scalar_t__);
int /*<<< orphan*/ IntUnregister(scalar_t__);
scalar_t__ _ADCIntNumberGet(int, int);
void ADCIntUnregister(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  uint_fast8_t ui8Int;
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  ASSERT(ui32SequenceNum < 4);
  ui8Int = _ADCIntNumberGet(ui32Base, ui32SequenceNum);
  ASSERT(ui8Int != 0);
  IntDisable(ui8Int);
  IntUnregister(ui8Int);
}


x86 assembly (clang, -O0):
<ADCIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x11(%rbp)
je     116d <ADCIntUnregister+0x2d>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
cmpl   $0x4,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <_ADCIntNumberGet@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1030 <IntDisable@plt>
mov    -0x10(%rbp),%rdi
call   1050 <IntUnregister@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCIntUnregister>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1040 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1040 <ASSERT@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <_ADCIntNumberGet@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <ASSERT@plt>
mov    %rbx,%rdi
call   1030 <IntDisable@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @ADCIntUnregister(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1073971200
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 1073975296
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 4
%17 = zext i1 %16 to i32
%18 = call i32 @ASSERT(i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i64 @_ADCIntNumberGet(i32 %19, i32 %20)
store i64 %21, i64* %5
%22 = load i64, i64* %5
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i32
%25 = call i32 @ASSERT(i32 %24)
%26 = load i64, i64* %5
%27 = call i32 @IntDisable(i64 %26)
%28 = load i64, i64* %5
%29 = call i32 @IntUnregister(i64 %28)
ret void
}

LLVM IR (-O2):
define void @ADCIntUnregister(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = tail call i64 @_ADCIntNumberGet(i32 %0, i32 %1)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @ASSERT(i32 %12)
%14 = tail call i32 @IntDisable(i64 %10)
%15 = tail call i32 @IntUnregister(i64 %10)
ret void
}