#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t _QEIIntNumberGet(uint32_t ui32Base) {
  uint32_t ui32Int;
  ASSERT((ui32Base == 0x4002C000) || (ui32Base == 0x4002D000));
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x00050000))) {
    if (ui32Base == 0x4002C000) {
      ui32Int = 29;
    } else {
      ui32Int = 54;
    }
  } else if ((((*((volatile uint32_t *)(0x400FE000))) &
               (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x000A0000))) {
    if (ui32Base == 0x4002C000) {
      ui32Int = 29;
    } else {
      ui32Int = 0;
    }
  } else {
    ui32Int = 0;
  }
  return (ui32Int);
}


x86 assembly (clang, -O0):
<_QEIIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x4002c000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113a <_QEIIntNumberGet+0x2a>
cmpl   $0x4002d000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    1183 <_QEIIntNumberGet+0x73>
cmpl   $0x4002c000,-0x4(%rbp)
jne    1177 <_QEIIntNumberGet+0x67>
movl   $0x1d,-0x8(%rbp)
jmp    117e <_QEIIntNumberGet+0x6e>
movl   $0x36,-0x8(%rbp)
jmp    11cb <_QEIIntNumberGet+0xbb>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    11bf <_QEIIntNumberGet+0xaf>
cmpl   $0x4002c000,-0x4(%rbp)
jne    11b3 <_QEIIntNumberGet+0xa3>
movl   $0x1d,-0x8(%rbp)
jmp    11ba <_QEIIntNumberGet+0xaa>
movl   $0x0,-0x8(%rbp)
jmp    11c6 <_QEIIntNumberGet+0xb6>
movl   $0x0,-0x8(%rbp)
jmp    11cb <_QEIIntNumberGet+0xbb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_QEIIntNumberGet>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x4002c000,%eax
sete   %dil
call   1030 <ASSERT@plt>
mov    $0x70ff0000,%eax
mov    0x400fe000,%ecx
and    %eax,%ecx
cmp    $0x10050000,%ecx
jne    1155 <_QEIIntNumberGet+0x45>
cmp    $0x4002c000,%ebx
mov    $0x1d,%ecx
mov    $0x36,%eax
cmove  %ecx,%eax
pop    %rbx
ret
xor    $0x4002c000,%ebx
and    0x400fe000,%eax
xor    $0x100a0000,%eax
xor    %ecx,%ecx
or     %ebx,%eax
mov    $0x1d,%eax
cmovne %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_QEIIntNumberGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1073922048
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1073926144
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)
%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 %22
16: ; preds = %9
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 1073922048
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 29, i32* %3
br label %21
20: ; preds = %16
store i32 54, i32* %3
br label %21
21: ; preds = %20, %19
br label %34
22: ; preds = %9
%23 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%24 = and i32 %23, 1895759872
%25 = icmp eq i32 %24, 269090816
br i1 %25, label %26, label %32
26: ; preds = %22
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 1073922048
br i1 %28, label %29, label %30
29: ; preds = %26
store i32 29, i32* %3
br label %31
30: ; preds = %26
store i32 0, i32* %3
br label %31
31: ; preds = %30, %29
br label %33
32: ; preds = %22
store i32 0, i32* %3
br label %33
33: ; preds = %32, %31
br label %34
34: ; preds = %33, %21
%35 = load i32, i32* %3
ret i32 %35
}

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