int c_let(wp)
char **wp;
{
  int rv = 1;
  long val;
  if (wp[1] == (char *)0)
    bi_errorf("no arguments");
  else
    for (wp++; *wp; wp++)
      if (!evaluate(*wp, &val, 1)) {
        rv = 2;
        break;
      } else
        rv = val == 0;
  return rv;
}


x86 assembly (clang, -O0):
<c_let>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1155 <c_let+0x35>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <bi_errorf@plt>
jmp    11c6 <c_let+0xa6>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     11c1 <c_let+0xa1>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <evaluate@plt>
cmp    $0x0,%eax
jne    119b <c_let+0x7b>
movl   $0x2,-0xc(%rbp)
jmp    11c1 <c_let+0xa1>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    11b0 <c_let+0x90>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <c_let+0x41>
jmp    11c6 <c_let+0xa6>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_let>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x8(%rdi),%rdi
test   %rdi,%rdi
je     116b <c_let+0x4b>
add    $0x10,%rbx
mov    %rsp,%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <evaluate@plt>
test   %eax,%eax
je     1180 <c_let+0x60>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <c_let+0x20>
xor    %eax,%eax
cmpq   $0x0,(%rsp)
sete   %al
jmp    1185 <c_let+0x65>
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1030 <bi_errorf@plt>
mov    $0x1,%eax
jmp    1185 <c_let+0x65>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"no arguments\00"
define i32 @c_let(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i64
store i8** %0, i8*** %2
store i32 1, i32* %3
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @bi_errorf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %33
11: ; preds = %1
%12 = load i8**, i8*** %2
%13 = getelementptr inbounds i8*, i8** %12, i32 1
store i8** %13, i8*** %2
br label %14
14: ; preds = %29, %11
%15 = load i8**, i8*** %2
%16 = load i8*, i8** %15
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %32
18: ; preds = %14
%19 = load i8**, i8*** %2
%20 = load i8*, i8** %19
%21 = call i32 (i8*, i64*, i32, ...) bitcast (i32 (...)* @evaluate to i32 (i8*, i64*, i32, ...)*)(i8* %20, i64* %4, i32 1)
%22 = icmp ne i32 %21, 0
br i1 %22, label %24, label %23
23: ; preds = %18
store i32 2, i32* %3
br label %32
24: ; preds = %18
%25 = load i64, i64* %4
%26 = icmp eq i64 %25, 0
%27 = zext i1 %26 to i32
store i32 %27, i32* %3
br label %28
28: ; preds = %24
br label %29
29: ; preds = %28
%30 = load i8**, i8*** %2
%31 = getelementptr inbounds i8*, i8** %30, i32 1
store i8** %31, i8*** %2
br label %14
32: ; preds = %23, %14
br label %33
33: ; preds = %32, %9
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@.str = [13 x i8] c"no arguments\00"
define i32 @c_let(i8** nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bi_errorf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %22
9: ; preds = %1, %14
%10 = phi i8* [ %16, %14 ], [ %5, %1 ]
%11 = phi i8** [ %15, %14 ], [ %4, %1 ]
%12 = call i32 (i8*, i64*, i32, ...) bitcast (i32 (...)* @evaluate to i32 (i8*, i64*, i32, ...)*)(i8* %10, i64* %2, i32 1)
%13 = icmp eq i32 %12, 0
br i1 %13, label %22, label %14
14: ; preds = %9
%15 = getelementptr inbounds i8*, i8** %11, i64 1
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %9
18: ; preds = %14
%19 = load i64, i64* %2
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %9, %18, %7
%23 = phi i32 [ 1, %7 ], [ %21, %18 ], [ 2, %9 ]
ret i32 %23
}