#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 *, char *);
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strupr(char *);
int /*<<< orphan*/ urutarray(char *, int /*<<< orphan*/);
int main() {
  char input[100];
  char string[100];
  char temp[100], temp2[100];
  scanf("%100s", input);
  strupr(input);
  strcpy(temp, input);
  urutarray(temp, strlen(temp));
  scanf("%100s", string);
  strupr(string);
  strcpy(temp2, input);
  urutarray(temp2, strlen(temp2));
  if (strcmp(temp, temp2) == 0)
    printf("String \"%s\" dan \"%s\" adalah sebuah anagram\n", input, string);
  else
    printf("String \"%s\" dan \"%s\" bukan sebuah anagram\n", input, string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xe73(%rip),%rdi
call   1090 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1080 <strupr@plt>
lea    -0x150(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x150(%rbp),%rax
mov    %rax,-0x1d0(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1d0(%rbp),%rdi
mov    %eax,%esi
call   1060 <urutarray@plt>
lea    -0xe0(%rbp),%rsi
lea    0xe1f(%rip),%rdi
call   1090 <scanf@plt>
lea    -0xe0(%rbp),%rdi
call   1080 <strupr@plt>
lea    -0x1c0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x1c0(%rbp),%rax
mov    %rax,-0x1c8(%rbp)
lea    -0x1c0(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c8(%rbp),%rdi
mov    %eax,%esi
call   1060 <urutarray@plt>
lea    -0x150(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1263 <main+0xf3>
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    0xdad(%rip),%rdi
call   1050 <printf@plt>
jmp    127a <main+0x10a>
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    0xdbd(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c0,%rsp
lea    0xe79(%rip),%r12
lea    0x150(%rsp),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1090 <scanf@plt>
mov    %r14,%rdi
call   1080 <strupr@plt>
lea    0x70(%rsp),%r13
mov    %r13,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   1060 <urutarray@plt>
lea    0xe0(%rsp),%r15
mov    %r12,%rdi
mov    %r15,%rsi
call   1090 <scanf@plt>
mov    %r15,%rdi
call   1080 <strupr@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <urutarray@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
lea    0xdf2(%rip),%rax
lea    0xe17(%rip),%rdi
cmove  %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%100s\00"
@.str.1 = [44 x i8] c"String \22%s\22 dan \22%s\22 adalah sebuah anagram\0A\00"
@.str.2 = [43 x i8] c"String \22%s\22 dan \22%s\22 bukan sebuah anagram\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
store i32 0, i32* %1
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @strupr(i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
%16 = call i32 @urutarray(i8* %13, i32 %15)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%20 = call i32 @strupr(i8* %19)
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%23 = call i32 @strcpy(i8* %21, i8* %22)
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%26 = call i32 @strlen(i8* %25)
%27 = call i32 @urutarray(i8* %24, i32 %26)
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%30 = call i64 @strcmp(i8* %28, i8* %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %0
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%35 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %33, i8* %34)
br label %40
36: ; preds = %0
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%39 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i8* %37, i8* %38)
br label %40
40: ; preds = %36, %32
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
@.str = [6 x i8] c"%100s\00"
@.str.1 = [44 x i8] c"String \22%s\22 dan \22%s\22 adalah sebuah anagram\0A\00"
@.str.2 = [43 x i8] c"String \22%s\22 dan \22%s\22 bukan sebuah anagram\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5)
%10 = call i32 @strupr(i8* %5)
%11 = call i32 @strcpy(i8* %7, i8* %5)
%12 = call i32 @strlen(i8* %7)
%13 = call i32 @urutarray(i8* %7, i32 %12)
%14 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%15 = call i32 @strupr(i8* %6)
%16 = call i32 @strcpy(i8* %8, i8* %5)
%17 = call i32 @strlen(i8* %8)
%18 = call i32 @urutarray(i8* %8, i32 %17)
%19 = call i64 @strcmp(i8* %7, i8* %8)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0)
%22 = call i32 @printf(i8* %21, i8* %5, i8* %6)
ret i32 0
}