void musthave(T, s) char **T;
char *s;
{
  mayhave(T, s);
  if (!*T) {
    write(2, "This termcap entry lacks the :", (unsigned)30);
    write(2, s, (unsigned)2);
    write(2, "=: capability\n", (unsigned)14);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<musthave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <mayhave@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    11a9 <musthave+0x79>
mov    $0x2,%edi
lea    0xe97(%rip),%rsi
mov    $0x1e,%edx
mov    $0x0,%al
call   1040 <write@plt>
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x2,%edi
lea    0xe8c(%rip),%rsi
mov    $0xe,%edx
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<musthave>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <mayhave@plt>
cmpq   $0x0,(%rbx)
je     114f <musthave+0x1f>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeaa(%rip),%rsi
mov    $0x2,%edi
mov    $0x1e,%edx
xor    %eax,%eax
call   1040 <write@plt>
mov    $0x2,%edi
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <write@plt>
lea    0xe9d(%rip),%rsi
mov    $0x2,%edi
mov    $0xe,%edx
xor    %eax,%eax
call   1040 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"This termcap entry lacks the :\00"
@.str.1 = [15 x i8] c"=: capability\0A\00"
define void @musthave(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @mayhave to i32 (i8**, i8*, ...)*)(i8** %5, i8* %6)
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 30)
%13 = load i8*, i8** %4
%14 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %13, i32 2)
%15 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 14)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"This termcap entry lacks the :\00"
@.str.1 = [15 x i8] c"=: capability\0A\00"
define void @musthave(i8** %0, i8* %1) {
%3 = tail call i32 (i8**, i8*, ...) bitcast (i32 (...)* @mayhave to i32 (i8**, i8*, ...)*)(i8** %0, i8* %1)
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 30)
%8 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %1, i32 2)
%9 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 14)
tail call void @exit(i32 1)
unreachable
10: ; preds = %2
ret void
}