removeWord(char *dic[]) {
  printf("Entrez un mot\n\n");
  char new_word[50] = "";
  char *p_new_word = &new_word;
  int found = 0;
  scanf("%s", p_new_word);
  for (int i = 0; i < 99; i++) {
    if (strcmp(dic[i], p_new_word) == 0) {
      dic[i] = "!empty!";
      printf("Suppression de %s \n", p_new_word);
      found = 1;
      break;
    }
  }
  if (found == 0) {
    printf("%s n'est pas dans la liste");
  }
  return 0;
}


x86 assembly (clang, -O0):
<removeWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x48(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x50(%rbp)
cmpl   $0x63,-0x50(%rbp)
jge    11fe <removeWord+0xbe>
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x48(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11eb <removeWord+0xab>
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
lea    0xe4a(%rip),%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0x48(%rbp),%rsi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4c(%rbp)
jmp    11fe <removeWord+0xbe>
jmp    11f0 <removeWord+0xb0>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1192 <removeWord+0x52>
cmpl   $0x0,-0x4c(%rbp)
jne    1216 <removeWord+0xd6>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeWord>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%r15
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
lea    0xe89(%rip),%rdi
xor    %ebx,%ebx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11ba <removeWord+0x7a>
add    $0x1,%rbx
cmp    $0x63,%rbx
jne    1190 <removeWord+0x50>
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11d6 <removeWord+0x96>
lea    0xe42(%rip),%rax
mov    %rax,(%r15,%rbx,8)
lea    0xe3f(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Entrez un mot\0A\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [8 x i8] c"!empty!\00"
@.str.3 = [20 x i8] c"Suppression de %s \0A\00"
@.str.4 = [27 x i8] c"%s n'est pas dans la liste\00"
define i32 @removeWord(i8** %0) {
%2 = alloca i8**
%3 = alloca [50 x i8]
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = bitcast [50 x i8]* %3 to i8*
%9 = bitcast [50 x i8]* %3 to i8*
store i8* %9, i8** %4
store i32 0, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
store i32 0, i32* %6
br label %12
12: ; preds = %32, %1
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 99
br i1 %14, label %15, label %35
15: ; preds = %12
%16 = load i8**, i8*** %2
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = load i8*, i8** %4
%22 = call i32 @strcmp(i8* %20, i8* %21)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %15
%25 = load i8**, i8*** %2
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %28
%29 = load i8*, i8** %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* %29)
store i32 1, i32* %5
br label %35
31: ; preds = %15
br label %32
32: ; preds = %31
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %12
35: ; preds = %24, %12
%36 = load i32, i32* %5
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [8 x i8] c"!empty!\00"
@.str.3 = [20 x i8] c"Suppression de %s \0A\00"
@.str.4 = [27 x i8] c"%s n'est pas dans la liste\00"
@str = [15 x i8] c"Entrez un mot\0A\00"
define i32 @removeWord(i8** nocapture %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
br label %6
6: ; preds = %1, %16
%7 = phi i64 [ 0, %1 ], [ %17, %16 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = call i32 @strcmp(i8* dereferenceable(1) %9, i8* %3)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %6
%13 = and i64 %7, 4294967295
%14 = getelementptr inbounds i8*, i8** %0, i64 %13
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %14
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* %3)
br label %21
16: ; preds = %6
%17 = add nuw nsw i64 %7, 1
%18 = icmp eq i64 %17, 99
br i1 %18, label %19, label %6
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %21
21: ; preds = %12, %19
ret i32 0
}