#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 */
bool isIsomorphic(char *s, char *t) {
  char ss[128] = {0}, tt[128] = {0};
  while (*s) {
    char a = *s++, b = *t++;
    if (ss[a] == 0 && tt[b] == 0) {
      ss[a] = b;
      tt[b] = a;
      continue;
    }
    if (ss[a] != b || tt[b] != a)
      return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<isIsomorphic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1234 <isIsomorphic+0x124>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x121(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x122(%rbp)
movsbq -0x121(%rbp),%rax
ff
movsbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    11e5 <isIsomorphic+0xd5>
movsbq -0x122(%rbp),%rax
ff
movsbl -0x120(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    11e5 <isIsomorphic+0xd5>
mov    -0x122(%rbp),%cl
movsbq -0x121(%rbp),%rax
ff
mov    %cl,-0xa0(%rbp,%rax,1)
mov    -0x121(%rbp),%cl
movsbq -0x122(%rbp),%rax
ff
mov    %cl,-0x120(%rbp,%rax,1)
jmp    1149 <isIsomorphic+0x39>
movsbq -0x121(%rbp),%rax
ff
movsbl -0xa0(%rbp,%rax,1),%eax
ff
movsbl -0x122(%rbp),%ecx
cmp    %ecx,%eax
jne    1223 <isIsomorphic+0x113>
movsbq -0x122(%rbp),%rax
ff
movsbl -0x120(%rbp,%rax,1),%eax
ff
movsbl -0x121(%rbp),%ecx
cmp    %ecx,%eax
je     122f <isIsomorphic+0x11f>
movl   $0x0,-0x4(%rbp)
jmp    123b <isIsomorphic+0x12b>
jmp    1149 <isIsomorphic+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isIsomorphic>:
sub    $0x88,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,-0x10(%rsp)
movaps %xmm0,-0x20(%rsp)
movaps %xmm0,-0x30(%rsp)
movaps %xmm0,-0x40(%rsp)
movaps %xmm0,-0x50(%rsp)
movaps %xmm0,-0x60(%rsp)
movaps %xmm0,-0x70(%rsp)
movaps %xmm0,-0x80(%rsp)
mov    (%rdi),%dl
test   %dl,%dl
je     11b2 <isIsomorphic+0xb2>
xor    %ecx,%ecx
jmp    117d <isIsomorphic+0x7d>
mov    %r9b,(%rsp,%rax,1)
mov    %dl,-0x80(%rsp,%r8,1)
nopl   0x0(%rax)
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
je     11b2 <isIsomorphic+0xb2>
movzbl (%rsi,%rcx,1),%r9d
movsbq %r9b,%r8
movsbq %dl,%rax
movzbl (%rsp,%rax,1),%r10d
test   %r10b,%r10b
jne    119c <isIsomorphic+0x9c>
cmpb   $0x0,-0x80(%rsp,%r8,1)
je     1163 <isIsomorphic+0x63>
xor    %eax,%eax
cmp    %r9b,%r10b
jne    11aa <isIsomorphic+0xaa>
cmp    %dl,-0x80(%rsp,%r8,1)
je     1170 <isIsomorphic+0x70>
add    $0x88,%rsp
ret
mov    $0x1,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
define i32 @isIsomorphic(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [128 x i8]
%7 = alloca [128 x i8]
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
%10 = bitcast [128 x i8]* %6 to i8*
%11 = bitcast [128 x i8]* %7 to i8*
br label %12
12: ; preds = %64, %36, %2
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = icmp ne i8 %14, 0
br i1 %15, label %16, label %65
16: ; preds = %12
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8, i8* %17
store i8 %19, i8* %8
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %5
%22 = load i8, i8* %20
store i8 %22, i8* %9
%23 = load i8, i8* %8
%24 = sext i8 %23 to i64
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %45
29: ; preds = %16
%30 = load i8, i8* %9
%31 = sext i8 %30 to i64
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %45
36: ; preds = %29
%37 = load i8, i8* %9
%38 = load i8, i8* %8
%39 = sext i8 %38 to i64
%40 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 %39
store i8 %37, i8* %40
%41 = load i8, i8* %8
%42 = load i8, i8* %9
%43 = sext i8 %42 to i64
%44 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 %43
store i8 %41, i8* %44
br label %12
45: ; preds = %29, %16
%46 = load i8, i8* %8
%47 = sext i8 %46 to i64
%48 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = load i8, i8* %9
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %50, %52
br i1 %53, label %63, label %54
54: ; preds = %45
%55 = load i8, i8* %9
%56 = sext i8 %55 to i64
%57 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = load i8, i8* %8
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %59, %61
br i1 %62, label %63, label %64
63: ; preds = %54, %45
store i32 0, i32* %3
br label %66
64: ; preds = %54
br label %12
65: ; preds = %12
store i32 1, i32* %3
br label %66
66: ; preds = %65, %63
%67 = load i32, i32* %3
ret i32 %67
}

LLVM IR (-O2):
define i32 @isIsomorphic(i8* nocapture %0, i8* nocapture %1) {
%3 = alloca [128 x i8]
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %36, label %9
9: ; preds = %2, %33
%10 = phi i8 [ %34, %33 ], [ %7, %2 ]
%11 = phi i8* [ %13, %33 ], [ %0, %2 ]
%12 = phi i8* [ %14, %33 ], [ %1, %2 ]
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = getelementptr inbounds i8, i8* %12, i64 1
%15 = load i8, i8* %12
%16 = sext i8 %10 to i64
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %26
20: ; preds = %9
%21 = sext i8 %15 to i64
%22 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %20
store i8 %15, i8* %17
store i8 %10, i8* %22
br label %33
26: ; preds = %20, %9
%27 = icmp eq i8 %18, %15
br i1 %27, label %28, label %36
28: ; preds = %26
%29 = sext i8 %15 to i64
%30 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, %10
br i1 %32, label %33, label %36
33: ; preds = %28, %25
%34 = load i8, i8* %13
%35 = icmp eq i8 %34, 0
br i1 %35, label %36, label %9
36: ; preds = %33, %26, %28, %2
%37 = phi i32 [ 1, %2 ], [ 0, %28 ], [ 0, %26 ], [ 1, %33 ]
ret i32 %37
}