#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 int_min(int, int);
int t1_init_spb(int f) {
  int hc, vc, n;
  hc = int_min(((f & (0x0020 | 0x0200)) == 0x0020) +
                   ((f & (0x0080 | 0x0800)) == 0x0080),
               1) -
       int_min(((f & (0x0020 | 0x0200)) == (0x0020 | 0x0200)) +
                   ((f & (0x0080 | 0x0800)) == (0x0080 | 0x0800)),
               1);
  vc = int_min(((f & (0x0010 | 0x0100)) == 0x0010) +
                   ((f & (0x0040 | 0x0400)) == 0x0040),
               1) -
       int_min(((f & (0x0010 | 0x0100)) == (0x0010 | 0x0100)) +
                   ((f & (0x0040 | 0x0400)) == (0x0040 | 0x0400)),
               1);
  if (!hc && !vc) {
    n = 0;
  } else {
    n = (!(hc > 0 || (!hc && vc > 0)));
  }
  return n;
}


x86 assembly (clang, -O0):
<t1_init_spb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x220,%eax
cmp    $0x20,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x4(%rbp),%eax
and    $0x880,%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0x220,%eax
cmp    $0x220,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x4(%rbp),%eax
and    $0x880,%eax
cmp    $0x880,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x110,%eax
cmp    $0x10,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x4(%rbp),%eax
and    $0x440,%eax
cmp    $0x40,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    $0x110,%eax
cmp    $0x110,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x4(%rbp),%eax
and    $0x440,%eax
cmp    $0x440,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1227 <t1_init_spb+0x117>
cmpl   $0x0,-0xc(%rbp)
jne    1227 <t1_init_spb+0x117>
movl   $0x0,-0x10(%rbp)
jmp    1262 <t1_init_spb+0x152>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
jg     1255 <t1_init_spb+0x145>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x1a(%rbp)
jne    124f <t1_init_spb+0x13f>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_init_spb>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
mov    %edi,%ebp
and    $0x220,%ebp
xor    %eax,%eax
cmp    $0x20,%ebp
sete   %al
mov    %edi,%ebx
and    $0x880,%ebx
xor    %edi,%edi
cmp    $0x80,%ebx
sete   %dil
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,%r14d
xor    %eax,%eax
cmp    $0x220,%ebp
sete   %al
xor    %edi,%edi
cmp    $0x880,%ebx
sete   %dil
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
sub    %eax,%r14d
mov    %r15d,%ebx
and    $0x110,%ebx
xor    %eax,%eax
cmp    $0x10,%ebx
sete   %al
and    $0x440,%r15d
xor    %edi,%edi
cmp    $0x40,%r15d
sete   %dil
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
mov    %eax,%ebp
xor    %eax,%eax
cmp    $0x110,%ebx
sete   %al
xor    %edi,%edi
cmp    $0x440,%r15d
sete   %dil
add    %eax,%edi
mov    $0x1,%esi
call   1030 <int_min@plt>
sub    %eax,%ebp
xor    %eax,%eax
mov    %r14d,%ecx
or     %ebp,%ecx
je     11e7 <t1_init_spb+0xd7>
test   %r14d,%r14d
setne  %al
setle  %cl
test   %ebp,%ebp
setle  %dl
or     %al,%dl
and    %cl,%dl
movzbl %dl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @t1_init_spb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = and i32 %6, 544
%8 = icmp eq i32 %7, 32
%9 = zext i1 %8 to i32
%10 = load i32, i32* %2
%11 = and i32 %10, 2176
%12 = icmp eq i32 %11, 128
%13 = zext i1 %12 to i32
%14 = add nsw i32 %9, %13
%15 = call i32 @int_min(i32 %14, i32 1)
%16 = load i32, i32* %2
%17 = and i32 %16, 544
%18 = icmp eq i32 %17, 544
%19 = zext i1 %18 to i32
%20 = load i32, i32* %2
%21 = and i32 %20, 2176
%22 = icmp eq i32 %21, 2176
%23 = zext i1 %22 to i32
%24 = add nsw i32 %19, %23
%25 = call i32 @int_min(i32 %24, i32 1)
%26 = sub nsw i32 %15, %25
store i32 %26, i32* %3
%27 = load i32, i32* %2
%28 = and i32 %27, 272
%29 = icmp eq i32 %28, 16
%30 = zext i1 %29 to i32
%31 = load i32, i32* %2
%32 = and i32 %31, 1088
%33 = icmp eq i32 %32, 64
%34 = zext i1 %33 to i32
%35 = add nsw i32 %30, %34
%36 = call i32 @int_min(i32 %35, i32 1)
%37 = load i32, i32* %2
%38 = and i32 %37, 272
%39 = icmp eq i32 %38, 272
%40 = zext i1 %39 to i32
%41 = load i32, i32* %2
%42 = and i32 %41, 1088
%43 = icmp eq i32 %42, 1088
%44 = zext i1 %43 to i32
%45 = add nsw i32 %40, %44
%46 = call i32 @int_min(i32 %45, i32 1)
%47 = sub nsw i32 %36, %46
store i32 %47, i32* %4
%48 = load i32, i32* %3
%49 = icmp ne i32 %48, 0
br i1 %49, label %54, label %50
50: ; preds = %1
%51 = load i32, i32* %4
%52 = icmp ne i32 %51, 0
br i1 %52, label %54, label %53
53: ; preds = %50
store i32 0, i32* %5
br label %69
54: ; preds = %50, %1
%55 = load i32, i32* %3
%56 = icmp sgt i32 %55, 0
br i1 %56, label %65, label %57
57: ; preds = %54
%58 = load i32, i32* %3
%59 = icmp ne i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %57
%61 = load i32, i32* %4
%62 = icmp sgt i32 %61, 0
br label %63
63: ; preds = %60, %57
%64 = phi i1 [ false, %57 ], [ %62, %60 ]
br label %65
65: ; preds = %63, %54
%66 = phi i1 [ true, %54 ], [ %64, %63 ]
%67 = xor i1 %66, true
%68 = zext i1 %67 to i32
store i32 %68, i32* %5
br label %69
69: ; preds = %65, %53
%70 = load i32, i32* %5
ret i32 %70
}

LLVM IR (-O2):
define i32 @t1_init_spb(i32 %0) {
%2 = and i32 %0, 544
%3 = icmp eq i32 %2, 32
%4 = zext i1 %3 to i32
%5 = and i32 %0, 2176
%6 = icmp eq i32 %5, 128
%7 = zext i1 %6 to i32
%8 = add nuw nsw i32 %4, %7
%9 = tail call i32 @int_min(i32 %8, i32 1)
%10 = icmp eq i32 %2, 544
%11 = zext i1 %10 to i32
%12 = icmp eq i32 %5, 2176
%13 = zext i1 %12 to i32
%14 = add nuw nsw i32 %11, %13
%15 = tail call i32 @int_min(i32 %14, i32 1)
%16 = sub nsw i32 %9, %15
%17 = and i32 %0, 272
%18 = icmp eq i32 %17, 16
%19 = zext i1 %18 to i32
%20 = and i32 %0, 1088
%21 = icmp eq i32 %20, 64
%22 = zext i1 %21 to i32
%23 = add nuw nsw i32 %19, %22
%24 = tail call i32 @int_min(i32 %23, i32 1)
%25 = icmp eq i32 %17, 272
%26 = zext i1 %25 to i32
%27 = icmp eq i32 %20, 1088
%28 = zext i1 %27 to i32
%29 = add nuw nsw i32 %26, %28
%30 = tail call i32 @int_min(i32 %29, i32 1)
%31 = sub nsw i32 %24, %30
%32 = icmp ne i32 %16, 0
%33 = icmp ne i32 %31, 0
%34 = select i1 %32, i1 true, i1 %33
br i1 %34, label %35, label %41
35: ; preds = %1
%36 = icmp slt i32 %16, 1
%37 = icmp slt i32 %31, 1
%38 = select i1 %32, i1 true, i1 %37
%39 = select i1 %36, i1 %38, i1 false
%40 = zext i1 %39 to i32
br label %41
41: ; preds = %1, %35
%42 = phi i32 [ %40, %35 ], [ 0, %1 ]
ret i32 %42
}