#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 *, char *);
int /*<<< orphan*/ read_line(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ str_sort(char *);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char str1[81];
  char str2[81];
  read_line(stdin, str1);
  read_line(stdin, str2);
  str_sort(str1);
  str_sort(str2);
  printf("%s\n", ((strcmp(str1, str2) == 0) ? "true" : "false"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    -0x60(%rbp),%rsi
call   1060 <read_line@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    -0xc0(%rbp),%rsi
call   1060 <read_line@plt>
lea    -0x60(%rbp),%rdi
call   1040 <str_sort@plt>
lea    -0xc0(%rbp),%rdi
call   1040 <str_sort@plt>
lea    -0x60(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1050 <strcmp@plt>
mov    %rax,%rcx
lea    0xe61(%rip),%rsi
lea    0xe55(%rip),%rax
cmp    $0x0,%rcx
cmove  %rax,%rsi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
mov    0x2e97(%rip),%rbx
mov    (%rbx),%edi
lea    0x60(%rsp),%r14
mov    %r14,%rsi
call   1060 <read_line@plt>
mov    (%rbx),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <read_line@plt>
mov    %r14,%rdi
call   1040 <str_sort@plt>
mov    %rbx,%rdi
call   1040 <str_sort@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
lea    0xe72(%rip),%rax
lea    0xe70(%rip),%rsi
cmove  %rax,%rsi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
%3 = alloca [81 x i8]
store i32 0, i32* %1
%4 = load i32, i32* @stdin
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%6 = call i32 @read_line(i32 %4, i8* %5)
%7 = load i32, i32* @stdin
%8 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%9 = call i32 @read_line(i32 %7, i8* %8)
%10 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%11 = call i32 @str_sort(i8* %10)
%12 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%13 = call i32 @str_sort(i8* %12)
%14 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%16 = call i64 @strcmp(i8* %14, i8* %15)
%17 = icmp eq i64 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = alloca [81 x i8]
%3 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @read_line(i32 %5, i8* %3)
%7 = load i32, i32* @stdin
%8 = call i32 @read_line(i32 %7, i8* %4)
%9 = call i32 @str_sort(i8* %3)
%10 = call i32 @str_sort(i8* %4)
%11 = call i64 @strcmp(i8* %3, i8* %4)
%12 = icmp eq i64 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
ret i32 0
}