heir9(lval) int lval[];
{
  int k, lval2[2];
  k = heir10(lval);
  blanks();
  if ((ch() != '*') & (ch() != '/') & (ch() != '%'))
    return k;
  if (k)
    rvalue(lval);
  while (1) {
    if (match("*")) {
      zpush();
      if (heir9(lval2))
        rvalue(lval2);
      zpop();
      mult();
    } else if (match("/")) {
      zpush();
      if (heir10(lval2))
        rvalue(lval2);
      zpop();
      div2();
    } else if (match("%")) {
      zpush();
      if (heir10(lval2))
        rvalue(lval2);
      zpop();
      zmod();
    } else
      return 0;
  }
}


x86 assembly (clang, -O0):
<heir9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <heir10@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1090 <blanks@plt>
mov    $0x0,%al
call   1070 <ch@plt>
cmp    $0x2a,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1070 <ch@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    $0x2f,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1070 <ch@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    $0x25,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1231 <heir9+0x81>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1354 <heir9+0x1a4>
cmpl   $0x0,-0x14(%rbp)
je     1246 <heir9+0x96>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
jmp    124b <heir9+0x9b>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   10d0 <match@plt>
cmp    $0x0,%eax
je     1299 <heir9+0xe9>
mov    $0x0,%al
call   1050 <zpush@plt>
lea    -0x1c(%rbp),%rdi
call   1080 <heir9@plt>
cmp    $0x0,%eax
je     1286 <heir9+0xd6>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
mov    $0x0,%al
call   10a0 <zpop@plt>
mov    $0x0,%al
call   10b0 <mult@plt>
jmp    134f <heir9+0x19f>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   10d0 <match@plt>
cmp    $0x0,%eax
je     12e9 <heir9+0x139>
mov    $0x0,%al
call   1050 <zpush@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1030 <heir10@plt>
cmp    $0x0,%eax
je     12d6 <heir9+0x126>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
mov    $0x0,%al
call   10a0 <zpop@plt>
mov    $0x0,%al
call   1060 <div2@plt>
jmp    134a <heir9+0x19a>
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   10d0 <match@plt>
cmp    $0x0,%eax
je     1339 <heir9+0x189>
mov    $0x0,%al
call   1050 <zpush@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1030 <heir10@plt>
cmp    $0x0,%eax
je     1326 <heir9+0x176>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1040 <rvalue@plt>
mov    $0x0,%al
call   10a0 <zpop@plt>
mov    $0x0,%al
call   10c0 <zmod@plt>
jmp    1345 <heir9+0x195>
movl   $0x0,-0x4(%rbp)
jmp    1354 <heir9+0x1a4>
jmp    134a <heir9+0x19a>
jmp    134f <heir9+0x19f>
jmp    124b <heir9+0x9b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heir9>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <heir10@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1090 <blanks@plt>
xor    %eax,%eax
call   1070 <ch@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <ch@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1070 <ch@plt>
cmp    $0x2a,%ebx
je     1208 <heir9+0x58>
cmp    $0x2f,%r15d
je     1208 <heir9+0x58>
cmp    $0x25,%eax
je     1208 <heir9+0x58>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
test   %ebp,%ebp
je     1216 <heir9+0x66>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
lea    0xde3(%rip),%r12
lea    0xdde(%rip),%r14
lea    0xdd9(%rip),%r15
lea    0x8(%rsp),%rbx
xor    %ebp,%ebp
jmp    124e <heir9+0x9e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   10a0 <zpop@plt>
xor    %eax,%eax
call   10b0 <mult@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   10d0 <match@plt>
test   %eax,%eax
je     1280 <heir9+0xd0>
xor    %eax,%eax
call   1050 <zpush@plt>
mov    %rbx,%rdi
call   1080 <heir9@plt>
test   %eax,%eax
je     1240 <heir9+0x90>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
jmp    1240 <heir9+0x90>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   10d0 <match@plt>
test   %eax,%eax
je     12bd <heir9+0x10d>
xor    %eax,%eax
call   1050 <zpush@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <heir10@plt>
test   %eax,%eax
je     12ad <heir9+0xfd>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
xor    %eax,%eax
call   10a0 <zpop@plt>
xor    %eax,%eax
call   1060 <div2@plt>
jmp    124e <heir9+0x9e>
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <match@plt>
test   %eax,%eax
je     11f9 <heir9+0x49>
xor    %eax,%eax
call   1050 <zpush@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <heir10@plt>
test   %eax,%eax
je     12ee <heir9+0x13e>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <rvalue@plt>
xor    %eax,%eax
call   10a0 <zpop@plt>
xor    %eax,%eax
call   10c0 <zmod@plt>
jmp    124e <heir9+0x9e>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [2 x i8] c"%\00"
define i32 @heir9(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [2 x i32]
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %6)
store i32 %7, i32* %4
%8 = call i32 (...) @blanks()
%9 = call i32 (...) @ch()
%10 = icmp ne i32 %9, 42
%11 = zext i1 %10 to i32
%12 = call i32 (...) @ch()
%13 = icmp ne i32 %12, 47
%14 = zext i1 %13 to i32
%15 = and i32 %11, %14
%16 = call i32 (...) @ch()
%17 = icmp ne i32 %16, 37
%18 = zext i1 %17 to i32
%19 = and i32 %15, %18
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %1
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %76
23: ; preds = %1
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32*, i32** %3
%28 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %27)
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29, %75
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %44
33: ; preds = %30
%34 = call i32 (...) @zpush()
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%36 = call i32 @heir9(i32* %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%40 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %39)
br label %41
41: ; preds = %38, %33
%42 = call i32 (...) @zpop()
%43 = call i32 (...) @mult()
br label %75
44: ; preds = %30
%45 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %58
47: ; preds = %44
%48 = call i32 (...) @zpush()
%49 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%50 = call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %47
%53 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%54 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %53)
br label %55
55: ; preds = %52, %47
%56 = call i32 (...) @zpop()
%57 = call i32 (...) @div2()
br label %74
58: ; preds = %44
%59 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %72
61: ; preds = %58
%62 = call i32 (...) @zpush()
%63 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%64 = call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %63)
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %61
%67 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%68 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %67)
br label %69
69: ; preds = %66, %61
%70 = call i32 (...) @zpop()
%71 = call i32 (...) @zmod()
br label %73
72: ; preds = %58
store i32 0, i32* %2
br label %76
73: ; preds = %69
br label %74
74: ; preds = %73, %55
br label %75
75: ; preds = %74, %41
br label %30
76: ; preds = %72, %21
%77 = load i32, i32* %2
ret i32 %77
}

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [2 x i8] c"%\00"
define i32 @heir9(i32* %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = tail call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %0)
%5 = tail call i32 (...) @blanks()
%6 = tail call i32 (...) @ch()
%7 = icmp ne i32 %6, 42
%8 = tail call i32 (...) @ch()
%9 = icmp ne i32 %8, 47
%10 = and i1 %7, %9
%11 = tail call i32 (...) @ch()
%12 = icmp ne i32 %11, 37
%13 = and i1 %10, %12
br i1 %13, label %57, label %14
14: ; preds = %1
%15 = icmp eq i32 %4, 0
br i1 %15, label %18, label %16
16: ; preds = %14
%17 = tail call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %0)
br label %18
18: ; preds = %16, %14
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
br label %20
20: ; preds = %44, %18
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %32, label %23
23: ; preds = %20
%24 = call i32 (...) @zpush()
%25 = call i32 @heir9(i32* %19)
%26 = icmp eq i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %23
%28 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %19)
br label %29
29: ; preds = %27, %23
%30 = call i32 (...) @zpop()
%31 = call i32 (...) @mult()
br label %44
32: ; preds = %20
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %45, label %35
35: ; preds = %32
%36 = call i32 (...) @zpush()
%37 = call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %19)
%38 = icmp eq i32 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %35
%40 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %19)
br label %41
41: ; preds = %39, %35
%42 = call i32 (...) @zpop()
%43 = call i32 (...) @div2()
br label %44
44: ; preds = %41, %54, %29
br label %20
45: ; preds = %32
%46 = call i32 (i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %57, label %48
48: ; preds = %45
%49 = call i32 (...) @zpush()
%50 = call i32 (i32*, ...) bitcast (i32 (...)* @heir10 to i32 (i32*, ...)*)(i32* %19)
%51 = icmp eq i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %48
%53 = call i32 (i32*, ...) bitcast (i32 (...)* @rvalue to i32 (i32*, ...)*)(i32* %19)
br label %54
54: ; preds = %52, %48
%55 = call i32 (...) @zpop()
%56 = call i32 (...) @zmod()
br label %44
57: ; preds = %45, %1
%58 = phi i32 [ %4, %1 ], [ 0, %45 ]
ret i32 %58
}