#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*/ isspace(char const);
int /*<<< orphan*/ strchr(char const *, char const);
int mpl_compare_symbol_lists(const char *sym1, const char *sym2) {
  int i = 0;
  for (i = 0; sym1[i]; ++i) {
    if (!strchr(sym2, sym1[i])) {
      if (!isspace(sym1[i])) {
        return 1;
      }
    }
  }
  for (i = 0; sym2[i]; ++i) {
    if (!strchr(sym1, sym2[i])) {
      if (!isspace(sym2[i])) {
        return 1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<mpl_compare_symbol_lists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     11ac <mpl_compare_symbol_lists+0x8c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
jne    1199 <mpl_compare_symbol_lists+0x79>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
jne    1194 <mpl_compare_symbol_lists+0x74>
movl   $0x1,-0x4(%rbp)
jmp    1228 <mpl_compare_symbol_lists+0x108>
jmp    1199 <mpl_compare_symbol_lists+0x79>
jmp    119e <mpl_compare_symbol_lists+0x7e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113e <mpl_compare_symbol_lists+0x1e>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1221 <mpl_compare_symbol_lists+0x101>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
jne    120e <mpl_compare_symbol_lists+0xee>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
jne    1209 <mpl_compare_symbol_lists+0xe9>
movl   $0x1,-0x4(%rbp)
jmp    1228 <mpl_compare_symbol_lists+0x108>
jmp    120e <mpl_compare_symbol_lists+0xee>
jmp    1213 <mpl_compare_symbol_lists+0xf3>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b3 <mpl_compare_symbol_lists+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpl_compare_symbol_lists>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     116a <mpl_compare_symbol_lists+0x4a>
lea    0x1(%r14),%rbp
jmp    114c <mpl_compare_symbol_lists+0x2c>
cs nopw 0x0(%rax,%rax,1)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
je     116a <mpl_compare_symbol_lists+0x4a>
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <strchr@plt>
test   %eax,%eax
jne    1140 <mpl_compare_symbol_lists+0x20>
movsbl -0x1(%rbp),%edi
call   1040 <isspace@plt>
test   %eax,%eax
jne    1140 <mpl_compare_symbol_lists+0x20>
jmp    11a7 <mpl_compare_symbol_lists+0x87>
mov    (%rbx),%al
xor    %ebp,%ebp
test   %al,%al
je     11ac <mpl_compare_symbol_lists+0x8c>
add    $0x1,%rbx
jmp    118b <mpl_compare_symbol_lists+0x6b>
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     11ac <mpl_compare_symbol_lists+0x8c>
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %eax,%eax
jne    1180 <mpl_compare_symbol_lists+0x60>
movsbl -0x1(%rbx),%edi
call   1040 <isspace@plt>
test   %eax,%eax
jne    1180 <mpl_compare_symbol_lists+0x60>
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mpl_compare_symbol_lists(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %18, %2
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, 0
br i1 %7, label %38, label %23
8: ; preds = %2, %18
%9 = phi i64 [ %19, %18 ], [ 0, %2 ]
%10 = phi i8 [ %21, %18 ], [ %3, %2 ]
%11 = phi i8* [ %20, %18 ], [ %0, %2 ]
%12 = tail call i32 @strchr(i8* %1, i8 signext %10)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i8, i8* %11
%16 = tail call i32 @isspace(i8 signext %15)
%17 = icmp eq i32 %16, 0
br i1 %17, label %38, label %18
18: ; preds = %8, %14
%19 = add nuw i64 %9, 1
%20 = getelementptr inbounds i8, i8* %0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %5, label %8
23: ; preds = %5, %33
%24 = phi i64 [ %34, %33 ], [ 0, %5 ]
%25 = phi i8 [ %36, %33 ], [ %6, %5 ]
%26 = phi i8* [ %35, %33 ], [ %1, %5 ]
%27 = tail call i32 @strchr(i8* %0, i8 signext %25)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %23
%30 = load i8, i8* %26
%31 = tail call i32 @isspace(i8 signext %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %38, label %33
33: ; preds = %23, %29
%34 = add nuw i64 %24, 1
%35 = getelementptr inbounds i8, i8* %1, i64 %34
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 0
br i1 %37, label %38, label %23
38: ; preds = %14, %29, %33, %5
%39 = phi i32 [ 0, %5 ], [ 1, %29 ], [ 0, %33 ], [ 1, %14 ]
ret i32 %39
}