#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ nfq_operate(int, int);
int strtoul(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int rv = EXIT_FAILURE;
  if (!nfq_operate(argc > 1 ? strtoul(argv[1], NULL, 10) : 1400,
                   argc > 2 ? strtoul(argv[2], NULL, 10) : 0))
    goto fail;
  rv = EXIT_SUCCESS;
fail:
  return rv;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116a <main+0x4a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x18(%rbp)
jmp    1177 <main+0x57>
mov    $0x578,%eax
mov    %eax,-0x18(%rbp)
jmp    1177 <main+0x57>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    11a5 <main+0x85>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x20(%rbp)
jmp    11af <main+0x8f>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    11af <main+0x8f>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <nfq_operate@plt>
cmp    $0x0,%eax
jne    11c8 <main+0xa8>
jmp    11d4 <main+0xb4>
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%r14d
cmp    $0x2,%edi
jl     116b <main+0x4b>
mov    %rsi,%r12
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,%r15d
cmp    $0x2,%ebp
je     1173 <main+0x53>
mov    0x10(%r12),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,%ebx
jmp    1173 <main+0x53>
xor    %ebx,%ebx
mov    $0x578,%r15d
mov    %r15d,%edi
mov    %ebx,%esi
call   1040 <nfq_operate@plt>
test   %eax,%eax
je     118b <main+0x6b>
mov    0x2e50(%rip),%rax
mov    (%rax),%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @EXIT_FAILURE
store i32 %7, i32* %6
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strtoul(i8* %13, i32* null, i32 10)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %10
%17 = phi i32 [ %14, %10 ], [ 1400, %15 ]
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 2
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @strtoul(i8* %23, i32* null, i32 10)
br label %26
25: ; preds = %16
br label %26
26: ; preds = %25, %20
%27 = phi i32 [ %24, %20 ], [ 0, %25 ]
%28 = call i32 @nfq_operate(i32 %17, i32 %27)
%29 = icmp ne i32 %28, 0
br i1 %29, label %31, label %30
30: ; preds = %26
br label %33
31: ; preds = %26
%32 = load i32, i32* @EXIT_SUCCESS
store i32 %32, i32* %6
br label %33
33: ; preds = %31, %30
%34 = load i32, i32* %6
ret i32 %34
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @EXIT_FAILURE
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strtoul(i8* nocapture %7, i32* null, i32 10)
%9 = icmp eq i32 %0, 2
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @strtoul(i8* nocapture %12, i32* null, i32 10)
br label %14
14: ; preds = %2, %5, %10
%15 = phi i32 [ %8, %10 ], [ %8, %5 ], [ 1400, %2 ]
%16 = phi i32 [ %13, %10 ], [ 0, %5 ], [ 0, %2 ]
%17 = tail call i32 @nfq_operate(i32 %15, i32 %16)
%18 = icmp eq i32 %17, 0
%19 = load i32, i32* @EXIT_SUCCESS
%20 = select i1 %18, i32 %3, i32 %19
ret i32 %20
}