#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 */

/* Variables and functions */
int getwallbit(int /*<<< orphan*/);
int pow2(int, int);
int interior(int flag) {
  int big = (flag > pow2(2, 12) * 3) || (flag < pow2(2, 12));
  int gb = getwallbit(0);
  return (big && ((flag & gb) == gb));
}


x86 assembly (clang, -O0):
<interior>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow2@plt>
mov    -0x14(%rbp),%ecx
imul   $0x3,%eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
jg     1175 <interior+0x55>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow2@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <getwallbit@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     11a8 <interior+0x88>
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interior>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow2@plt>
lea    (%rax,%rax,2),%eax
mov    $0x1,%bpl
cmp    %ebx,%eax
jl     1153 <interior+0x33>
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow2@plt>
cmp    %ebx,%eax
setg   %bpl
xor    %edi,%edi
call   1030 <getwallbit@plt>
not    %ebx
test   %ebx,%eax
sete   %al
and    %bpl,%al
movzbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @interior(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @pow2(i32 2, i32 12)
%7 = mul nsw i32 %6, 3
%8 = icmp sgt i32 %5, %7
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @pow2(i32 2, i32 12)
%12 = icmp slt i32 %10, %11
br label %13
13: ; preds = %9, %1
%14 = phi i1 [ true, %1 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
store i32 %15, i32* %3
%16 = call i32 @getwallbit(i32 0)
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %13
%20 = load i32, i32* %2
%21 = load i32, i32* %4
%22 = and i32 %20, %21
%23 = load i32, i32* %4
%24 = icmp eq i32 %22, %23
br label %25
25: ; preds = %19, %13
%26 = phi i1 [ false, %13 ], [ %24, %19 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @interior(i32 %0) {
%2 = tail call i32 @pow2(i32 2, i32 12)
%3 = mul nsw i32 %2, 3
%4 = icmp slt i32 %3, %0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @pow2(i32 2, i32 12)
%7 = icmp sgt i32 %6, %0
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = tail call i32 @getwallbit(i32 0)
%11 = and i32 %10, %0
%12 = icmp eq i32 %11, %10
%13 = select i1 %9, i1 %12, i1 false
%14 = zext i1 %13 to i32
ret i32 %14
}