#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*/ error(char *);
scalar_t__ filter(char *, char *);
int /*<<< orphan*/ insert8(int /*<<< orphan*/);
int Xalign(int modifier, char *label, char *mnemo, char *oper) {
  extern unsigned long pc;
  if (filter(oper, "_EVEN_")) {
    if (pc & 1) {
      insert8(0);
    }
  } else if (filter(oper, "_ODD_")) {
    if (!(pc & 1)) {
      insert8(0);
    }
  } else {
    error("please, use options EVEN or ODD");
  }
  return 0;
}


x86 assembly (clang, -O0):
<Xalign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <filter@plt>
cmp    $0x0,%rax
je     1185 <Xalign+0x55>
mov    0x2e80(%rip),%rax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1180 <Xalign+0x50>
xor    %edi,%edi
call   1030 <insert8@plt>
jmp    11d4 <Xalign+0xa4>
mov    -0x20(%rbp),%rdi
lea    0xe77(%rip),%rsi
call   1040 <filter@plt>
cmp    $0x0,%rax
je     11c3 <Xalign+0x93>
mov    0x2e42(%rip),%rax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    11be <Xalign+0x8e>
xor    %edi,%edi
call   1030 <insert8@plt>
jmp    11cf <Xalign+0x9f>
lea    0xe43(%rip),%rdi
call   1050 <error@plt>
jmp    11d4 <Xalign+0xa4>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xalign>:
push   %rbx
mov    %rcx,%rbx
lea    0xec5(%rip),%rsi
mov    %rcx,%rdi
call   1040 <filter@plt>
test   %rax,%rax
je     1156 <Xalign+0x26>
mov    0x2e99(%rip),%rax
testb  $0x1,(%rax)
jne    1176 <Xalign+0x46>
jmp    118b <Xalign+0x5b>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
call   1040 <filter@plt>
test   %rax,%rax
je     117f <Xalign+0x4f>
mov    0x2e77(%rip),%rax
testb  $0x1,(%rax)
jne    118b <Xalign+0x5b>
xor    %edi,%edi
call   1030 <insert8@plt>
jmp    118b <Xalign+0x5b>
lea    0xe87(%rip),%rdi
call   1050 <error@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"_EVEN_\00"
@pc = external global i64
@.str.1 = [6 x i8] c"_ODD_\00"
@.str.2 = [32 x i8] c"please, use options EVEN or ODD\00"
define i32 @Xalign(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = call i64 @filter(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %4
%13 = load i64, i64* @pc
%14 = and i64 %13, 1
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @insert8(i32 0)
br label %18
18: ; preds = %16, %12
br label %33
19: ; preds = %4
%20 = load i8*, i8** %8
%21 = call i64 @filter(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %30
23: ; preds = %19
%24 = load i64, i64* @pc
%25 = and i64 %24, 1
%26 = icmp ne i64 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %23
%28 = call i32 @insert8(i32 0)
br label %29
29: ; preds = %27, %23
br label %32
30: ; preds = %19
%31 = call i32 @error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %29
br label %33
33: ; preds = %32, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"_EVEN_\00"
@pc = external global i64
@.str.1 = [6 x i8] c"_ODD_\00"
@.str.2 = [32 x i8] c"please, use options EVEN or ODD\00"
define i32 @Xalign(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i64 @filter(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = load i64, i64* @pc
%9 = and i64 %8, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %24, label %11
11: ; preds = %7
%12 = tail call i32 @insert8(i32 0)
br label %24
13: ; preds = %4
%14 = tail call i64 @filter(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = load i64, i64* @pc
%18 = and i64 %17, 1
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = tail call i32 @insert8(i32 0)
br label %24
22: ; preds = %13
%23 = tail call i32 @error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22, %20, %16, %7, %11
ret i32 0
}