#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 /*<<< orphan*/ check_for_untiled_conns();
int /*<<< orphan*/ check_for_untiled_fills();
int /*<<< orphan*/ check_for_untiled_node_textures();
int /*<<< orphan*/ make_dirty_tiles();
int check_for_tiling() {
  if (!check_for_untiled_conns()) {
    if (!check_for_untiled_node_textures()) {
      if (!check_for_untiled_fills()) {
        return 0;
      }
    }
  }
  make_dirty_tiles();
  return 1;
}


x86 assembly (clang, -O0):
<check_for_tiling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <check_for_untiled_conns@plt>
cmp    $0x0,%eax
jne    118e <check_for_tiling+0x4e>
mov    $0x0,%al
call   1050 <check_for_untiled_node_textures@plt>
cmp    $0x0,%eax
jne    1189 <check_for_tiling+0x49>
mov    $0x0,%al
call   1040 <check_for_untiled_fills@plt>
cmp    $0x0,%eax
jne    1184 <check_for_tiling+0x44>
movl   $0x0,-0x4(%rbp)
jmp    119c <check_for_tiling+0x5c>
jmp    1189 <check_for_tiling+0x49>
jmp    118e <check_for_tiling+0x4e>
mov    $0x0,%al
call   1030 <make_dirty_tiles@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_for_tiling>:
push   %rbx
xor    %eax,%eax
call   1060 <check_for_untiled_conns@plt>
test   %eax,%eax
jne    1164 <check_for_tiling+0x24>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <check_for_untiled_node_textures@plt>
test   %eax,%eax
jne    1164 <check_for_tiling+0x24>
xor    %eax,%eax
call   1040 <check_for_untiled_fills@plt>
test   %eax,%eax
je     1170 <check_for_tiling+0x30>
xor    %eax,%eax
call   1030 <make_dirty_tiles@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_for_tiling() {
%1 = alloca i32
%2 = call i32 (...) @check_for_untiled_conns()
%3 = icmp ne i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %0
%5 = call i32 (...) @check_for_untiled_node_textures()
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %4
%8 = call i32 (...) @check_for_untiled_fills()
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7
store i32 0, i32* %1
br label %15
11: ; preds = %7
br label %12
12: ; preds = %11, %4
br label %13
13: ; preds = %12, %0
%14 = call i32 (...) @make_dirty_tiles()
store i32 1, i32* %1
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @check_for_tiling() {
%1 = tail call i32 (...) @check_for_untiled_conns()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 (...) @check_for_untiled_node_textures()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 (...) @check_for_untiled_fills()
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %3, %6, %0
%10 = tail call i32 (...) @make_dirty_tiles()
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ 1, %9 ], [ 0, %6 ]
ret i32 %12
}