#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*/ generate_loop(char, char, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  char comp;
  int i;
  comp = argv[1][0];
  generate_loop(comp, '-', 0);
  printf("\n[\n\t>\n");
  generate_loop((char)'Y', '+', 1);
  printf(". <\n]\n");
  generate_loop((char)'Y', '-', 0);
  generate_loop(comp, '+', 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    $0x2d,%esi
xor    %edx,%edx
movsbl -0x11(%rbp),%edi
call   1040 <generate_loop@plt>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x59,%edi
mov    $0x2b,%esi
mov    $0x1,%edx
call   1040 <generate_loop@plt>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x59,%edi
mov    $0x2d,%esi
xor    %edx,%edx
call   1040 <generate_loop@plt>
mov    $0x2b,%esi
xor    %edx,%edx
movsbl -0x11(%rbp),%edi
call   1040 <generate_loop@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rax
movsbl (%rax),%ebx
mov    %ebx,%edi
mov    $0x2d,%esi
xor    %edx,%edx
call   1040 <generate_loop@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x59,%edi
mov    $0x2b,%esi
mov    $0x1,%edx
call   1040 <generate_loop@plt>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x59,%edi
mov    $0x2d,%esi
xor    %edx,%edx
call   1040 <generate_loop@plt>
mov    %ebx,%edi
mov    $0x2b,%esi
xor    %edx,%edx
call   1040 <generate_loop@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\0A[\0A\09>\0A\00"
@.str.1 = [7 x i8] c". <\0A]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
store i8 %11, i8* %5
%12 = load i8, i8* %5
%13 = call i32 @generate_loop(i8 signext %12, i8 signext 45, i32 0)
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @generate_loop(i8 signext 89, i8 signext 43, i32 1)
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @generate_loop(i8 signext 89, i8 signext 45, i32 0)
%18 = load i8, i8* %5
%19 = call i32 @generate_loop(i8 signext %18, i8 signext 43, i32 0)
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"\0A[\0A\09>\00"
@str.2 = [6 x i8] c". <\0A]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = tail call i32 @generate_loop(i8 signext %5, i8 signext 45, i32 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @generate_loop(i8 signext 89, i8 signext 43, i32 1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%10 = tail call i32 @generate_loop(i8 signext 89, i8 signext 45, i32 0)
%11 = tail call i32 @generate_loop(i8 signext %5, i8 signext 43, i32 0)
ret i32 0
}