#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int wordIsEqual(char *, char *);
int wordIhm() {
  char premierMot[50], deuxiemeMot[50];
  printf("Entrer votre premier mot \n");
  scanf("%s", premierMot);
  printf("\nEntrer votre deuxième mot \n");
  scanf("%s", deuxiemeMot);
  if (wordIsEqual(premierMot, deuxiemeMot) == 1)
    printf("\nLes deux mots sont équivalents\n");
  else
    printf("\nLes deux mots ne correspondent pas\n");
  return 0;
}


x86 assembly (clang, -O0):
<wordIhm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    -0x80(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1040 <wordIsEqual@plt>
cmp    $0x1,%eax
jne    119a <wordIhm+0x6a>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <wordIhm+0x76>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordIhm>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb1(%rip),%r15
lea    0x40(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <wordIsEqual@plt>
cmp    $0x1,%eax
lea    0xed0(%rip),%rax
lea    0xea5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Entrer votre premier mot \0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [30 x i8] c"\0AEntrer votre deuxi\C3\A8me mot \0A\00"
@.str.3 = [34 x i8] c"\0ALes deux mots sont \C3\A9quivalents\0A\00"
@.str.4 = [37 x i8] c"\0ALes deux mots ne correspondent pas\0A\00"
define i32 @wordIhm() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%11 = call i32 @wordIsEqual(i8* %9, i8* %10)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@str = [26 x i8] c"Entrer votre premier mot \00"
@str.5 = [29 x i8] c"\0AEntrer votre deuxi\C3\A8me mot \00"
@str.6 = [36 x i8] c"\0ALes deux mots ne correspondent pas\00"
@str.7 = [33 x i8] c"\0ALes deux mots sont \C3\A9quivalents\00"
define i32 @wordIhm() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.5, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = call i32 @wordIsEqual(i8* %3, i8* %4)
%10 = icmp eq i32 %9, 1
%11 = select i1 %10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @str.6, i64 0, i64 0)
%12 = call i32 @puts(i8* dereferenceable(1) %11)
ret i32 0
}