#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*/ erreur(int, int);
int /*<<< orphan*/ getOptionInputOutput(int, int);
int /*<<< orphan*/ strcmp(char *, int /*<<< orphan*/);
char *strdup(char *);
void remplirTableauInputOutput(int argc, char **argv, char **char_input,
                               int taille, int bool_input) {
  int i;
  int bool_trouve;
  int k;
  i = 0;
  bool_trouve = 0;
  for (i = 0; i < argc; i += 1) {
    if (!strcmp(argv[i], getOptionInputOutput(bool_input, 1)) ||
        !strcmp(argv[i], getOptionInputOutput(bool_input, 0))) {
      if (bool_trouve)
        erreur(32, 1);
      for (k = 0; k < taille; k += 1) {
        char_input[k] = strdup(argv[i + k + 1]);
      }
      bool_trouve = 1;
    }
  }
}


x86 assembly (clang, -O0):
<remplirTableauInputOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1256 <remplirTableauInputOutput+0x116>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%edi
mov    $0x1,%esi
call   1050 <getOptionInputOutput@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     11da <remplirTableauInputOutput+0x9a>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%edi
xor    %esi,%esi
call   1050 <getOptionInputOutput@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1243 <remplirTableauInputOutput+0x103>
cmpl   $0x0,-0x28(%rbp)
je     11f3 <remplirTableauInputOutput+0xb3>
mov    $0x20,%edi
mov    $0x1,%esi
call   1040 <erreur@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    123c <remplirTableauInputOutput+0xfc>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <strdup@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11fa <remplirTableauInputOutput+0xba>
movl   $0x1,-0x28(%rbp)
jmp    1248 <remplirTableauInputOutput+0x108>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    116f <remplirTableauInputOutput+0x2f>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remplirTableauInputOutput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,(%rsp)
test   %edi,%edi
jle    121d <remplirTableauInputOutput+0xdd>
mov    %r8d,%r12d
mov    %rdx,%rbp
mov    %edi,%eax
mov    %rax,0x10(%rsp)
mov    (%rsp),%r14d
lea    0x8(%rsi),%r13
xor    %r15d,%r15d
movl   $0x0,0x4(%rsp)
mov    %rsi,0x8(%rsp)
jmp    1198 <remplirTableauInputOutput+0x58>
mov    0x8(%rsp),%rsi
add    $0x1,%r15
add    $0x8,%r13
cmp    0x10(%rsp),%r15
je     121d <remplirTableauInputOutput+0xdd>
mov    (%rsi,%r15,8),%rbx
mov    %r12d,%edi
mov    $0x1,%esi
call   1050 <getOptionInputOutput@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11d8 <remplirTableauInputOutput+0x98>
mov    0x8(%rsp),%rax
mov    (%rax,%r15,8),%rbx
mov    %r12d,%edi
xor    %esi,%esi
call   1050 <getOptionInputOutput@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    1180 <remplirTableauInputOutput+0x40>
cmpl   $0x0,0x4(%rsp)
je     11ee <remplirTableauInputOutput+0xae>
mov    $0x20,%edi
mov    $0x1,%esi
call   1040 <erreur@plt>
movl   $0x1,0x4(%rsp)
cmpl   $0x0,(%rsp)
jle    1180 <remplirTableauInputOutput+0x40>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    0x0(%r13,%rbx,8),%rdi
call   1060 <strdup@plt>
mov    %rax,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1200 <remplirTableauInputOutput+0xc0>
jmp    1180 <remplirTableauInputOutput+0x40>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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