#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 */
typedef int /*<<< orphan*/ word2;
typedef int /*<<< orphan*/ word1;

/* Variables and functions */
scalar_t__ are_anagrams(char *, char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char word1[80];
  char word2[80];
  printf("Enter the first word: ");
  fgets(word1, sizeof(word1), stdin);
  printf("Enter the second word: ");
  fgets(word2, sizeof(word2), stdin);
  if (are_anagrams(word1, word2)) {
    printf("Anagrams!\n");
  } else {
    printf("Not Anagrams!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1040 <fgets@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    -0xb0(%rbp),%rdi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1040 <fgets@plt>
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1050 <are_anagrams@plt>
cmp    $0x0,%rax
je     11b6 <main+0x86>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0x92>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8b(%rip),%rbx
mov    (%rbx),%edx
lea    0x50(%rsp),%r14
mov    %r14,%rdi
mov    $0x50,%esi
call   1050 <fgets@plt>
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    (%rbx),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1050 <fgets@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <are_anagrams@plt>
test   %rax,%rax
lea    0xe8b(%rip),%rax
lea    0xe88(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Enter the first word: \00"
@stdin = global i32 0
@.str.1 = [24 x i8] c"Enter the second word: \00"
@.str.2 = [11 x i8] c"Anagrams!\0A\00"
@.str.3 = [15 x i8] c"Not Anagrams!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 80, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 80, i32 %10)
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%14 = call i64 @are_anagrams(i8* %12, i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %20
18: ; preds = %0
%19 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Enter the first word: \00"
@stdin = global i32 0
@.str.1 = [24 x i8] c"Enter the second word: \00"
@str = [14 x i8] c"Not Anagrams!\00"
@str.4 = [10 x i8] c"Anagrams!\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %3, i32 80, i32 %6)
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %4, i32 80, i32 %9)
%11 = call i64 @are_anagrams(i8* %3, i8* %4)
%12 = icmp eq i64 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0)
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}