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

/* Variables and functions */
int assemble(struct _asm_context *);
int ifdef_ignore(struct _asm_context *);
int parse_ifdef_ignore(struct _asm_context *asm_context, int ignore_section) {
  if (ignore_section == 1) {
    if (ifdef_ignore(asm_context) == 2) {
      assemble(asm_context);
    }
  } else {
    if (assemble(asm_context) == 2) {
      ifdef_ignore(asm_context);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<parse_ifdef_ignore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1159 <parse_ifdef_ignore+0x39>
mov    -0x8(%rbp),%rdi
call   1040 <ifdef_ignore@plt>
cmp    $0x2,%eax
jne    1154 <parse_ifdef_ignore+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <assemble@plt>
jmp    1179 <parse_ifdef_ignore+0x59>
mov    -0x8(%rbp),%rdi
call   1030 <assemble@plt>
cmp    $0x2,%eax
jne    1174 <parse_ifdef_ignore+0x54>
mov    -0x8(%rbp),%rdi
call   1040 <ifdef_ignore@plt>
jmp    1179 <parse_ifdef_ignore+0x59>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_ifdef_ignore>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x1,%esi
jne    113d <parse_ifdef_ignore+0x1d>
call   1040 <ifdef_ignore@plt>
cmp    $0x2,%eax
jne    114f <parse_ifdef_ignore+0x2f>
mov    %rbx,%rdi
call   1030 <assemble@plt>
jmp    114f <parse_ifdef_ignore+0x2f>
call   1030 <assemble@plt>
cmp    $0x2,%eax
jne    114f <parse_ifdef_ignore+0x2f>
mov    %rbx,%rdi
call   1040 <ifdef_ignore@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct._asm_context = type { i32 }
define i32 @parse_ifdef_ignore(%struct._asm_context* %0, i32 %1) {
%3 = alloca %struct._asm_context*
%4 = alloca i32
store %struct._asm_context* %0, %struct._asm_context** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load %struct._asm_context*, %struct._asm_context** %3
%9 = call i32 @ifdef_ignore(%struct._asm_context* %8)
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load %struct._asm_context*, %struct._asm_context** %3
%13 = call i32 @assemble(%struct._asm_context* %12)
br label %14
14: ; preds = %11, %7
br label %23
15: ; preds = %2
%16 = load %struct._asm_context*, %struct._asm_context** %3
%17 = call i32 @assemble(%struct._asm_context* %16)
%18 = icmp eq i32 %17, 2
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load %struct._asm_context*, %struct._asm_context** %3
%21 = call i32 @ifdef_ignore(%struct._asm_context* %20)
br label %22
22: ; preds = %19, %15
br label %23
23: ; preds = %22, %14
ret i32 0
}

LLVM IR (-O2):
%struct._asm_context = type { i32 }
define i32 @parse_ifdef_ignore(%struct._asm_context* %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = tail call i32 @ifdef_ignore(%struct._asm_context* %0)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = tail call i32 @assemble(%struct._asm_context* %0)
br label %14
9: ; preds = %2
%10 = tail call i32 @assemble(%struct._asm_context* %0)
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @ifdef_ignore(%struct._asm_context* %0)
br label %14
14: ; preds = %9, %12, %4, %7
ret i32 0
}