#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*/ display_anagrams(char *);
int is_anagram(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (2 > argc) {
    printf("Nombre de parametres insuffisants\n");
    return 1;
  }
  char *value = argv[1];
  if (argc == 2)
    display_anagrams(value);
  int i;
  if (argc)
    if (argc > 2) {
      for (i = 2; i < argc; i++) {
        char *value2 = argv[i];
        printf("%d", is_anagram(value, value2));
      }
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%eax
cmp    -0x8(%rbp),%eax
jle    116e <main+0x3e>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1200 <main+0xd0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    118d <main+0x5d>
mov    -0x18(%rbp),%rdi
call   1050 <display_anagrams@plt>
cmpl   $0x0,-0x8(%rbp)
je     11f9 <main+0xc9>
cmpl   $0x2,-0x8(%rbp)
jle    11f4 <main+0xc4>
movl   $0x2,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ef <main+0xbf>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <is_anagram@plt>
mov    %eax,%esi
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a8 <main+0x78>
jmp    11f4 <main+0xc4>
jmp    11f9 <main+0xc9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jg     1163 <main+0x23>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebp
jmp    11b1 <main+0x71>
mov    %rsi,%r12
mov    0x8(%rsi),%r14
cmp    $0x2,%edi
jne    117b <main+0x3b>
mov    %r14,%rdi
call   1060 <display_anagrams@plt>
xor    %ebp,%ebp
jmp    11b1 <main+0x71>
mov    %edi,%r13d
mov    $0x2,%ebx
lea    0xe76(%rip),%r15
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%r12,%rbx,8),%rsi
mov    %r14,%rdi
call   1040 <is_anagram@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1190 <main+0x50>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Nombre de parametres insuffisants\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp sgt i32 2, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %49
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 2
br i1 %18, label %19, label %22
19: ; preds = %13
%20 = load i8*, i8** %6
%21 = call i32 @display_anagrams(i8* %20)
br label %22
22: ; preds = %19, %13
%23 = load i32, i32* %4
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %48
25: ; preds = %22
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 2
br i1 %27, label %28, label %47
28: ; preds = %25
store i32 2, i32* %7
br label %29
29: ; preds = %43, %28
%30 = load i32, i32* %7
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %46
33: ; preds = %29
%34 = load i8**, i8*** %5
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
store i8* %38, i8** %8
%39 = load i8*, i8** %6
%40 = load i8*, i8** %8
%41 = call i32 @is_anagram(i8* %39, i8* %40)
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %33
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
store i32 %45, i32* %7
br label %29
46: ; preds = %29
br label %47
47: ; preds = %46, %25
br label %48
48: ; preds = %47, %22
store i32 0, i32* %3
br label %49
49: ; preds = %48, %11
%50 = load i32, i32* %3
ret i32 %50
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [34 x i8] c"Nombre de parametres insuffisants\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
br label %22
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i32 %0, 2
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = zext i32 %0 to i64
br label %14
12: ; preds = %6
%13 = tail call i32 @display_anagrams(i8* %8)
br label %22
14: ; preds = %10, %14
%15 = phi i64 [ 2, %10 ], [ %20, %14 ]
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = tail call i32 @is_anagram(i8* %8, i8* %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %15, 1
%21 = icmp eq i64 %20, %11
br i1 %21, label %22, label %14
22: ; preds = %14, %12, %4
%23 = phi i32 [ 1, %4 ], [ 0, %12 ], [ 0, %14 ]
ret i32 %23
}