#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 */
struct _glist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ canvas_dirty(struct _glist *, int);
scalar_t__ triggerize_fanouts(struct _glist *);
scalar_t__ triggerize_line(struct _glist *);
scalar_t__ triggerize_triggers(struct _glist *);
void canvas_do_triggerize(struct _glist *cnv) {
  if (triggerize_line(cnv) || triggerize_fanouts(cnv) ||
      triggerize_triggers(cnv))
    canvas_dirty(cnv, 1);
}


x86 assembly (clang, -O0):
<canvas_do_triggerize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <triggerize_line@plt>
cmp    $0x0,%rax
jne    1185 <canvas_do_triggerize+0x45>
mov    -0x8(%rbp),%rdi
call   1030 <triggerize_fanouts@plt>
cmp    $0x0,%rax
jne    1185 <canvas_do_triggerize+0x45>
mov    -0x8(%rbp),%rdi
call   1050 <triggerize_triggers@plt>
cmp    $0x0,%rax
je     1193 <canvas_do_triggerize+0x53>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1060 <canvas_dirty@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canvas_do_triggerize>:
push   %rbx
mov    %rdi,%rbx
call   1040 <triggerize_line@plt>
test   %rax,%rax
jne    1168 <canvas_do_triggerize+0x28>
mov    %rbx,%rdi
call   1030 <triggerize_fanouts@plt>
test   %rax,%rax
jne    1168 <canvas_do_triggerize+0x28>
mov    %rbx,%rdi
call   1050 <triggerize_triggers@plt>
test   %rax,%rax
je     1176 <canvas_do_triggerize+0x36>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1060 <canvas_dirty@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct._glist = type { i32 }
define void @canvas_do_triggerize(%struct._glist* %0) {
%2 = alloca %struct._glist*
store %struct._glist* %0, %struct._glist** %2
%3 = load %struct._glist*, %struct._glist** %2
%4 = call i64 @triggerize_line(%struct._glist* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load %struct._glist*, %struct._glist** %2
%8 = call i64 @triggerize_fanouts(%struct._glist* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load %struct._glist*, %struct._glist** %2
%12 = call i64 @triggerize_triggers(%struct._glist* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10, %6, %1
%15 = load %struct._glist*, %struct._glist** %2
%16 = call i32 @canvas_dirty(%struct._glist* %15, i32 1)
br label %17
17: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
%struct._glist = type { i32 }
define void @canvas_do_triggerize(%struct._glist* %0) {
%2 = tail call i64 @triggerize_line(%struct._glist* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @triggerize_fanouts(%struct._glist* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i64 @triggerize_triggers(%struct._glist* %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %4, %1
%11 = tail call i32 @canvas_dirty(%struct._glist* %0, i32 1)
br label %12
12: ; preds = %10, %7
ret void
}