error(s) char *s;
{
  register char *p;
  flush();
  write(2, "?", 1);
  for (p = s; *p++;)
    ;
  --p;
  write(2, s, p - s);
  write(2, "?\n", 2);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <flush@plt>
mov    $0x2,%edi
lea    0xeb1(%rip),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <write@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     1180 <error+0x50>
jmp    1163 <error+0x33>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
sub    %rax,%rdx
mov    $0x2,%edi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x2,%edx
lea    0xe4f(%rip),%rsi
mov    %edx,%edi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <flush@plt>
lea    0xebe(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <write@plt>
mov    $0xffffffffffffffff,%rdx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rbx,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1160 <error+0x30>
mov    $0x2,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <write@plt>
lea    0xe81(%rip),%rsi
mov    $0x2,%edi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <write@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"?\00"
@.str.1 = [3 x i8] c"?\0A\00"
define i32 @error(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i32 (...) @flush()
%5 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = load i8*, i8** %2
store i8* %6, i8** %3
br label %7
7: ; preds = %12, %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
%16 = load i8*, i8** %2
%17 = load i8*, i8** %3
%18 = load i8*, i8** %2
%19 = ptrtoint i8* %17 to i64
%20 = ptrtoint i8* %18 to i64
%21 = sub i64 %19, %20
%22 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %16, i64 %21)
%23 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"?\00"
@.str.1 = [3 x i8] c"?\0A\00"
define i32 @error(i8* %0) {
%2 = tail call i32 (...) @flush()
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %4
4: ; preds = %4, %1
%5 = phi i8* [ %0, %1 ], [ %6, %4 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4
%10 = ptrtoint i8* %5 to i64
%11 = ptrtoint i8* %0 to i64
%12 = sub i64 %10, %11
%13 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %0, i64 %12)
%14 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
tail call void @exit(i32 -1)
unreachable
}