#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 */
bool is_peripheral_domain_setup_needed(void) {
  if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x1) &&
      (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) {
    if ((((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0xA0) &&
        (((*(uint32_t *)0xF0000FEC) & 0x000000F0) == 0x0)) {
      return true;
    }
    if ((((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0xD0) &&
        (((*(uint32_t *)0xF0000FEC) & 0x000000F0) == 0x0)) {
      return true;
    }
  }
  return false;
}


x86 assembly (clang, -O0):
<is_peripheral_domain_setup_needed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0000fe0,%eax
mov    (%rax),%eax
and    $0xff,%eax
cmp    $0x1,%eax
jne    11a1 <is_peripheral_domain_setup_needed+0xa1>
mov    $0xf0000fe4,%eax
mov    (%rax),%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    11a1 <is_peripheral_domain_setup_needed+0xa1>
mov    $0xf0000fe8,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0xa0,%eax
jne    1164 <is_peripheral_domain_setup_needed+0x64>
mov    $0xf0000fec,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0x0,%eax
jne    1164 <is_peripheral_domain_setup_needed+0x64>
movl   $0x1,-0x4(%rbp)
jmp    11a8 <is_peripheral_domain_setup_needed+0xa8>
mov    $0xf0000fe8,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0xd0,%eax
jne    119c <is_peripheral_domain_setup_needed+0x9c>
mov    $0xf0000fec,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0x0,%eax
jne    119c <is_peripheral_domain_setup_needed+0x9c>
movl   $0x1,-0x4(%rbp)
jmp    11a8 <is_peripheral_domain_setup_needed+0xa8>
jmp    11a1 <is_peripheral_domain_setup_needed+0xa1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_peripheral_domain_setup_needed>:
mov    $0xf0000fec,%eax
cmpb   $0x1,-0xc(%rax)
jne    1111 <is_peripheral_domain_setup_needed+0x11>
testb  $0xf,-0x8(%rax)
je     1114 <is_peripheral_domain_setup_needed+0x14>
xor    %eax,%eax
ret
mov    -0x4(%rax),%cl
and    $0xf0,%cl
cmp    $0xd0,%cl
je     112f <is_peripheral_domain_setup_needed+0x2f>
cmp    $0xa0,%cl
jne    1111 <is_peripheral_domain_setup_needed+0x11>
testb  $0xf0,(%rax)
jne    1111 <is_peripheral_domain_setup_needed+0x11>
mov    $0x1,%eax
ret
testb  $0xf0,(%rax)
jne    1111 <is_peripheral_domain_setup_needed+0x11>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_peripheral_domain_setup_needed() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%3 = and i32 %2, 255
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %28
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%7 = and i32 %6, 15
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %28
9: ; preds = %5
%10 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%11 = and i32 %10, 240
%12 = icmp eq i32 %11, 160
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32, i32* inttoptr (i64 4026535916 to i32*)
%15 = and i32 %14, 240
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %1
br label %29
18: ; preds = %13, %9
%19 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%20 = and i32 %19, 240
%21 = icmp eq i32 %20, 208
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i32, i32* inttoptr (i64 4026535916 to i32*)
%24 = and i32 %23, 240
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
store i32 1, i32* %1
br label %29
27: ; preds = %22, %18
br label %28
28: ; preds = %27, %5, %0
store i32 0, i32* %1
br label %29
29: ; preds = %28, %26, %17
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_peripheral_domain_setup_needed() {
%1 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%2 = and i32 %1, 255
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %20
4: ; preds = %0
%5 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%6 = and i32 %5, 15
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%10 = trunc i32 %9 to i8
%11 = and i8 %10, -16
switch i8 %11, label %20 [
i8 -96, label %12
i8 -48, label %16
]
12: ; preds = %8
%13 = load i32, i32* inttoptr (i64 4026535916 to i32*)
%14 = and i32 %13, 240
%15 = icmp eq i32 %14, 0
br i1 %15, label %21, label %20
16: ; preds = %8
%17 = load i32, i32* inttoptr (i64 4026535916 to i32*)
%18 = and i32 %17, 240
%19 = icmp eq i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %8, %12, %16, %4, %0
br label %21
21: ; preds = %16, %12, %20
%22 = phi i32 [ 0, %20 ], [ 1, %12 ], [ 1, %16 ]
ret i32 %22
}