#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 */
scalar_t__ checkContent(char);
char matchingRevrse(char c) {
  if (checkContent(c))
    return 'e';
  if (c == '}')
    return '{';
  if (c == ']')
    return '[';
  if (c == ')')
    return '(';
  else {
    return 'e';
  }
}


x86 assembly (clang, -O0):
<matchingRevrse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <checkContent@plt>
cmp    $0x0,%rax
je     113a <matchingRevrse+0x2a>
movb   $0x65,-0x1(%rbp)
jmp    1180 <matchingRevrse+0x70>
movsbl -0x2(%rbp),%eax
cmp    $0x7d,%eax
jne    1150 <matchingRevrse+0x40>
movb   $0x7b,-0x1(%rbp)
jmp    1180 <matchingRevrse+0x70>
movsbl -0x2(%rbp),%eax
cmp    $0x5d,%eax
jne    1166 <matchingRevrse+0x56>
movb   $0x5b,-0x1(%rbp)
jmp    1180 <matchingRevrse+0x70>
movsbl -0x2(%rbp),%eax
cmp    $0x29,%eax
jne    117c <matchingRevrse+0x6c>
movb   $0x28,-0x1(%rbp)
jmp    1180 <matchingRevrse+0x70>
movb   $0x65,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matchingRevrse>:
push   %rbx
mov    %edi,%ebx
call   1030 <checkContent@plt>
mov    %rax,%rcx
mov    $0x65,%al
test   %rcx,%rcx
je     1124 <matchingRevrse+0x14>
pop    %rbx
ret
cmp    $0x29,%bl
je     1137 <matchingRevrse+0x27>
cmp    $0x7d,%bl
je     113b <matchingRevrse+0x2b>
cmp    $0x5d,%bl
jne    1122 <matchingRevrse+0x12>
mov    $0x5b,%al
pop    %rbx
ret
mov    $0x28,%al
pop    %rbx
ret
mov    $0x7b,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @matchingRevrse(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @checkContent(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 101, i8* %2
br label %24
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 125
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 123, i8* %2
br label %24
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 93
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 91, i8* %2
br label %24
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 41
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 40, i8* %2
br label %24
23: ; preds = %18
store i8 101, i8* %2
br label %24
24: ; preds = %23, %22, %17, %12, %7
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define signext i8 @matchingRevrse(i8 signext %0) {
%2 = tail call i64 @checkContent(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
switch i8 %0, label %7 [
i8 125, label %8
i8 93, label %5
i8 41, label %6
]
5: ; preds = %4
br label %8
6: ; preds = %4
br label %8
7: ; preds = %4
br label %8
8: ; preds = %4, %1, %7, %6, %5
%9 = phi i8 [ 91, %5 ], [ 40, %6 ], [ 101, %7 ], [ 101, %1 ], [ 123, %4 ]
ret i8 %9
}