#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 */
uint32_t _QEIIntNumberGet(uint32_t ui32Base) {
  uint32_t ui32Int;
  ;
  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
mov    %edi,-0x4(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    1143 <_QEIIntNumberGet+0x43>
cmpl   $0x4002c000,-0x4(%rbp)
jne    1137 <_QEIIntNumberGet+0x37>
movl   $0x1d,-0x8(%rbp)
jmp    113e <_QEIIntNumberGet+0x3e>
movl   $0x36,-0x8(%rbp)
jmp    118b <_QEIIntNumberGet+0x8b>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    117f <_QEIIntNumberGet+0x7f>
cmpl   $0x4002c000,-0x4(%rbp)
jne    1173 <_QEIIntNumberGet+0x73>
movl   $0x1d,-0x8(%rbp)
jmp    117a <_QEIIntNumberGet+0x7a>
movl   $0x0,-0x8(%rbp)
jmp    1186 <_QEIIntNumberGet+0x86>
movl   $0x0,-0x8(%rbp)
jmp    118b <_QEIIntNumberGet+0x8b>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_QEIIntNumberGet>:
mov    $0x70ff0000,%ecx
mov    0x400fe000,%eax
and    %ecx,%eax
cmp    $0x10050000,%eax
jne    1129 <_QEIIntNumberGet+0x29>
cmp    $0x4002c000,%edi
mov    $0x1d,%ecx
mov    $0x36,%eax
cmove  %ecx,%eax
ret
and    0x400fe000,%ecx
xor    %eax,%eax
cmp    $0x100a0000,%ecx
jne    114a <_QEIIntNumberGet+0x4a>
xor    %ecx,%ecx
cmp    $0x4002c000,%edi
mov    $0x1d,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_QEIIntNumberGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%5 = and i32 %4, 1895759872
%6 = icmp eq i32 %5, 268763136
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1073922048
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 29, i32* %3
br label %12
11: ; preds = %7
store i32 54, i32* %3
br label %12
12: ; preds = %11, %10
br label %25
13: ; preds = %1
%14 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%15 = and i32 %14, 1895759872
%16 = icmp eq i32 %15, 269090816
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 1073922048
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 29, i32* %3
br label %22
21: ; preds = %17
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20
br label %24
23: ; preds = %13
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22
br label %25
25: ; preds = %24, %12
%26 = load i32, i32* %3
ret i32 %26
}

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