#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 prv_test_floating_rule();
int prv_test_i32_rule();
int prv_test_label_rule();
int prv_test_matcher();
int prv_test_regs_rule();
int prv_test_wildcards_rule();
int ir_test(void) {
  int res;
  res = prv_test_wildcards_rule();
  res |= prv_test_i32_rule();
  res |= prv_test_regs_rule();
  res |= prv_test_floating_rule();
  res |= prv_test_label_rule();
  res |= prv_test_matcher();
  return res;
}


x86 assembly (clang, -O0):
<ir_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <prv_test_wildcards_rule@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <prv_test_i32_rule@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <prv_test_regs_rule@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <prv_test_floating_rule@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <prv_test_label_rule@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <prv_test_matcher@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ir_test>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1070 <prv_test_wildcards_rule@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <prv_test_i32_rule@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1050 <prv_test_regs_rule@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1040 <prv_test_floating_rule@plt>
mov    %eax,%ebx
or     %r14d,%ebx
or     %ebp,%ebx
xor    %eax,%eax
call   1060 <prv_test_label_rule@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1080 <prv_test_matcher@plt>
or     %ebp,%eax
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ir_test() {
%1 = alloca i32
%2 = call i32 (...) @prv_test_wildcards_rule()
store i32 %2, i32* %1
%3 = call i32 (...) @prv_test_i32_rule()
%4 = load i32, i32* %1
%5 = or i32 %4, %3
store i32 %5, i32* %1
%6 = call i32 (...) @prv_test_regs_rule()
%7 = load i32, i32* %1
%8 = or i32 %7, %6
store i32 %8, i32* %1
%9 = call i32 (...) @prv_test_floating_rule()
%10 = load i32, i32* %1
%11 = or i32 %10, %9
store i32 %11, i32* %1
%12 = call i32 (...) @prv_test_label_rule()
%13 = load i32, i32* %1
%14 = or i32 %13, %12
store i32 %14, i32* %1
%15 = call i32 (...) @prv_test_matcher()
%16 = load i32, i32* %1
%17 = or i32 %16, %15
store i32 %17, i32* %1
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @ir_test() {
%1 = tail call i32 (...) @prv_test_wildcards_rule()
%2 = tail call i32 (...) @prv_test_i32_rule()
%3 = or i32 %2, %1
%4 = tail call i32 (...) @prv_test_regs_rule()
%5 = or i32 %3, %4
%6 = tail call i32 (...) @prv_test_floating_rule()
%7 = or i32 %5, %6
%8 = tail call i32 (...) @prv_test_label_rule()
%9 = or i32 %7, %8
%10 = tail call i32 (...) @prv_test_matcher()
%11 = or i32 %9, %10
ret i32 %11
}