#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*/ memset(unsigned char *, int, int);
unsigned char pop(unsigned char *, int *);
int /*<<< orphan*/ push(int, unsigned char *, int *);
unsigned int strlen(char const *const);
scalar_t__ strncmp(char const *const, char *, int);
void postfixConversion(unsigned char output[256], const char *const filter) {
  unsigned char stack[100];
  int stackPosition = -1;
  unsigned int index = 0;
  unsigned char pos = 0;
  unsigned char tokenIndex = 0;
  unsigned char value = 0;
  memset(output, 0xff, 256);
  while (index < strlen(filter)) {
    if (filter[index] == '"') {
      ++index;
      while (filter[index] != '"' && filter[index] != 0) {
        ++index;
      }
      ++index;
    } else if (strncmp(filter + index, "&&", 2) == 0) {
      push(0xfc, stack, &stackPosition);
      ++index;
    } else if (strncmp(filter + index, "||", 2) == 0) {
      push(0xfd, stack, &stackPosition);
      ++index;
    } else if (strncmp(filter + index, "==", 2) == 0) {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
      ++index;
    } else if (strncmp(filter + index, "!=", 2) == 0) {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
      ++index;
    } else if (strncmp(filter + index, "<=", 2) == 0) {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
      ++index;
    } else if (strncmp(filter + index, ">=", 2) == 0) {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
      ++index;
    } else if (strncmp(filter + index, "=~", 2) == 0) {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
      ++index;
    } else if (filter[index] == '<') {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
    } else if (filter[index] == '>') {
      output[pos] = tokenIndex;
      ++pos;
      ++tokenIndex;
    } else if (filter[index] == '!') {
      push(0xfe, stack, &stackPosition);
    } else if (filter[index] == '(') {
      push(0xfb, stack, &stackPosition);
    } else if (filter[index] == ')') {
      value = pop(stack, &stackPosition);
      while (value != 0xfb && value != 0xff) {
        output[pos] = value;
        ++pos;
        value = pop(stack, &stackPosition);
      }
    }
    ++index;
  }
  value = pop(stack, &stackPosition);
  while (value != 0xfb && value != 0xff) {
    output[pos] = value;
    ++pos;
    value = pop(stack, &stackPosition);
  }
}


x86 assembly (clang, -O0):
<postfixConversion>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x84(%rbp)
ff ff ff
movl   $0x0,-0x88(%rbp)
movb   $0x0,-0x89(%rbp)
movb   $0x0,-0x8a(%rbp)
movb   $0x0,-0x8b(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xff,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
mov    -0x88(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
cmp    %ecx,%eax
jae    1718 <postfixConversion+0x5c8>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    125e <postfixConversion+0x10e>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x91(%rbp)
je     1223 <postfixConversion+0xd3>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    1236 <postfixConversion+0xe6>
jmp    124a <postfixConversion+0xfa>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    11ea <postfixConversion+0x9a>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1704 <postfixConversion+0x5b4>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xd8e(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12af <postfixConversion+0x15f>
lea    -0x80(%rbp),%rsi
mov    $0xfc,%edi
lea    -0x84(%rbp),%rdx
call   1070 <push@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16ff <postfixConversion+0x5af>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xd40(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1300 <postfixConversion+0x1b0>
lea    -0x80(%rbp),%rsi
mov    $0xfd,%edi
lea    -0x84(%rbp),%rdx
call   1070 <push@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16fa <postfixConversion+0x5aa>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xcf2(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    136c <postfixConversion+0x21c>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16f5 <postfixConversion+0x5a5>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xc89(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13d8 <postfixConversion+0x288>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16f0 <postfixConversion+0x5a0>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xc20(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1444 <postfixConversion+0x2f4>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16eb <postfixConversion+0x59b>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xbb7(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14b0 <postfixConversion+0x360>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16e6 <postfixConversion+0x596>
mov    -0x10(%rbp),%rdi
mov    -0x88(%rbp),%eax
add    %rax,%rdi
lea    0xb4e(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    151c <postfixConversion+0x3cc>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    16e1 <postfixConversion+0x591>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3c,%eax
jne    1568 <postfixConversion+0x418>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
jmp    16dc <postfixConversion+0x58c>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3e,%eax
jne    15b4 <postfixConversion+0x464>
mov    -0x8a(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
mov    -0x8a(%rbp),%al
add    $0x1,%al
mov    %al,-0x8a(%rbp)
jmp    16d7 <postfixConversion+0x587>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x21,%eax
jne    15e5 <postfixConversion+0x495>
lea    -0x80(%rbp),%rsi
mov    $0xfe,%edi
lea    -0x84(%rbp),%rdx
call   1070 <push@plt>
jmp    16d2 <postfixConversion+0x582>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x28,%eax
jne    1616 <postfixConversion+0x4c6>
lea    -0x80(%rbp),%rsi
mov    $0xfb,%edi
lea    -0x84(%rbp),%rdx
call   1070 <push@plt>
jmp    16cd <postfixConversion+0x57d>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x29,%eax
jne    16c8 <postfixConversion+0x578>
lea    -0x80(%rbp),%rdi
lea    -0x84(%rbp),%rsi
call   1060 <pop@plt>
mov    %al,-0x8b(%rbp)
movzbl -0x8b(%rbp),%ecx
xor    %eax,%eax
cmp    $0xfb,%ecx
mov    %al,-0x92(%rbp)
je     1673 <postfixConversion+0x523>
movzbl -0x8b(%rbp),%eax
cmp    $0xff,%eax
setne  %al
mov    %al,-0x92(%rbp)
mov    -0x92(%rbp),%al
test   $0x1,%al
jne    1686 <postfixConversion+0x536>
jmp    16c3 <postfixConversion+0x573>
mov    -0x8b(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x84(%rbp),%rsi
call   1060 <pop@plt>
mov    %al,-0x8b(%rbp)
jmp    1643 <postfixConversion+0x4f3>
jmp    16c8 <postfixConversion+0x578>
jmp    16cd <postfixConversion+0x57d>
jmp    16d2 <postfixConversion+0x582>
jmp    16d7 <postfixConversion+0x587>
jmp    16dc <postfixConversion+0x58c>
jmp    16e1 <postfixConversion+0x591>
jmp    16e6 <postfixConversion+0x596>
jmp    16eb <postfixConversion+0x59b>
jmp    16f0 <postfixConversion+0x5a0>
jmp    16f5 <postfixConversion+0x5a5>
jmp    16fa <postfixConversion+0x5aa>
jmp    16ff <postfixConversion+0x5af>
jmp    1704 <postfixConversion+0x5b4>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    119f <postfixConversion+0x4f>
lea    -0x80(%rbp),%rdi
lea    -0x84(%rbp),%rsi
call   1060 <pop@plt>
mov    %al,-0x8b(%rbp)
movzbl -0x8b(%rbp),%ecx
xor    %eax,%eax
cmp    $0xfb,%ecx
mov    %al,-0x93(%rbp)
je     175e <postfixConversion+0x60e>
movzbl -0x8b(%rbp),%eax
cmp    $0xff,%eax
setne  %al
mov    %al,-0x93(%rbp)
mov    -0x93(%rbp),%al
test   $0x1,%al
jne    1771 <postfixConversion+0x621>
jmp    17ae <postfixConversion+0x65e>
mov    -0x8b(%rbp),%dl
mov    -0x8(%rbp),%rax
movzbl -0x89(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x89(%rbp),%al
add    $0x1,%al
mov    %al,-0x89(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x84(%rbp),%rsi
call   1060 <pop@plt>
mov    %al,-0x8b(%rbp)
jmp    172e <postfixConversion+0x5de>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postfixConversion>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbx
movl   $0xffffffff,0x1c(%rsp)
ff
mov    %rdi,0x10(%rsp)
mov    $0xff,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
xor    %r13d,%r13d
test   %eax,%eax
je     13c6 <postfixConversion+0x276>
lea    0x20(%rsp),%r15
lea    0x1c(%rsp),%rbp
movl   $0x0,0xc(%rsp)
xor    %r12d,%r12d
jmp    11d6 <postfixConversion+0x86>
mov    $0xfc,%edi
mov    %r15,%rsi
mov    %r14,%rbp
mov    %r14,%rdx
call   1070 <push@plt>
add    $0x1,%r13d
add    $0x1,%r13d
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    %eax,%r13d
jae    13c9 <postfixConversion+0x279>
mov    %rbp,%r14
mov    %r13d,%ebp
cmpb   $0x22,(%rbx,%rbp,1)
jne    1210 <postfixConversion+0xc0>
add    $0x1,%r13d
mov    %r14,%rbp
nopl   0x0(%rax)
mov    %r13d,%eax
movzbl (%rbx,%rax,1),%eax
add    $0x1,%r13d
cmp    $0x22,%al
je     11c1 <postfixConversion+0x71>
test   %al,%al
jne    11f0 <postfixConversion+0xa0>
jmp    11c1 <postfixConversion+0x71>
cs nopw 0x0(%rax,%rax,1)
nop
add    %rbx,%rbp
mov    %rbp,%rdi
lea    0xe5b(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11aa <postfixConversion+0x5a>
mov    %rbp,%rdi
lea    0xe41(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     131b <postfixConversion+0x1cb>
mov    %rbp,%rdi
lea    0xe27(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f4 <postfixConversion+0x1a4>
mov    %rbp,%rdi
lea    0xe0d(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f4 <postfixConversion+0x1a4>
mov    %rbp,%rdi
lea    0xdf7(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f4 <postfixConversion+0x1a4>
mov    %rbp,%rdi
lea    0xde1(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f4 <postfixConversion+0x1a4>
mov    %rbp,%rdi
lea    0xdcb(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f4 <postfixConversion+0x1a4>
mov    0x0(%rbp),%al
add    $0xdf,%al
cmp    $0x1d,%al
ja     1313 <postfixConversion+0x1c3>
movzbl %al,%eax
lea    0xd1f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
mov    %r14,%rbp
jmp    *%rax
mov    $0xfe,%edi
jmp    132a <postfixConversion+0x1da>
movzbl %r12b,%eax
mov    0x10(%rsp),%rcx
mov    0xc(%rsp),%edx
mov    %dl,(%rcx,%rax,1)
add    $0x1,%r12b
add    $0x1,%dl
mov    %edx,0xc(%rsp)
add    $0x1,%r13d
mov    %r14,%rbp
jmp    11c1 <postfixConversion+0x71>
mov    $0xfd,%edi
jmp    11af <postfixConversion+0x5f>
mov    $0xfb,%edi
mov    %r15,%rsi
mov    %rbp,%rdx
call   1070 <push@plt>
jmp    11c1 <postfixConversion+0x71>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1060 <pop@plt>
mov    %eax,%ecx
not    %cl
test   $0xfb,%cl
je     11c1 <postfixConversion+0x71>
mov    0x10(%rsp),%r14
nopw   0x0(%rax,%rax,1)
movzbl %r12b,%r12d
mov    %al,(%r14,%r12,1)
add    $0x1,%r12b
mov    %r15,%rdi
mov    %rbp,%rsi
call   1060 <pop@plt>
mov    %eax,%ecx
not    %cl
test   $0xfb,%cl
jne    1360 <postfixConversion+0x210>
jmp    11c1 <postfixConversion+0x71>
movzbl %r12b,%eax
mov    0x10(%rsp),%rcx
mov    0xc(%rsp),%edx
mov    %dl,(%rcx,%rax,1)
add    $0x1,%r12b
add    $0x1,%dl
mov    %edx,0xc(%rsp)
jmp    11c1 <postfixConversion+0x71>
movzbl %r12b,%r12d
mov    0x10(%rsp),%rax
mov    0xc(%rsp),%ecx
mov    %cl,(%rax,%r12,1)
add    $0x1,%r12b
add    $0x1,%cl
mov    %ecx,0xc(%rsp)
jmp    11c1 <postfixConversion+0x71>
xor    %r12d,%r12d
lea    0x20(%rsp),%rdi
lea    0x1c(%rsp),%rsi
call   1060 <pop@plt>
mov    %eax,%ecx
not    %cl
test   $0xfb,%cl
mov    0x10(%rsp),%rbx
je     1410 <postfixConversion+0x2c0>
lea    0x20(%rsp),%r14
lea    0x1c(%rsp),%rbp
movzbl %r12b,%r12d
mov    %al,(%rbx,%r12,1)
add    $0x1,%r12b
mov    %r14,%rdi
mov    %rbp,%rsi
call   1060 <pop@plt>
mov    %eax,%ecx
not    %cl
test   $0xfb,%cl
jne    13f0 <postfixConversion+0x2a0>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"&&\00"
@.str.1 = [3 x i8] c"||\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [3 x i8] c"!=\00"
@.str.4 = [3 x i8] c"<=\00"
@.str.5 = [3 x i8] c">=\00"
@.str.6 = [3 x i8] c"=~\00"
define void @postfixConversion(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [100 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 -1, i32* %6
store i32 0, i32* %7
store i8 0, i8* %8
store i8 0, i8* %9
store i8 0, i8* %10
%11 = load i8*, i8** %3
%12 = call i32 @memset(i8* %11, i32 255, i32 256)
br label %13
13: ; preds = %274, %2
%14 = load i32, i32* %7
%15 = load i8*, i8** %4
%16 = call i32 @strlen(i8* %15)
%17 = icmp ult i32 %14, %16
br i1 %17, label %18, label %277
18: ; preds = %13
%19 = load i8*, i8** %4
%20 = load i32, i32* %7
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 34
br i1 %25, label %26, label %53
26: ; preds = %18
%27 = load i32, i32* %7
%28 = add i32 %27, 1
store i32 %28, i32* %7
br label %29
29: ; preds = %47, %26
%30 = load i8*, i8** %4
%31 = load i32, i32* %7
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 34
br i1 %36, label %37, label %45
37: ; preds = %29
%38 = load i8*, i8** %4
%39 = load i32, i32* %7
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %38, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 0
br label %45
45: ; preds = %37, %29
%46 = phi i1 [ false, %29 ], [ %44, %37 ]
br i1 %46, label %47, label %50
47: ; preds = %45
%48 = load i32, i32* %7
%49 = add i32 %48, 1
store i32 %49, i32* %7
br label %29
50: ; preds = %45
%51 = load i32, i32* %7
%52 = add i32 %51, 1
store i32 %52, i32* %7
br label %274
53: ; preds = %18
%54 = load i8*, i8** %4
%55 = load i32, i32* %7
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %54, i64 %56
%58 = call i64 @strncmp(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %53
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%62 = call i32 @push(i32 252, i8* %61, i32* %6)
%63 = load i32, i32* %7
%64 = add i32 %63, 1
store i32 %64, i32* %7
br label %273
65: ; preds = %53
%66 = load i8*, i8** %4
%67 = load i32, i32* %7
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %66, i64 %68
%70 = call i64 @strncmp(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %65
%73 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%74 = call i32 @push(i32 253, i8* %73, i32* %6)
%75 = load i32, i32* %7
%76 = add i32 %75, 1
store i32 %76, i32* %7
br label %272
77: ; preds = %65
%78 = load i8*, i8** %4
%79 = load i32, i32* %7
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = call i64 @strncmp(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %96
84: ; preds = %77
%85 = load i8, i8* %9
%86 = load i8*, i8** %3
%87 = load i8, i8* %8
%88 = zext i8 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
store i8 %85, i8* %89
%90 = load i8, i8* %8
%91 = add i8 %90, 1
store i8 %91, i8* %8
%92 = load i8, i8* %9
%93 = add i8 %92, 1
store i8 %93, i8* %9
%94 = load i32, i32* %7
%95 = add i32 %94, 1
store i32 %95, i32* %7
br label %271
96: ; preds = %77
%97 = load i8*, i8** %4
%98 = load i32, i32* %7
%99 = zext i32 %98 to i64
%100 = getelementptr inbounds i8, i8* %97, i64 %99
%101 = call i64 @strncmp(i8* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %115
103: ; preds = %96
%104 = load i8, i8* %9
%105 = load i8*, i8** %3
%106 = load i8, i8* %8
%107 = zext i8 %106 to i64
%108 = getelementptr inbounds i8, i8* %105, i64 %107
store i8 %104, i8* %108
%109 = load i8, i8* %8
%110 = add i8 %109, 1
store i8 %110, i8* %8
%111 = load i8, i8* %9
%112 = add i8 %111, 1
store i8 %112, i8* %9
%113 = load i32, i32* %7
%114 = add i32 %113, 1
store i32 %114, i32* %7
br label %270
115: ; preds = %96
%116 = load i8*, i8** %4
%117 = load i32, i32* %7
%118 = zext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
%120 = call i64 @strncmp(i8* %119, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %134
122: ; preds = %115
%123 = load i8, i8* %9
%124 = load i8*, i8** %3
%125 = load i8, i8* %8
%126 = zext i8 %125 to i64
%127 = getelementptr inbounds i8, i8* %124, i64 %126
store i8 %123, i8* %127
%128 = load i8, i8* %8
%129 = add i8 %128, 1
store i8 %129, i8* %8
%130 = load i8, i8* %9
%131 = add i8 %130, 1
store i8 %131, i8* %9
%132 = load i32, i32* %7
%133 = add i32 %132, 1
store i32 %133, i32* %7
br label %269
134: ; preds = %115
%135 = load i8*, i8** %4
%136 = load i32, i32* %7
%137 = zext i32 %136 to i64
%138 = getelementptr inbounds i8, i8* %135, i64 %137
%139 = call i64 @strncmp(i8* %138, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 2)
%140 = icmp eq i64 %139, 0
br i1 %140, label %141, label %153
141: ; preds = %134
%142 = load i8, i8* %9
%143 = load i8*, i8** %3
%144 = load i8, i8* %8
%145 = zext i8 %144 to i64
%146 = getelementptr inbounds i8, i8* %143, i64 %145
store i8 %142, i8* %146
%147 = load i8, i8* %8
%148 = add i8 %147, 1
store i8 %148, i8* %8
%149 = load i8, i8* %9
%150 = add i8 %149, 1
store i8 %150, i8* %9
%151 = load i32, i32* %7
%152 = add i32 %151, 1
store i32 %152, i32* %7
br label %268
153: ; preds = %134
%154 = load i8*, i8** %4
%155 = load i32, i32* %7
%156 = zext i32 %155 to i64
%157 = getelementptr inbounds i8, i8* %154, i64 %156
%158 = call i64 @strncmp(i8* %157, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%159 = icmp eq i64 %158, 0
br i1 %159, label %160, label %172
160: ; preds = %153
%161 = load i8, i8* %9
%162 = load i8*, i8** %3
%163 = load i8, i8* %8
%164 = zext i8 %163 to i64
%165 = getelementptr inbounds i8, i8* %162, i64 %164
store i8 %161, i8* %165
%166 = load i8, i8* %8
%167 = add i8 %166, 1
store i8 %167, i8* %8
%168 = load i8, i8* %9
%169 = add i8 %168, 1
store i8 %169, i8* %9
%170 = load i32, i32* %7
%171 = add i32 %170, 1
store i32 %171, i32* %7
br label %267
172: ; preds = %153
%173 = load i8*, i8** %4
%174 = load i32, i32* %7
%175 = zext i32 %174 to i64
%176 = getelementptr inbounds i8, i8* %173, i64 %175
%177 = load i8, i8* %176
%178 = sext i8 %177 to i32
%179 = icmp eq i32 %178, 60
br i1 %179, label %180, label %190
180: ; preds = %172
%181 = load i8, i8* %9
%182 = load i8*, i8** %3
%183 = load i8, i8* %8
%184 = zext i8 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
store i8 %181, i8* %185
%186 = load i8, i8* %8
%187 = add i8 %186, 1
store i8 %187, i8* %8
%188 = load i8, i8* %9
%189 = add i8 %188, 1
store i8 %189, i8* %9
br label %266
190: ; preds = %172
%191 = load i8*, i8** %4
%192 = load i32, i32* %7
%193 = zext i32 %192 to i64
%194 = getelementptr inbounds i8, i8* %191, i64 %193
%195 = load i8, i8* %194
%196 = sext i8 %195 to i32
%197 = icmp eq i32 %196, 62
br i1 %197, label %198, label %208
198: ; preds = %190
%199 = load i8, i8* %9
%200 = load i8*, i8** %3
%201 = load i8, i8* %8
%202 = zext i8 %201 to i64
%203 = getelementptr inbounds i8, i8* %200, i64 %202
store i8 %199, i8* %203
%204 = load i8, i8* %8
%205 = add i8 %204, 1
store i8 %205, i8* %8
%206 = load i8, i8* %9
%207 = add i8 %206, 1
store i8 %207, i8* %9
br label %265
208: ; preds = %190
%209 = load i8*, i8** %4
%210 = load i32, i32* %7
%211 = zext i32 %210 to i64
%212 = getelementptr inbounds i8, i8* %209, i64 %211
%213 = load i8, i8* %212
%214 = sext i8 %213 to i32
%215 = icmp eq i32 %214, 33
br i1 %215, label %216, label %219
216: ; preds = %208
%217 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%218 = call i32 @push(i32 254, i8* %217, i32* %6)
br label %264
219: ; preds = %208
%220 = load i8*, i8** %4
%221 = load i32, i32* %7
%222 = zext i32 %221 to i64
%223 = getelementptr inbounds i8, i8* %220, i64 %222
%224 = load i8, i8* %223
%225 = sext i8 %224 to i32
%226 = icmp eq i32 %225, 40
br i1 %226, label %227, label %230
227: ; preds = %219
%228 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%229 = call i32 @push(i32 251, i8* %228, i32* %6)
br label %263
230: ; preds = %219
%231 = load i8*, i8** %4
%232 = load i32, i32* %7
%233 = zext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %231, i64 %233
%235 = load i8, i8* %234
%236 = sext i8 %235 to i32
%237 = icmp eq i32 %236, 41
br i1 %237, label %238, label %262
238: ; preds = %230
%239 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%240 = call zeroext i8 @pop(i8* %239, i32* %6)
store i8 %240, i8* %10
br label %241
241: ; preds = %251, %238
%242 = load i8, i8* %10
%243 = zext i8 %242 to i32
%244 = icmp ne i32 %243, 251
br i1 %244, label %245, label %249
245: ; preds = %241
%246 = load i8, i8* %10
%247 = zext i8 %246 to i32
%248 = icmp ne i32 %247, 255
br label %249
249: ; preds = %245, %241
%250 = phi i1 [ false, %241 ], [ %248, %245 ]
br i1 %250, label %251, label %261
251: ; preds = %249
%252 = load i8, i8* %10
%253 = load i8*, i8** %3
%254 = load i8, i8* %8
%255 = zext i8 %254 to i64
%256 = getelementptr inbounds i8, i8* %253, i64 %255
store i8 %252, i8* %256
%257 = load i8, i8* %8
%258 = add i8 %257, 1
store i8 %258, i8* %8
%259 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%260 = call zeroext i8 @pop(i8* %259, i32* %6)
store i8 %260, i8* %10
br label %241
261: ; preds = %249
br label %262
262: ; preds = %261, %230
br label %263
263: ; preds = %262, %227
br label %264
264: ; preds = %263, %216
br label %265
265: ; preds = %264, %198
br label %266
266: ; preds = %265, %180
br label %267
267: ; preds = %266, %160
br label %268
268: ; preds = %267, %141
br label %269
269: ; preds = %268, %122
br label %270
270: ; preds = %269, %103
br label %271
271: ; preds = %270, %84
br label %272
272: ; preds = %271, %72
br label %273
273: ; preds = %272, %60
br label %274
274: ; preds = %273, %50
%275 = load i32, i32* %7
%276 = add i32 %275, 1
store i32 %276, i32* %7
br label %13
277: ; preds = %13
%278 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%279 = call zeroext i8 @pop(i8* %278, i32* %6)
store i8 %279, i8* %10
br label %280
280: ; preds = %290, %277
%281 = load i8, i8* %10
%282 = zext i8 %281 to i32
%283 = icmp ne i32 %282, 251
br i1 %283, label %284, label %288
284: ; preds = %280
%285 = load i8, i8* %10
%286 = zext i8 %285 to i32
%287 = icmp ne i32 %286, 255
br label %288
288: ; preds = %284, %280
%289 = phi i1 [ false, %280 ], [ %287, %284 ]
br i1 %289, label %290, label %300
290: ; preds = %288
%291 = load i8, i8* %10
%292 = load i8*, i8** %3
%293 = load i8, i8* %8
%294 = zext i8 %293 to i64
%295 = getelementptr inbounds i8, i8* %292, i64 %294
store i8 %291, i8* %295
%296 = load i8, i8* %8
%297 = add i8 %296, 1
store i8 %297, i8* %8
%298 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%299 = call zeroext i8 @pop(i8* %298, i32* %6)
store i8 %299, i8* %10
br label %280
300: ; preds = %288
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"&&\00"
@.str.1 = [3 x i8] c"||\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [3 x i8] c"!=\00"
@.str.4 = [3 x i8] c"<=\00"
@.str.5 = [3 x i8] c">=\00"
@.str.6 = [3 x i8] c"=~\00"
define void @postfixConversion(i8* %0, i8* %1) {
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
store i32 -1, i32* %4
%7 = tail call i32 @memset(i8* %0, i32 255, i32 256)
%8 = call i32 @strlen(i8* %1)
%9 = icmp eq i32 %8, 0
br i1 %9, label %119, label %10
10: ; preds = %2, %112
%11 = phi i8 [ %115, %112 ], [ 0, %2 ]
%12 = phi i8 [ %114, %112 ], [ 0, %2 ]
%13 = phi i32 [ %116, %112 ], [ 0, %2 ]
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %1, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 34
br i1 %17, label %18, label %26
18: ; preds = %10, %18
%19 = phi i32 [ %20, %18 ], [ %13, %10 ]
%20 = add i32 %19, 1
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %1, i64 %21
%23 = load i8, i8* %22
switch i8 %23, label %18 [
i8 34, label %24
i8 0, label %24
]
24: ; preds = %18, %18
%25 = add i32 %19, 2
br label %112
26: ; preds = %10
%27 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = call i32 @push(i32 252, i8* %5, i32* %4)
%31 = add nuw i32 %13, 1
br label %112
32: ; preds = %26
%33 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = call i32 @push(i32 253, i8* %5, i32* %4)
%37 = add nuw i32 %13, 1
br label %112
38: ; preds = %32
%39 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = zext i8 %12 to i64
%43 = getelementptr inbounds i8, i8* %0, i64 %42
store i8 %11, i8* %43
%44 = add i8 %12, 1
%45 = add i8 %11, 1
%46 = add nuw i32 %13, 1
br label %112
47: ; preds = %38
%48 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %56
50: ; preds = %47
%51 = zext i8 %12 to i64
%52 = getelementptr inbounds i8, i8* %0, i64 %51
store i8 %11, i8* %52
%53 = add i8 %12, 1
%54 = add i8 %11, 1
%55 = add nuw i32 %13, 1
br label %112
56: ; preds = %47
%57 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %65
59: ; preds = %56
%60 = zext i8 %12 to i64
%61 = getelementptr inbounds i8, i8* %0, i64 %60
store i8 %11, i8* %61
%62 = add i8 %12, 1
%63 = add i8 %11, 1
%64 = add nuw i32 %13, 1
br label %112
65: ; preds = %56
%66 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 2)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %74
68: ; preds = %65
%69 = zext i8 %12 to i64
%70 = getelementptr inbounds i8, i8* %0, i64 %69
store i8 %11, i8* %70
%71 = add i8 %12, 1
%72 = add i8 %11, 1
%73 = add nuw i32 %13, 1
br label %112
74: ; preds = %65
%75 = call i64 @strncmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %83
77: ; preds = %74
%78 = zext i8 %12 to i64
%79 = getelementptr inbounds i8, i8* %0, i64 %78
store i8 %11, i8* %79
%80 = add i8 %12, 1
%81 = add i8 %11, 1
%82 = add nuw i32 %13, 1
br label %112
83: ; preds = %74
%84 = load i8, i8* %15
switch i8 %84, label %112 [
i8 60, label %85
i8 62, label %90
i8 33, label %95
i8 40, label %97
i8 41, label %99
]
85: ; preds = %83
%86 = zext i8 %12 to i64
%87 = getelementptr inbounds i8, i8* %0, i64 %86
store i8 %11, i8* %87
%88 = add i8 %12, 1
%89 = add i8 %11, 1
br label %112
90: ; preds = %83
%91 = zext i8 %12 to i64
%92 = getelementptr inbounds i8, i8* %0, i64 %91
store i8 %11, i8* %92
%93 = add i8 %12, 1
%94 = add i8 %11, 1
br label %112
95: ; preds = %83
%96 = call i32 @push(i32 254, i8* %5, i32* %4)
br label %112
97: ; preds = %83
%98 = call i32 @push(i32 251, i8* %5, i32* %4)
br label %112
99: ; preds = %83
%100 = call zeroext i8 @pop(i8* %5, i32* %4)
%101 = and i8 %100, -5
%102 = icmp eq i8 %101, -5
br i1 %102, label %112, label %103
103: ; preds = %99, %103
%104 = phi i8 [ %109, %103 ], [ %100, %99 ]
%105 = phi i8 [ %108, %103 ], [ %12, %99 ]
%106 = zext i8 %105 to i64
%107 = getelementptr inbounds i8, i8* %0, i64 %106
store i8 %104, i8* %107
%108 = add i8 %105, 1
%109 = call zeroext i8 @pop(i8* %5, i32* %4)
%110 = and i8 %109, -5
%111 = icmp eq i8 %110, -5
br i1 %111, label %112, label %103
112: ; preds = %103, %99, %83, %29, %41, %59, %77, %90, %97, %95, %85, %68, %50, %35, %24
%113 = phi i32 [ %25, %24 ], [ %31, %29 ], [ %37, %35 ], [ %46, %41 ], [ %55, %50 ], [ %64, %59 ], [ %73, %68 ], [ %82, %77 ], [ %13, %85 ], [ %13, %90 ], [ %13, %95 ], [ %13, %97 ], [ %13, %83 ], [ %13, %99 ], [ %13, %103 ]
%114 = phi i8 [ %12, %24 ], [ %12, %29 ], [ %12, %35 ], [ %44, %41 ], [ %53, %50 ], [ %62, %59 ], [ %71, %68 ], [ %80, %77 ], [ %88, %85 ], [ %93, %90 ], [ %12, %95 ], [ %12, %97 ], [ %12, %83 ], [ %12, %99 ], [ %108, %103 ]
%115 = phi i8 [ %11, %24 ], [ %11, %29 ], [ %11, %35 ], [ %45, %41 ], [ %54, %50 ], [ %63, %59 ], [ %72, %68 ], [ %81, %77 ], [ %89, %85 ], [ %94, %90 ], [ %11, %95 ], [ %11, %97 ], [ %11, %83 ], [ %11, %99 ], [ %11, %103 ]
%116 = add i32 %113, 1
%117 = call i32 @strlen(i8* %1)
%118 = icmp ult i32 %116, %117
br i1 %118, label %10, label %119
119: ; preds = %112, %2
%120 = phi i8 [ 0, %2 ], [ %114, %112 ]
%121 = call zeroext i8 @pop(i8* %5, i32* %4)
%122 = and i8 %121, -5
%123 = icmp eq i8 %122, -5
br i1 %123, label %133, label %124
124: ; preds = %119, %124
%125 = phi i8 [ %130, %124 ], [ %121, %119 ]
%126 = phi i8 [ %129, %124 ], [ %120, %119 ]
%127 = zext i8 %126 to i64
%128 = getelementptr inbounds i8, i8* %0, i64 %127
store i8 %125, i8* %128
%129 = add i8 %126, 1
%130 = call zeroext i8 @pop(i8* %5, i32* %4)
%131 = and i8 %130, -5
%132 = icmp eq i8 %131, -5
br i1 %132, label %133, label %124
133: ; preds = %124, %119
ret void
}