heir11(lval) int *lval;
{
  int k;
  char *ptr;
  k = primary(lval);
  ptr = lval[0];
  blanks();
  if ((ch() == '[') | (ch() == '('))
    while (1) {
      if (match("[")) {
        if (ptr == 0) {
          error("can't sudirript");
          junk();
          needbrack("]");
          return 0;
        } else if (ptr[9] == 3)
          rvalue(lval);
        else if (ptr[9] != 2) {
          error("can't sudirript");
          k = 0;
        }
        zpush();
        expression();
        needbrack("]");
        if (ptr[10] == 2)
          doublereg();
        zpop();
        zadd();
        lval[1] = ptr[10];
        lval[0] = 0;
        k = 1;
      } else if (match("(")) {
        if (ptr == 0) {
          callfunction(0);
        } else if (ptr[9] != 4) {
          rvalue(lval);
          callfunction(0);
        } else
          callfunction(ptr);
        k = lval[0] = 0;
      } else
        return k;
    }
  if (ptr == 0)
    return k;
  if (ptr[9] == 4) {
    immed();
    outname(ptr);
    nl();
    return 0;
  }
  return k;
}


x86 assembly (clang, -O0):
<heir11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   10f0 <primary@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   10b0 <blanks@plt>
mov    $0x0,%al
call   1090 <ch@plt>
cmp    $0x5b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1090 <ch@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    $0x28,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1417 <heir11+0x207>
jmp    1279 <heir11+0x69>
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1100 <match@plt>
cmp    $0x0,%eax
je     1382 <heir11+0x172>
cmpq   $0x0,-0x20(%rbp)
jne    12ca <heir11+0xba>
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1120 <error@plt>
mov    $0x0,%al
call   1030 <junk@plt>
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1110 <needbrack@plt>
movl   $0x0,-0x4(%rbp)
jmp    1469 <heir11+0x259>
mov    -0x20(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x3,%eax
jne    12eb <heir11+0xdb>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
jmp    1316 <heir11+0x106>
mov    -0x20(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x2,%eax
je     1311 <heir11+0x101>
lea    0xcff(%rip),%rdi
mov    $0x0,%al
call   1120 <error@plt>
movl   $0x0,-0x14(%rbp)
jmp    1316 <heir11+0x106>
jmp    131b <heir11+0x10b>
mov    $0x0,%al
call   1060 <zpush@plt>
mov    $0x0,%al
call   10d0 <expression@plt>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1110 <needbrack@plt>
mov    -0x20(%rbp),%rax
movsbl 0xa(%rax),%eax
cmp    $0x2,%eax
jne    134f <heir11+0x13f>
mov    $0x0,%al
call   1130 <doublereg@plt>
mov    $0x0,%al
call   10c0 <zpop@plt>
mov    $0x0,%al
call   1080 <zadd@plt>
mov    -0x20(%rbp),%rax
movsbl 0xa(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x14(%rbp)
jmp    1412 <heir11+0x202>
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1100 <match@plt>
cmp    $0x0,%eax
je     1402 <heir11+0x1f2>
cmpq   $0x0,-0x20(%rbp)
jne    13b2 <heir11+0x1a2>
xor    %edi,%edi
mov    $0x0,%al
call   10a0 <callfunction@plt>
jmp    13ec <heir11+0x1dc>
mov    -0x20(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x4,%eax
je     13dc <heir11+0x1cc>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
xor    %edi,%edi
mov    $0x0,%al
call   10a0 <callfunction@plt>
jmp    13e7 <heir11+0x1d7>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   10a0 <callfunction@plt>
jmp    13ec <heir11+0x1dc>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x14(%rbp)
jmp    140d <heir11+0x1fd>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1469 <heir11+0x259>
jmp    1412 <heir11+0x202>
jmp    1279 <heir11+0x69>
cmpq   $0x0,-0x20(%rbp)
jne    142d <heir11+0x21d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1469 <heir11+0x259>
mov    -0x20(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x4,%eax
jne    1463 <heir11+0x253>
mov    $0x0,%al
call   1070 <immed@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   10e0 <outname@plt>
mov    $0x0,%al
call   1050 <nl@plt>
movl   $0x0,-0x4(%rbp)
jmp    1469 <heir11+0x259>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heir11>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   10f0 <primary@plt>
mov    %eax,%ebp
movslq (%r14),%rbx
xor    %eax,%eax
call   10b0 <blanks@plt>
xor    %eax,%eax
call   1090 <ch@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1090 <ch@plt>
cmp    $0x5b,%r15d
je     127e <heir11+0x6e>
cmp    $0x28,%eax
je     127e <heir11+0x6e>
test   %ebx,%ebx
je     13b6 <heir11+0x1a6>
cmpb   $0x4,0x9(%rbx)
jne    13b6 <heir11+0x1a6>
xor    %ebp,%ebp
xor    %eax,%eax
call   1070 <immed@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <outname@plt>
xor    %eax,%eax
call   1050 <nl@plt>
jmp    13b6 <heir11+0x1a6>
lea    0xd7b(%rip),%r15
lea    0xd88(%rip),%r12
lea    0xd7f(%rip),%r13
jmp    12c2 <heir11+0xb2>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   10c0 <zpop@plt>
xor    %eax,%eax
call   1080 <zadd@plt>
movsbl 0xa(%rbx),%eax
mov    %eax,0x4(%r14)
mov    $0x1,%ebp
movl   $0x0,(%r14)
mov    %r15,%rdi
xor    %eax,%eax
call   1100 <match@plt>
test   %eax,%eax
je     12f0 <heir11+0xe0>
test   %ebx,%ebx
je     1391 <heir11+0x181>
movzbl 0x9(%rbx),%eax
cmp    $0x2,%al
je     133e <heir11+0x12e>
cmp    $0x3,%al
jne    1330 <heir11+0x120>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
jmp    133e <heir11+0x12e>
mov    %r12,%rdi
xor    %eax,%eax
call   1100 <match@plt>
test   %eax,%eax
je     13b6 <heir11+0x1a6>
test   %ebx,%ebx
je     136c <heir11+0x15c>
cmpb   $0x4,0x9(%rbx)
jne    1370 <heir11+0x160>
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <callfunction@plt>
movl   $0x0,(%r14)
jmp    12c2 <heir11+0xb2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xccb(%rip),%rdi
xor    %eax,%eax
call   1120 <error@plt>
xor    %eax,%eax
call   1060 <zpush@plt>
xor    %eax,%eax
call   10d0 <expression@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1110 <needbrack@plt>
cmpb   $0x2,0xa(%rbx)
jne    12a0 <heir11+0x90>
xor    %eax,%eax
call   1130 <doublereg@plt>
jmp    12a0 <heir11+0x90>
xor    %ebp,%ebp
jmp    137c <heir11+0x16c>
xor    %ebp,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
xor    %edi,%edi
xor    %eax,%eax
call   10a0 <callfunction@plt>
movl   $0x0,(%r14)
jmp    12c2 <heir11+0xb2>
lea    0xc6a(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1120 <error@plt>
xor    %eax,%eax
call   1030 <junk@plt>
lea    0xc63(%rip),%rdi
xor    %eax,%eax
call   1110 <needbrack@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
@.str.1 = [16 x i8] c"can't sudirript\00"
@.str.2 = [2 x i8] c"]\00"
@.str.3 = [2 x i8] c"(\00"
define i32 @heir11(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @primary to i32 (i32*, ...)*)(i32* %6)
store i32 %7, i32* %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %5
%13 = call i32 (...) @blanks()
%14 = call i32 (...) @ch()
%15 = icmp eq i32 %14, 91
%16 = zext i1 %15 to i32
%17 = call i32 (...) @ch()
%18 = icmp eq i32 %17, 40
%19 = zext i1 %18 to i32
%20 = or i32 %16, %19
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %103
22: ; preds = %1
br label %23
23: ; preds = %22, %102
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %74
26: ; preds = %23
%27 = load i8*, i8** %5
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%31 = call i32 (...) @junk()
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @needbrack to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %121
33: ; preds = %26
%34 = load i8*, i8** %5
%35 = getelementptr inbounds i8, i8* %34, i64 9
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 3
br i1 %38, label %39, label %42
39: ; preds = %33
%40 = load i32*, i32** %3
%41 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %40)
br label %51
42: ; preds = %33
%43 = load i8*, i8** %5
%44 = getelementptr inbounds i8, i8* %43, i64 9
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 2
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %50
50: ; preds = %48, %42
br label %51
51: ; preds = %50, %39
br label %52
52: ; preds = %51
%53 = call i32 (...) @zpush()
%54 = call i32 (...) @expression()
%55 = call i32 (i8*, ...) bitcast (i32 (...)* @needbrack to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%56 = load i8*, i8** %5
%57 = getelementptr inbounds i8, i8* %56, i64 10
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp eq i32 %59, 2
br i1 %60, label %61, label %63
61: ; preds = %52
%62 = call i32 (...) @doublereg()
br label %63
63: ; preds = %61, %52
%64 = call i32 (...) @zpop()
%65 = call i32 (...) @zadd()
%66 = load i8*, i8** %5
%67 = getelementptr inbounds i8, i8* %66, i64 10
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = load i32*, i32** %3
%71 = getelementptr inbounds i32, i32* %70, i64 1
store i32 %69, i32* %71
%72 = load i32*, i32** %3
%73 = getelementptr inbounds i32, i32* %72, i64 0
store i32 0, i32* %73
store i32 1, i32* %4
br label %102
74: ; preds = %23
%75 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %99
77: ; preds = %74
%78 = load i8*, i8** %5
%79 = icmp eq i8* %78, null
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 (i32, ...) bitcast (i32 (...)* @callfunction to i32 (i32, ...)*)(i32 0)
br label %96
82: ; preds = %77
%83 = load i8*, i8** %5
%84 = getelementptr inbounds i8, i8* %83, i64 9
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = icmp ne i32 %86, 4
br i1 %87, label %88, label %92
88: ; preds = %82
%89 = load i32*, i32** %3
%90 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %89)
%91 = call i32 (i32, ...) bitcast (i32 (...)* @callfunction to i32 (i32, ...)*)(i32 0)
br label %95
92: ; preds = %82
%93 = load i8*, i8** %5
%94 = call i32 (i8*, ...) bitcast (i32 (...)* @callfunction to i32 (i8*, ...)*)(i8* %93)
br label %95
95: ; preds = %92, %88
br label %96
96: ; preds = %95, %80
%97 = load i32*, i32** %3
%98 = getelementptr inbounds i32, i32* %97, i64 0
store i32 0, i32* %98
store i32 0, i32* %4
br label %101
99: ; preds = %74
%100 = load i32, i32* %4
store i32 %100, i32* %2
br label %121
101: ; preds = %96
br label %102
102: ; preds = %101, %63
br label %23
103: ; preds = %1
%104 = load i8*, i8** %5
%105 = icmp eq i8* %104, null
br i1 %105, label %106, label %108
106: ; preds = %103
%107 = load i32, i32* %4
store i32 %107, i32* %2
br label %121
108: ; preds = %103
%109 = load i8*, i8** %5
%110 = getelementptr inbounds i8, i8* %109, i64 9
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp eq i32 %112, 4
br i1 %113, label %114, label %119
114: ; preds = %108
%115 = call i32 (...) @immed()
%116 = load i8*, i8** %5
%117 = call i32 (i8*, ...) bitcast (i32 (...)* @outname to i32 (i8*, ...)*)(i8* %116)
%118 = call i32 (...) @nl()
store i32 0, i32* %2
br label %121
119: ; preds = %108
%120 = load i32, i32* %4
store i32 %120, i32* %2
br label %121
121: ; preds = %119, %114, %106, %99, %29
%122 = load i32, i32* %2
ret i32 %122
}

LLVM IR (-O2):
@.str = [2 x i8] c"[\00"
@.str.1 = [16 x i8] c"can't sudirript\00"
@.str.2 = [2 x i8] c"]\00"
@.str.3 = [2 x i8] c"(\00"
define i32 @heir11(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @primary to i32 (i32*, ...)*)(i32* %0)
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 (...) @blanks()
%7 = tail call i32 (...) @ch()
%8 = icmp eq i32 %7, 91
%9 = tail call i32 (...) @ch()
%10 = icmp eq i32 %9, 40
%11 = or i1 %8, %10
%12 = icmp eq i32 %3, 0
br i1 %11, label %13, label %61
13: ; preds = %1
%14 = getelementptr inbounds i8, i8* %5, i64 9
%15 = getelementptr inbounds i8, i8* %5, i64 10
%16 = getelementptr inbounds i32, i32* %0, i64 1
br label %17
17: ; preds = %13, %59
%18 = phi i32 [ %60, %59 ], [ %2, %13 ]
%19 = tail call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %45, label %21
21: ; preds = %17
br i1 %12, label %22, label %26
22: ; preds = %21
%23 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%24 = tail call i32 (...) @junk()
%25 = tail call i32 (i8*, ...) bitcast (i32 (...)* @needbrack to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %70
26: ; preds = %21
%27 = load i8, i8* %14
switch i8 %27, label %30 [
i8 3, label %28
i8 2, label %32
]
28: ; preds = %26
%29 = tail call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %0)
br label %32
30: ; preds = %26
%31 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %26, %28, %30
%33 = tail call i32 (...) @zpush()
%34 = tail call i32 (...) @expression()
%35 = tail call i32 (i8*, ...) bitcast (i32 (...)* @needbrack to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%36 = load i8, i8* %15
%37 = icmp eq i8 %36, 2
br i1 %37, label %38, label %40
38: ; preds = %32
%39 = tail call i32 (...) @doublereg()
br label %40
40: ; preds = %38, %32
%41 = tail call i32 (...) @zpop()
%42 = tail call i32 (...) @zadd()
%43 = load i8, i8* %15
%44 = sext i8 %43 to i32
store i32 %44, i32* %16
br label %59
45: ; preds = %17
%46 = tail call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %70, label %48
48: ; preds = %45
br i1 %12, label %49, label %51
49: ; preds = %48
%50 = tail call i32 (i32, ...) bitcast (i32 (...)* @callfunction to i32 (i32, ...)*)(i32 0)
br label %59
51: ; preds = %48
%52 = load i8, i8* %14
%53 = icmp eq i8 %52, 4
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = tail call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %0)
%56 = tail call i32 (i32, ...) bitcast (i32 (...)* @callfunction to i32 (i32, ...)*)(i32 0)
br label %59
57: ; preds = %51
%58 = tail call i32 (i8*, ...) bitcast (i32 (...)* @callfunction to i32 (i8*, ...)*)(i8* %5)
br label %59
59: ; preds = %49, %57, %54, %40
%60 = phi i32 [ 1, %40 ], [ 0, %54 ], [ 0, %57 ], [ 0, %49 ]
store i32 0, i32* %0
br label %17
61: ; preds = %1
br i1 %12, label %70, label %62
62: ; preds = %61
%63 = getelementptr inbounds i8, i8* %5, i64 9
%64 = load i8, i8* %63
%65 = icmp eq i8 %64, 4
br i1 %65, label %66, label %70
66: ; preds = %62
%67 = tail call i32 (...) @immed()
%68 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outname to i32 (i8*, ...)*)(i8* %5)
%69 = tail call i32 (...) @nl()
br label %70
70: ; preds = %45, %62, %61, %66, %22
%71 = phi i32 [ 0, %22 ], [ 0, %66 ], [ %2, %61 ], [ %2, %62 ], [ %18, %45 ]
ret i32 %71
}