#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 */
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ rat_mod_parse_action(scalar_t__, char const *, scalar_t__ *);
scalar_t__ rat_mod_parse_module(char const *, scalar_t__ *);
int rat_mod_icpt_aid(uint16_t mid, const char *mstr, uint16_t aid,
                     const char *astr) {
  uint16_t icptmid;
  uint16_t icptaid;
  do {
  } while (0);
  if (rat_mod_parse_module(mstr, &icptmid) == 0 &&
      rat_mod_parse_action(icptmid, astr, &icptaid) == 0 && mid == icptmid &&
      aid == icptaid)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<rat_mod_icpt_aid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
jmp    113d <rat_mod_icpt_aid+0x1d>
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <rat_mod_parse_module@plt>
cmp    $0x0,%rax
jne    1197 <rat_mod_icpt_aid+0x77>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   1040 <rat_mod_parse_action@plt>
cmp    $0x0,%rax
jne    1197 <rat_mod_icpt_aid+0x77>
mov    -0x10(%rbp),%rax
cmp    -0x30(%rbp),%rax
jne    1197 <rat_mod_icpt_aid+0x77>
mov    -0x20(%rbp),%rax
cmp    -0x38(%rbp),%rax
jne    1197 <rat_mod_icpt_aid+0x77>
movl   $0x0,-0x4(%rbp)
jmp    119e <rat_mod_icpt_aid+0x7e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_mod_icpt_aid>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%rax
mov    %rdi,%r15
mov    %rsp,%rsi
mov    %rax,%rdi
call   1030 <rat_mod_parse_module@plt>
test   %rax,%rax
je     1154 <rat_mod_icpt_aid+0x34>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
mov    (%rsp),%rdi
lea    0x8(%rsp),%rdx
mov    %rbx,%rsi
call   1040 <rat_mod_parse_action@plt>
test   %rax,%rax
jne    1145 <rat_mod_icpt_aid+0x25>
cmp    %r15,(%rsp)
jne    1145 <rat_mod_icpt_aid+0x25>
xor    %eax,%eax
cmp    %r14,0x8(%rsp)
je     114a <rat_mod_icpt_aid+0x2a>
jmp    1145 <rat_mod_icpt_aid+0x25>

LLVM IR (-O0):
define i32 @rat_mod_icpt_aid(i64 %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
store i64 %0, i64* %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
br label %12
12: ; preds = %4
br label %13
13: ; preds = %12
%14 = load i8*, i8** %7
%15 = call i64 @rat_mod_parse_module(i8* %14, i64* %10)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = load i64, i64* %10
%19 = load i8*, i8** %9
%20 = call i64 @rat_mod_parse_action(i64 %18, i8* %19, i64* %11)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %31
22: ; preds = %17
%23 = load i64, i64* %6
%24 = load i64, i64* %10
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = load i64, i64* %8
%28 = load i64, i64* %11
%29 = icmp eq i64 %27, %28
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 0, i32* %5
br label %32
31: ; preds = %26, %22, %17, %13
store i32 -1, i32* %5
br label %32
32: ; preds = %31, %30
%33 = load i32, i32* %5
ret i32 %33
}

LLVM IR (-O2):
define i32 @rat_mod_icpt_aid(i64 %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = bitcast i64* %5 to i8*
%8 = bitcast i64* %6 to i8*
%9 = call i64 @rat_mod_parse_module(i8* %1, i64* %5)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %4
%12 = load i64, i64* %5
%13 = call i64 @rat_mod_parse_action(i64 %12, i8* %3, i64* %6)
%14 = icmp eq i64 %13, 0
%15 = load i64, i64* %5
%16 = icmp eq i64 %15, %0
%17 = select i1 %14, i1 %16, i1 false
%18 = load i64, i64* %6
%19 = icmp eq i64 %18, %2
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %22, label %21
21: ; preds = %11, %4
br label %22
22: ; preds = %11, %21
%23 = phi i32 [ -1, %21 ], [ 0, %11 ]
ret i32 %23
}