#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*/ assert(int);
int isAnagram(char *, char *);
int main() {
  char str1[] = "This is a test string";
  char str2[] = "string test a is This";
  char str3[] = "Not an anagram";
  assert(isAnagram(str1, str2) == 1);
  assert(isAnagram(str1, str3) == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xebf(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x2c(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x4f(%rbp)
mov    0xeaa(%rip),%eax
mov    %eax,-0x47(%rbp)
mov    0xea4(%rip),%ax
mov    %ax,-0x43(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0x41(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <isAnagram@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x20(%rbp),%rdi
lea    -0x4f(%rbp),%rsi
call   1030 <isAnagram@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x676e6972747320,%rax
mov    %rax,0x3e(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x73696854207369,%rax
mov    %rax,0x1e(%rsp)
movabs $0x6d617267616e61,%rax
mov    %rax,0x7(%rsp)
movabs $0x61206e6120746f4e,%rax
6e 20 61
mov    %rax,(%rsp)
lea    0x30(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <isAnagram@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <isAnagram@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str1 = [22 x i8] c"This is a test string\00"
@__const.main.str2 = [22 x i8] c"string test a is This\00"
@__const.main.str3 = [15 x i8] c"Not an anagram\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i8]
%3 = alloca [22 x i8]
%4 = alloca [15 x i8]
store i32 0, i32* %1
%5 = bitcast [22 x i8]* %2 to i8*
%6 = bitcast [22 x i8]* %3 to i8*
%7 = bitcast [15 x i8]* %4 to i8*
%8 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [22 x i8], [22 x i8]* %3, i64 0, i64 0
%10 = call i32 @isAnagram(i8* %8, i8* %9)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%16 = call i32 @isAnagram(i8* %14, i8* %15)
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str1 = [22 x i8] c"This is a test string\00"
@__const.main.str2 = [22 x i8] c"string test a is This\00"
@__const.main.str3 = [15 x i8] c"Not an anagram\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = alloca [22 x i8]
%3 = alloca [15 x i8]
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%7 = call i32 @isAnagram(i8* %4, i8* %5)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @isAnagram(i8* %4, i8* %6)
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}