#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 check_paren(char *);
int /*<<< orphan*/ exit(int);
char *lexer(int, char **);
int /*<<< orphan*/ printf(char *, char *);
char *solve(char *);
int main(int argc, char *argv[]) {
  int check;
  char *answer;
  char *buffer = lexer(argc, argv);
  check = check_paren(buffer);
  if (check == 0) {
    printf("Error In Paren:%s\n", buffer);
    exit(1);
  }
  answer = solve(buffer);
  printf("%s=", buffer);
  printf("%s\n", answer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <lexer@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <check_paren@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    119f <main+0x4f>
mov    -0x28(%rbp),%rsi
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x28(%rbp),%rdi
call   1030 <solve@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe48(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
call   1050 <lexer@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <check_paren@plt>
test   %eax,%eax
je     119b <main+0x4b>
mov    %rbx,%rdi
call   1030 <solve@plt>
mov    %rax,%r14
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xe86(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe5e(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Error In Paren:%s\0A\00"
@.str.1 = [4 x i8] c"%s=\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = call i8* @lexer(i32 %8, i8** %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = call i32 @check_paren(i8* %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i8*, i8** %7
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = load i8*, i8** %7
%21 = call i8* @solve(i8* %20)
store i8* %21, i8** %6
%22 = load i8*, i8** %7
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = load i8*, i8** %6
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Error In Paren:%s\0A\00"
@.str.1 = [4 x i8] c"%s=\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8* @lexer(i32 %0, i8** %1)
%4 = tail call i32 @check_paren(i8* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = tail call i8* @solve(i8* %3)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %10)
ret i32 0
}