#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__ *);
scalar_t__ rat_mod_parse_parameter(scalar_t__, scalar_t__, char const *,
                                   scalar_t__ *);
int rat_mod_icpt_pid(uint16_t mid, const char *mstr, uint16_t aid,
                     const char *astr, uint16_t pid, const char *pstr) {
  uint16_t icptmid;
  uint16_t icptaid;
  uint16_t icptpid;
  do {
  } while (0);
  if (rat_mod_parse_module(mstr, &icptmid) == 0 &&
      rat_mod_parse_action(icptmid, astr, &icptaid) == 0 &&
      rat_mod_parse_parameter(icptmid, icptaid, pstr, &icptpid) == 0 &&
      mid == icptmid && aid == icptaid && pid == icptpid)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<rat_mod_icpt_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
jmp    1155 <rat_mod_icpt_pid+0x25>
mov    -0x18(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <rat_mod_parse_module@plt>
cmp    $0x0,%rax
jne    11dc <rat_mod_icpt_pid+0xac>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1050 <rat_mod_parse_action@plt>
cmp    $0x0,%rax
jne    11dc <rat_mod_icpt_pid+0xac>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x38(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1030 <rat_mod_parse_parameter@plt>
cmp    $0x0,%rax
jne    11dc <rat_mod_icpt_pid+0xac>
mov    -0x10(%rbp),%rax
cmp    -0x40(%rbp),%rax
jne    11dc <rat_mod_icpt_pid+0xac>
mov    -0x20(%rbp),%rax
cmp    -0x48(%rbp),%rax
jne    11dc <rat_mod_icpt_pid+0xac>
mov    -0x30(%rbp),%rax
cmp    -0x50(%rbp),%rax
jne    11dc <rat_mod_icpt_pid+0xac>
movl   $0x0,-0x4(%rbp)
jmp    11e3 <rat_mod_icpt_pid+0xb3>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_mod_icpt_pid>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %r9,%r13
mov    %r8,%r14
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,%rax
mov    %rdi,%r12
lea    0x8(%rsp),%rsi
mov    %rax,%rdi
call   1040 <rat_mod_parse_module@plt>
test   %rax,%rax
jne    1178 <rat_mod_icpt_pid+0x48>
mov    0x8(%rsp),%rdi
lea    0x10(%rsp),%rdx
mov    %rbx,%rsi
call   1050 <rat_mod_parse_action@plt>
test   %rax,%rax
je     118b <rat_mod_icpt_pid+0x5b>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
lea    0x18(%rsp),%rcx
mov    %r13,%rdx
call   1030 <rat_mod_parse_parameter@plt>
test   %rax,%rax
jne    1178 <rat_mod_icpt_pid+0x48>
cmp    %r12,0x8(%rsp)
jne    1178 <rat_mod_icpt_pid+0x48>
cmp    %r15,0x10(%rsp)
jne    1178 <rat_mod_icpt_pid+0x48>
xor    %eax,%eax
cmp    %r14,0x18(%rsp)
je     117d <rat_mod_icpt_pid+0x4d>
jmp    1178 <rat_mod_icpt_pid+0x48>

LLVM IR (-O0):
define i32 @rat_mod_icpt_pid(i64 %0, i8* %1, i64 %2, i8* %3, i64 %4, i8* %5) {
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
store i64 %0, i64* %8
store i8* %1, i8** %9
store i64 %2, i64* %10
store i8* %3, i8** %11
store i64 %4, i64* %12
store i8* %5, i8** %13
br label %17
17: ; preds = %6
br label %18
18: ; preds = %17
%19 = load i8*, i8** %9
%20 = call i64 @rat_mod_parse_module(i8* %19, i64* %14)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %46
22: ; preds = %18
%23 = load i64, i64* %14
%24 = load i8*, i8** %11
%25 = call i64 @rat_mod_parse_action(i64 %23, i8* %24, i64* %15)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %46
27: ; preds = %22
%28 = load i64, i64* %14
%29 = load i64, i64* %15
%30 = load i8*, i8** %13
%31 = call i64 @rat_mod_parse_parameter(i64 %28, i64 %29, i8* %30, i64* %16)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %46
33: ; preds = %27
%34 = load i64, i64* %8
%35 = load i64, i64* %14
%36 = icmp eq i64 %34, %35
br i1 %36, label %37, label %46
37: ; preds = %33
%38 = load i64, i64* %10
%39 = load i64, i64* %15
%40 = icmp eq i64 %38, %39
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load i64, i64* %12
%43 = load i64, i64* %16
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %46
45: ; preds = %41
store i32 0, i32* %7
br label %47
46: ; preds = %41, %37, %33, %27, %22, %18
store i32 -1, i32* %7
br label %47
47: ; preds = %46, %45
%48 = load i32, i32* %7
ret i32 %48
}

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