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

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint_fast8_t _CANIntNumberGet(uint32_t ui32Base) {
  uint_fast8_t ui8Int;
  ASSERT((ui32Base == 0x40040000) || (ui32Base == 0x40041000));
  ui8Int = 0;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x00050000))) {
    if (ui32Base == 0x40040000) {
      ui8Int = 55;
    } else if (ui32Base == 0x40041000) {
      ui8Int = 56;
    }
  } else if ((((*((volatile uint32_t *)(0x400FE000))) &
               (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x000A0000))) {
    if (ui32Base == 0x40040000) {
      ui8Int = 54;
    } else if (ui32Base == 0x40041000) {
      ui8Int = 55;
    }
  }
  return (ui8Int);
}


x86 assembly (clang, -O0):
<_CANIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40040000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113a <_CANIntNumberGet+0x2a>
cmpl   $0x40041000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
movl   $0x0,-0x8(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    119c <_CANIntNumberGet+0x8c>
cmpl   $0x40040000,-0x4(%rbp)
jne    117e <_CANIntNumberGet+0x6e>
movl   $0x37,-0x8(%rbp)
jmp    1197 <_CANIntNumberGet+0x87>
cmpl   $0x40041000,-0x4(%rbp)
jne    1192 <_CANIntNumberGet+0x82>
movl   $0x38,-0x8(%rbp)
jmp    1197 <_CANIntNumberGet+0x87>
jmp    11ef <_CANIntNumberGet+0xdf>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    11ea <_CANIntNumberGet+0xda>
cmpl   $0x40040000,-0x4(%rbp)
jne    11cc <_CANIntNumberGet+0xbc>
movl   $0x36,-0x8(%rbp)
jmp    11e5 <_CANIntNumberGet+0xd5>
cmpl   $0x40041000,-0x4(%rbp)
jne    11e0 <_CANIntNumberGet+0xd0>
movl   $0x37,-0x8(%rbp)
jmp    11e5 <_CANIntNumberGet+0xd5>
jmp    11ea <_CANIntNumberGet+0xda>
jmp    11ef <_CANIntNumberGet+0xdf>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_CANIntNumberGet>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40040000,%eax
sete   %dil
call   1030 <ASSERT@plt>
mov    $0x70ff0000,%ecx
mov    0x400fe000,%eax
and    %ecx,%eax
cmp    $0x10050000,%eax
jne    115f <_CANIntNumberGet+0x4f>
xor    %eax,%eax
cmp    $0x40041000,%ebx
mov    $0x38,%ecx
cmovne %eax,%ecx
cmp    $0x40040000,%ebx
mov    $0x37,%eax
cmovne %ecx,%eax
pop    %rbx
ret
and    0x400fe000,%ecx
xor    %edx,%edx
cmp    $0x40041000,%ebx
mov    $0x37,%eax
cmovne %edx,%eax
cmp    $0x100a0000,%ecx
mov    $0x36,%ecx
cmovne %edx,%ecx
cmovne %ecx,%eax
cmp    $0x40040000,%ebx
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_CANIntNumberGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1074003968
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1074008064
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
store i32 0, i32* %3
%13 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%14 = and i32 %13, 1895759872
%15 = icmp eq i32 %14, 268763136
br i1 %15, label %16, label %26
16: ; preds = %9
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 1074003968
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 55, i32* %3
br label %25
20: ; preds = %16
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 1074008064
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 56, i32* %3
br label %24
24: ; preds = %23, %20
br label %25
25: ; preds = %24, %19
br label %41
26: ; preds = %9
%27 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%28 = and i32 %27, 1895759872
%29 = icmp eq i32 %28, 269090816
br i1 %29, label %30, label %40
30: ; preds = %26
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 1074003968
br i1 %32, label %33, label %34
33: ; preds = %30
store i32 54, i32* %3
br label %39
34: ; preds = %30
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 1074008064
br i1 %36, label %37, label %38
37: ; preds = %34
store i32 55, i32* %3
br label %38
38: ; preds = %37, %34
br label %39
39: ; preds = %38, %33
br label %40
40: ; preds = %39, %26
br label %41
41: ; preds = %40, %25
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
define i32 @_CANIntNumberGet(i32 %0) {
%2 = icmp eq i32 %0, 1074003968
%3 = icmp eq i32 %0, 1074008064
%4 = and i32 %0, -4097
%5 = icmp eq i32 %4, 1074003968
%6 = zext i1 %5 to i32
%7 = tail call i32 @ASSERT(i32 %6)
%8 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%9 = and i32 %8, 1895759872
%10 = icmp eq i32 %9, 268763136
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = select i1 %3, i32 56, i32 0
%13 = select i1 %2, i32 55, i32 %12
br label %22
14: ; preds = %1
%15 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%16 = and i32 %15, 1895759872
%17 = icmp ne i32 %16, 269090816
%18 = or i1 %2, %17
%19 = select i1 %17, i32 0, i32 54
%20 = select i1 %3, i32 55, i32 0
%21 = select i1 %18, i32 %19, i32 %20
br label %22
22: ; preds = %14, %11
%23 = phi i32 [ %13, %11 ], [ %21, %14 ]
ret i32 %23
}