#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 */
scalar_t__ compare_words(int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_word(int *);
int main(void) {
  int w1[26] = {0};
  int w2[26] = {0};
  read_word(w1);
  read_word(w2);
  if (compare_words(w1, w2)) {
    printf("The words are anagrams\n");
  } else {
    printf("The words are not anagrams\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1040 <memset@plt>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1040 <memset@plt>
lea    -0x70(%rbp),%rdi
call   1050 <read_word@plt>
lea    -0xe0(%rbp),%rdi
call   1050 <read_word@plt>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1060 <compare_words@plt>
cmp    $0x0,%rax
je     11b5 <main+0x75>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    11c1 <main+0x81>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movq   $0x0,0xd0(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x60(%rsp)
lea    0x70(%rsp),%r14
mov    %r14,%rdi
call   1040 <read_word@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <read_word@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <compare_words@plt>
test   %rax,%rax
lea    0xe37(%rip),%rax
lea    0xe4b(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"The words are anagrams\0A\00"
@.str.1 = [28 x i8] c"The words are not anagrams\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [26 x i32]
%3 = alloca [26 x i32]
store i32 0, i32* %1
%4 = bitcast [26 x i32]* %2 to i8*
%5 = bitcast [26 x i32]* %3 to i8*
%6 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%7 = call i32 @read_word(i32* %6)
%8 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 0
%9 = call i32 @read_word(i32* %8)
%10 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%11 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 0
%12 = call i64 @compare_words(i32* %10, i32* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %18
16: ; preds = %0
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"The words are not anagrams\00"
@str.2 = [23 x i8] c"The words are anagrams\00"
define i32 @main() {
%1 = alloca [26 x i32]
%2 = alloca [26 x i32]
%3 = bitcast [26 x i32]* %1 to i8*
%4 = bitcast [26 x i32]* %2 to i8*
%5 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 0
%6 = call i32 @read_word(i32* %5)
%7 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%8 = call i32 @read_word(i32* %7)
%9 = call i64 @compare_words(i32* %5, i32* %7)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.2, i64 0, i64 0)
%12 = call i32 @puts(i8* dereferenceable(1) %11)
ret i32 0
}