#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 /*<<< orphan*/ getOptionInputOutput(int, int);
int /*<<< orphan*/ strcmp(char *, int /*<<< orphan*/);
int recuperNombreInputOutput(int argc, char **argv, int bool_input) {
  int i;
  int int_result;
  int stop;
  int_result = -1;
  i = 0;
  stop = 0;
  while (i < argc && !stop) {
    if (int_result >= 0) {
      if (argv[i][0] != '-')
        int_result++;
      else
        stop = 1;
    }
    if (!strcmp(argv[i], getOptionInputOutput(bool_input, 1)) ||
        !strcmp(argv[i], getOptionInputOutput(bool_input, 0)))
      int_result = 0;
    i++;
  }
  return int_result;
}


x86 assembly (clang, -O0):
<recuperNombreInputOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x21(%rbp)
jge    1164 <recuperNombreInputOutput+0x44>
cmpl   $0x0,-0x20(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1174 <recuperNombreInputOutput+0x54>
jmp    1224 <recuperNombreInputOutput+0x104>
cmpl   $0x0,-0x1c(%rbp)
jl     11b0 <recuperNombreInputOutput+0x90>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     11a4 <recuperNombreInputOutput+0x84>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ab <recuperNombreInputOutput+0x8b>
movl   $0x1,-0x20(%rbp)
jmp    11b0 <recuperNombreInputOutput+0x90>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
call   1040 <getOptionInputOutput@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     120f <recuperNombreInputOutput+0xef>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1040 <getOptionInputOutput@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1216 <recuperNombreInputOutput+0xf6>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1147 <recuperNombreInputOutput+0x27>
mov    -0x1c(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recuperNombreInputOutput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    11b8 <recuperNombreInputOutput+0x98>
mov    %edx,%r14d
mov    %rsi,%r15
mov    %edi,%eax
mov    %rax,(%rsp)
mov    $0xffffffff,%r13d
mov    $0x1,%ebp
nopw   0x0(%rax,%rax,1)
mov    -0x8(%r15,%rbp,8),%rbx
xor    %r12d,%r12d
test   %r13d,%r13d
js     116c <recuperNombreInputOutput+0x4c>
xor    %eax,%eax
cmpb   $0x2d,(%rbx)
sete   %r12b
setne  %al
add    %eax,%r13d
mov    %r14d,%edi
mov    $0x1,%esi
call   1040 <getOptionInputOutput@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11a4 <recuperNombreInputOutput+0x84>
mov    -0x8(%r15,%rbp,8),%rbx
mov    %r14d,%edi
xor    %esi,%esi
call   1040 <getOptionInputOutput@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    11a7 <recuperNombreInputOutput+0x87>
xor    %r13d,%r13d
cmp    (%rsp),%rbp
jae    11be <recuperNombreInputOutput+0x9e>
add    $0x1,%rbp
test   %r12d,%r12d
je     1150 <recuperNombreInputOutput+0x30>
jmp    11be <recuperNombreInputOutput+0x9e>
mov    $0xffffffff,%r13d
mov    %r13d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @recuperNombreInputOutput(i32 %0, i8** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
store i32 -1, i32* %8
store i32 0, i32* %7
store i32 0, i32* %9
br label %10
10: ; preds = %59, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i32, i32* %9
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br i1 %19, label %20, label %62
20: ; preds = %18
%21 = load i32, i32* %8
%22 = icmp sge i32 %21, 0
br i1 %22, label %23, label %38
23: ; preds = %20
%24 = load i8**, i8*** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 45
br i1 %32, label %33, label %36
33: ; preds = %23
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %37
36: ; preds = %23
store i32 1, i32* %9
br label %37
37: ; preds = %36, %33
br label %38
38: ; preds = %37, %20
%39 = load i8**, i8*** %5
%40 = load i32, i32* %7
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8*, i8** %39, i64 %41
%43 = load i8*, i8** %42
%44 = load i32, i32* %6
%45 = call i32 @getOptionInputOutput(i32 %44, i32 1)
%46 = call i32 @strcmp(i8* %43, i32 %45)
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %58
48: ; preds = %38
%49 = load i8**, i8*** %5
%50 = load i32, i32* %7
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %49, i64 %51
%53 = load i8*, i8** %52
%54 = load i32, i32* %6
%55 = call i32 @getOptionInputOutput(i32 %54, i32 0)
%56 = call i32 @strcmp(i8* %53, i32 %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %59, label %58
58: ; preds = %48, %38
store i32 0, i32* %8
br label %59
59: ; preds = %58, %48
%60 = load i32, i32* %7
%61 = add nsw i32 %60, 1
store i32 %61, i32* %7
br label %10
62: ; preds = %18
%63 = load i32, i32* %8
ret i32 %63
}

LLVM IR (-O2):
define i32 @recuperNombreInputOutput(i32 %0, i8** nocapture %1, i32 %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %39
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %33
%8 = phi i64 [ 0, %5 ], [ %35, %33 ]
%9 = phi i32 [ -1, %5 ], [ %34, %33 ]
%10 = icmp sgt i32 %9, -1
%11 = getelementptr inbounds i8*, i8** %1, i64 %8
%12 = load i8*, i8** %11
br i1 %10, label %13, label %20
13: ; preds = %7
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 45
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = add nuw nsw i32 %9, %17
%19 = zext i1 %15 to i32
br label %20
20: ; preds = %7, %13
%21 = phi i32 [ %18, %13 ], [ %9, %7 ]
%22 = phi i32 [ %19, %13 ], [ 0, %7 ]
%23 = tail call i32 @getOptionInputOutput(i32 %2, i32 1)
%24 = tail call i32 @strcmp(i8* %12, i32 %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %32, label %26
26: ; preds = %20
%27 = getelementptr inbounds i8*, i8** %1, i64 %8
%28 = load i8*, i8** %27
%29 = tail call i32 @getOptionInputOutput(i32 %2, i32 0)
%30 = tail call i32 @strcmp(i8* %28, i32 %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %26, %20
br label %33
33: ; preds = %32, %26
%34 = phi i32 [ %21, %26 ], [ 0, %32 ]
%35 = add nuw nsw i64 %8, 1
%36 = icmp ult i64 %35, %6
%37 = icmp eq i32 %22, 0
%38 = select i1 %36, i1 %37, i1 false
br i1 %38, label %7, label %39
39: ; preds = %33, %3
%40 = phi i32 [ -1, %3 ], [ %34, %33 ]
ret i32 %40
}