int expand_expr_all(s, env)
struct wnn_env *env;
register char *s;
{
  register char *c;
  for (c = s; *c; c++) {
    if (*c == '~' || *c == '@') {
      if (expand_expr(c, env) == -1)
        return (-1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<expand_expr_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1194 <expand_expr_all+0x84>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
je     1155 <expand_expr_all+0x45>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    117e <expand_expr_all+0x6e>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <expand_expr@plt>
cmp    $0xffffffff,%eax
jne    1179 <expand_expr_all+0x69>
movl   $0xffffffff,-0x4(%rbp)
jmp    119b <expand_expr_all+0x8b>
jmp    117e <expand_expr_all+0x6e>
jmp    1183 <expand_expr_all+0x73>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1128 <expand_expr_all+0x18>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_expr_all>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %r14d,%r14d
jmp    1136 <expand_expr_all+0x26>
nop
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <expand_expr@plt>
cmp    $0xffffffff,%eax
je     1148 <expand_expr_all+0x38>
add    $0x1,%rbp
movzbl 0x0(%rbp),%eax
cmp    $0x40,%al
je     1120 <expand_expr_all+0x10>
cmp    $0x7e,%al
je     1120 <expand_expr_all+0x10>
test   %al,%al
jne    1132 <expand_expr_all+0x22>
jmp    114e <expand_expr_all+0x3e>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.wnn_env = type opaque
define i32 @expand_expr_all(i8* %0, %struct.wnn_env* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.wnn_env*
%6 = alloca i8*
store i8* %0, i8** %4
store %struct.wnn_env* %1, %struct.wnn_env** %5
%7 = load i8*, i8** %4
store i8* %7, i8** %6
br label %8
8: ; preds = %30, %2
%9 = load i8*, i8** %6
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %33
12: ; preds = %8
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 126
br i1 %16, label %22, label %17
17: ; preds = %12
%18 = load i8*, i8** %6
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 64
br i1 %21, label %22, label %29
22: ; preds = %17, %12
%23 = load i8*, i8** %6
%24 = load %struct.wnn_env*, %struct.wnn_env** %5
%25 = call i32 (i8*, %struct.wnn_env*, ...) bitcast (i32 (...)* @expand_expr to i32 (i8*, %struct.wnn_env*, ...)*)(i8* %23, %struct.wnn_env* %24)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %28
27: ; preds = %22
store i32 -1, i32* %3
br label %34
28: ; preds = %22
br label %29
29: ; preds = %28, %17
br label %30
30: ; preds = %29
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %6
br label %8
33: ; preds = %8
store i32 0, i32* %3
br label %34
34: ; preds = %33, %27
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
%struct.wnn_env = type opaque
define i32 @expand_expr_all(i8* %0, %struct.wnn_env* %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %11
i8 126, label %6
i8 64, label %6
]
6: ; preds = %3, %3
%7 = tail call i32 (i8*, %struct.wnn_env*, ...) bitcast (i32 (...)* @expand_expr to i32 (i8*, %struct.wnn_env*, ...)*)(i8* %4, %struct.wnn_env* %1)
%8 = icmp eq i32 %7, -1
br i1 %8, label %11, label %9
9: ; preds = %3, %6
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
11: ; preds = %3, %6
%12 = phi i32 [ -1, %6 ], [ 0, %3 ]
ret i32 %12
}