#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 cymkd_parser {
  int dummy;
};

/* Variables and functions */
int block_quote(struct cymkd_parser *);
int code_block(struct cymkd_parser *);
int header(struct cymkd_parser *);
int literal_html(struct cymkd_parser *);
int ordered_list(struct cymkd_parser *);
int paragraph(struct cymkd_parser *);
int unordered_list(struct cymkd_parser *);
bool block(struct cymkd_parser *parser) {
  bool success;
  success = header(parser);
  if (!success) {
    success = unordered_list(parser);
    if (!success) {
      success = ordered_list(parser);
      if (!success) {
        success = block_quote(parser);
        if (!success) {
          success = code_block(parser);
          if (!success) {
            success = literal_html(parser);
            if (!success) {
              success = paragraph(parser);
            }
          }
        }
      }
    }
  }
  return success;
}


x86 assembly (clang, -O0):
<block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <header@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1225 <block+0xb5>
mov    -0x8(%rbp),%rdi
call   1050 <unordered_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1220 <block+0xb0>
mov    -0x8(%rbp),%rdi
call   1080 <ordered_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    121b <block+0xab>
mov    -0x8(%rbp),%rdi
call   1090 <block_quote@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1216 <block+0xa6>
mov    -0x8(%rbp),%rdi
call   1070 <code_block@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1211 <block+0xa1>
mov    -0x8(%rbp),%rdi
call   1040 <literal_html@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    120c <block+0x9c>
mov    -0x8(%rbp),%rdi
call   1060 <paragraph@plt>
mov    %eax,-0xc(%rbp)
jmp    1211 <block+0xa1>
jmp    1216 <block+0xa6>
jmp    121b <block+0xab>
jmp    1220 <block+0xb0>
jmp    1225 <block+0xb5>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block>:
push   %rbx
mov    %rdi,%rbx
call   1030 <header@plt>
test   %eax,%eax
jne    11b9 <block+0x49>
mov    %rbx,%rdi
call   1050 <unordered_list@plt>
test   %eax,%eax
jne    11b9 <block+0x49>
mov    %rbx,%rdi
call   1080 <ordered_list@plt>
test   %eax,%eax
jne    11b9 <block+0x49>
mov    %rbx,%rdi
call   1090 <block_quote@plt>
test   %eax,%eax
jne    11b9 <block+0x49>
mov    %rbx,%rdi
call   1070 <code_block@plt>
test   %eax,%eax
jne    11b9 <block+0x49>
mov    %rbx,%rdi
call   1040 <literal_html@plt>
test   %eax,%eax
je     11bb <block+0x4b>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <paragraph@plt>

LLVM IR (-O0):
%struct.cymkd_parser = type { i32 }
define i32 @block(%struct.cymkd_parser* %0) {
%2 = alloca %struct.cymkd_parser*
%3 = alloca i32
store %struct.cymkd_parser* %0, %struct.cymkd_parser** %2
%4 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%5 = call i32 @header(%struct.cymkd_parser* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %41, label %8
8: ; preds = %1
%9 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%10 = call i32 @unordered_list(%struct.cymkd_parser* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %40, label %13
13: ; preds = %8
%14 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%15 = call i32 @ordered_list(%struct.cymkd_parser* %14)
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %39, label %18
18: ; preds = %13
%19 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%20 = call i32 @block_quote(%struct.cymkd_parser* %19)
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %38, label %23
23: ; preds = %18
%24 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%25 = call i32 @code_block(%struct.cymkd_parser* %24)
store i32 %25, i32* %3
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 0
br i1 %27, label %37, label %28
28: ; preds = %23
%29 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%30 = call i32 @literal_html(%struct.cymkd_parser* %29)
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = icmp ne i32 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %28
%34 = load %struct.cymkd_parser*, %struct.cymkd_parser** %2
%35 = call i32 @paragraph(%struct.cymkd_parser* %34)
store i32 %35, i32* %3
br label %36
36: ; preds = %33, %28
br label %37
37: ; preds = %36, %23
br label %38
38: ; preds = %37, %18
br label %39
39: ; preds = %38, %13
br label %40
40: ; preds = %39, %8
br label %41
41: ; preds = %40, %1
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
%struct.cymkd_parser = type { i32 }
define i32 @block(%struct.cymkd_parser* %0) {
%2 = tail call i32 @header(%struct.cymkd_parser* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %21
4: ; preds = %1
%5 = tail call i32 @unordered_list(%struct.cymkd_parser* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = tail call i32 @ordered_list(%struct.cymkd_parser* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = tail call i32 @block_quote(%struct.cymkd_parser* %0)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = tail call i32 @code_block(%struct.cymkd_parser* %0)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = tail call i32 @literal_html(%struct.cymkd_parser* %0)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = tail call i32 @paragraph(%struct.cymkd_parser* %0)
br label %21
21: ; preds = %4, %10, %16, %19, %13, %7, %1
%22 = phi i32 [ %2, %1 ], [ %5, %4 ], [ %8, %7 ], [ %11, %10 ], [ %14, %13 ], [ %17, %16 ], [ %20, %19 ]
ret i32 %22
}