void kiss_recv(interface, bp) struct interface *interface;
struct mbuf *bp;
{
  char kisstype;
  kisstype = pullchar(&bp);
  switch (kisstype & 0xf) {
  case 0:
    dump(interface, 0x10, 0, bp);
    ax_recv(interface, bp);
    break;
  }
}


x86 assembly (clang, -O0):
<kiss_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
lea    -0x10(%rbp),%rdi
call   1050 <pullchar@plt>
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
test   $0xf,%al
jne    1184 <kiss_recv+0x54>
jmp    115f <kiss_recv+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x10,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <dump@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <ax_recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kiss_recv>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsi,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1050 <pullchar@plt>
test   $0xf,%al
jne    1172 <kiss_recv+0x42>
mov    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x10,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <dump@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <ax_recv@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.interface = type opaque
%struct.mbuf = type opaque
define void @kiss_recv(%struct.interface* %0, %struct.mbuf* %1) {
%3 = alloca %struct.interface*
%4 = alloca %struct.mbuf*
%5 = alloca i8
store %struct.interface* %0, %struct.interface** %3
store %struct.mbuf* %1, %struct.mbuf** %4
%6 = call i32 (%struct.mbuf**, ...) bitcast (i32 (...)* @pullchar to i32 (%struct.mbuf**, ...)*)(%struct.mbuf** %4)
%7 = trunc i32 %6 to i8
store i8 %7, i8* %5
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = and i32 %9, 15
switch i32 %10, label %18 [
i32 0, label %11
]
11: ; preds = %2
%12 = load %struct.interface*, %struct.interface** %3
%13 = load %struct.mbuf*, %struct.mbuf** %4
%14 = call i32 (%struct.interface*, i32, i32, %struct.mbuf*, ...) bitcast (i32 (...)* @dump to i32 (%struct.interface*, i32, i32, %struct.mbuf*, ...)*)(%struct.interface* %12, i32 16, i32 0, %struct.mbuf* %13)
%15 = load %struct.interface*, %struct.interface** %3
%16 = load %struct.mbuf*, %struct.mbuf** %4
%17 = call i32 (%struct.interface*, %struct.mbuf*, ...) bitcast (i32 (...)* @ax_recv to i32 (%struct.interface*, %struct.mbuf*, ...)*)(%struct.interface* %15, %struct.mbuf* %16)
br label %18
18: ; preds = %2, %11
ret void
}

LLVM IR (-O2):
%struct.interface = type opaque
%struct.mbuf = type opaque
define void @kiss_recv(%struct.interface* %0, %struct.mbuf* %1) {
%3 = alloca %struct.mbuf*
store %struct.mbuf* %1, %struct.mbuf** %3
%4 = call i32 (%struct.mbuf**, ...) bitcast (i32 (...)* @pullchar to i32 (%struct.mbuf**, ...)*)(%struct.mbuf** %3)
%5 = and i32 %4, 15
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load %struct.mbuf*, %struct.mbuf** %3
%9 = call i32 (%struct.interface*, i32, i32, %struct.mbuf*, ...) bitcast (i32 (...)* @dump to i32 (%struct.interface*, i32, i32, %struct.mbuf*, ...)*)(%struct.interface* %0, i32 16, i32 0, %struct.mbuf* %8)
%10 = load %struct.mbuf*, %struct.mbuf** %3
%11 = call i32 (%struct.interface*, %struct.mbuf*, ...) bitcast (i32 (...)* @ax_recv to i32 (%struct.interface*, %struct.mbuf*, ...)*)(%struct.interface* %0, %struct.mbuf* %10)
br label %12
12: ; preds = %2, %7
ret void
}