#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 */
scalar_t__ mib_set(scalar_t__, void *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ restart_IPFilter_DMZ_MACFilter();
int setDefaultIpPortFilterAction(char inact, char outact) {
  if (mib_set(0 + 30, (void *)&outact) == 0) {
    printf("Set Default Filter Action error!\n");
    return -1;
  }
  if (mib_set(0 + 31, (void *)&inact) == 0) {
    printf("Set Default Filter Action error!\n");
    return -1;
  }
  restart_IPFilter_DMZ_MACFilter();
  return 0;
}


x86 assembly (clang, -O0):
<setDefaultIpPortFilterAction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    $0x1e,%edi
lea    -0x6(%rbp),%rsi
call   1030 <mib_set@plt>
cmp    $0x0,%rax
jne    1174 <setDefaultIpPortFilterAction+0x44>
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b2 <setDefaultIpPortFilterAction+0x82>
mov    $0x1f,%edi
lea    -0x5(%rbp),%rsi
call   1030 <mib_set@plt>
cmp    $0x0,%rax
jne    11a4 <setDefaultIpPortFilterAction+0x74>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b2 <setDefaultIpPortFilterAction+0x82>
mov    $0x0,%al
call   1050 <restart_IPFilter_DMZ_MACFilter@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDefaultIpPortFilterAction>:
push   %rbx
sub    $0x10,%rsp
mov    %dil,0xf(%rsp)
mov    %sil,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    $0x1e,%edi
call   1040 <mib_set@plt>
test   %rax,%rax
je     1172 <setDefaultIpPortFilterAction+0x42>
lea    0xf(%rsp),%rsi
mov    $0x1f,%edi
call   1040 <mib_set@plt>
test   %rax,%rax
je     1172 <setDefaultIpPortFilterAction+0x42>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <restart_IPFilter_DMZ_MACFilter@plt>
jmp    1183 <setDefaultIpPortFilterAction+0x53>
lea    0xe87(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Set Default Filter Action error!\0A\00"
define i32 @setDefaultIpPortFilterAction(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = call i64 @mib_set(i64 30, i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %17
10: ; preds = %2
%11 = call i64 @mib_set(i64 31, i8* %4)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %17
15: ; preds = %10
%16 = call i32 (...) @restart_IPFilter_DMZ_MACFilter()
store i32 0, i32* %3
br label %17
17: ; preds = %15, %13, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str.1 = [33 x i8] c"Set Default Filter Action error!\00"
define i32 @setDefaultIpPortFilterAction(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i64 @mib_set(i64 30, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.1, i64 0, i64 0))
br label %16
9: ; preds = %2
%10 = call i64 @mib_set(i64 31, i8* %3)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.1, i64 0, i64 0))
br label %16
14: ; preds = %9
%15 = call i32 (...) @restart_IPFilter_DMZ_MACFilter()
br label %16
16: ; preds = %14, %12, %7
%17 = phi i32 [ -1, %7 ], [ -1, %12 ], [ 0, %14 ]
ret i32 %17
}