#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*/ time_t;

/* Variables and functions */
int check_anagram(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  if (argc < 3)
    return 1;
  char *a = argv[1];
  char *b = argv[2];
  int flag;
  time_t t;
  srand((unsigned)time(&t));
  flag = check_anagram(a, b);
  if (flag == 1)
    printf("\"%s\" and \"%s\" are anagrams.\n", a, b);
  else
    printf("\"%s\" and \"%s\" are not anagrams.\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    116c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    11e2 <main+0xa2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
lea    -0x28(%rbp),%rdi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <check_anagram@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    11c7 <main+0x87>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
jmp    11db <main+0x9b>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x3,%edi
jl     119b <main+0x5b>
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r14
lea    0x4(%rsp),%rdi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <check_anagram@plt>
cmp    $0x1,%eax
lea    0xe84(%rip),%rax
lea    0xe9a(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\22%s\22 and \22%s\22 are anagrams.\0A\00"
@.str.1 = [33 x i8] c"\22%s\22 and \22%s\22 are not anagrams.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %37
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
store i8* %19, i8** %7
%20 = call i64 @time(i32* %9)
%21 = trunc i64 %20 to i32
%22 = call i32 @srand(i32 %21)
%23 = load i8*, i8** %6
%24 = load i8*, i8** %7
%25 = call i32 @check_anagram(i8* %23, i8* %24)
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %32
28: ; preds = %13
%29 = load i8*, i8** %6
%30 = load i8*, i8** %7
%31 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %29, i8* %30)
br label %36
32: ; preds = %13
%33 = load i8*, i8** %6
%34 = load i8*, i8** %7
%35 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %33, i8* %34)
br label %36
36: ; preds = %32, %28
store i32 0, i32* %3
br label %37
37: ; preds = %36, %12
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
@.str = [29 x i8] c"\22%s\22 and \22%s\22 are anagrams.\0A\00"
@.str.1 = [33 x i8] c"\22%s\22 and \22%s\22 are not anagrams.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = icmp slt i32 %0, 3
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = bitcast i32* %3 to i8*
%11 = call i64 @time(i32* %3)
%12 = trunc i64 %11 to i32
%13 = call i32 @srand(i32 %12)
%14 = call i32 @check_anagram(i8* %7, i8* %9)
%15 = icmp eq i32 %14, 1
%16 = select i1 %15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0)
%17 = call i32 @printf(i8* %16, i8* %7, i8* %9)
br label %18
18: ; preds = %2, %5
%19 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %19
}