zsbh32(hdr, type) register char *hdr;
{
  register int n;
  register long crc;
  xsendline('C');
  zsendline(type);
  crc = 0xFFFFFFFFL;
  crc = UPDC32(type, crc);
  for (n = 4; --n >= 0; ++hdr) {
    crc = UPDC32((0377 & *hdr), crc);
    zsendline(*hdr);
  }
  crc = ~crc;
  for (n = 4; --n >= 0;) {
    zsendline((int)crc);
    crc >>= 8;
  }
}


x86 assembly (clang, -O0):
<zsbh32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    $0x43,%edi
mov    $0x0,%al
call   1030 <xsendline@plt>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    $0xffffffff,%eax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <UPDC32@plt>
cltq
mov    %rax,-0x20(%rbp)
movl   $0x4,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jl     11c8 <zsbh32+0x98>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
and    $0xff,%edi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <UPDC32@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1179 <zsbh32+0x49>
mov    -0x20(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
movl   $0x4,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jl     120b <zsbh32+0xdb>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    -0x20(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    11db <zsbh32+0xab>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsbh32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x43,%edi
xor    %eax,%eax
call   1030 <xsendline@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
mov    $0xffffffff,%esi
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <UPDC32@plt>
movslq %eax,%rsi
movzbl (%rbx),%edi
xor    %eax,%eax
call   1040 <UPDC32@plt>
mov    %eax,%ebp
movsbl (%rbx),%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
movslq %ebp,%rsi
movzbl 0x1(%rbx),%edi
xor    %eax,%eax
call   1040 <UPDC32@plt>
mov    %eax,%ebp
movsbl 0x1(%rbx),%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
movslq %ebp,%rsi
movzbl 0x2(%rbx),%edi
xor    %eax,%eax
call   1040 <UPDC32@plt>
mov    %eax,%ebp
movsbl 0x2(%rbx),%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
movslq %ebp,%rsi
movzbl 0x3(%rbx),%edi
xor    %eax,%eax
call   1040 <UPDC32@plt>
mov    %eax,%ebp
movsbl 0x3(%rbx),%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
not    %ebp
mov    %ebp,%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
mov    %ebp,%edi
sar    $0x8,%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
mov    %ebp,%edi
sar    $0x10,%edi
xor    %eax,%eax
call   1050 <zsendline@plt>
sar    $0x18,%ebp
mov    %ebp,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <zsendline@plt>

LLVM IR (-O0):
define i32 @zsbh32(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = call i32 (i32, ...) bitcast (i32 (...)* @xsendline to i32 (i32, ...)*)(i32 67)
%9 = load i32, i32* %5
%10 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %9)
store i64 4294967295, i64* %7
%11 = load i32, i32* %5
%12 = load i64, i64* %7
%13 = call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %11, i64 %12)
%14 = sext i32 %13 to i64
store i64 %14, i64* %7
store i32 4, i32* %6
br label %15
15: ; preds = %31, %2
%16 = load i32, i32* %6
%17 = add nsw i32 %16, -1
store i32 %17, i32* %6
%18 = icmp sge i32 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %15
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = and i32 255, %22
%24 = load i64, i64* %7
%25 = call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %23, i64 %24)
%26 = sext i32 %25 to i64
store i64 %26, i64* %7
%27 = load i8*, i8** %4
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %29)
br label %31
31: ; preds = %19
%32 = load i8*, i8** %4
%33 = getelementptr inbounds i8, i8* %32, i32 1
store i8* %33, i8** %4
br label %15
34: ; preds = %15
%35 = load i64, i64* %7
%36 = xor i64 %35, -1
store i64 %36, i64* %7
store i32 4, i32* %6
br label %37
37: ; preds = %41, %34
%38 = load i32, i32* %6
%39 = add nsw i32 %38, -1
store i32 %39, i32* %6
%40 = icmp sge i32 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = load i64, i64* %7
%43 = trunc i64 %42 to i32
%44 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %43)
%45 = load i64, i64* %7
%46 = ashr i64 %45, 8
store i64 %46, i64* %7
br label %37
47: ; preds = %37
%48 = load i32, i32* %3
ret i32 %48
}

LLVM IR (-O2):
define i32 @zsbh32(i8* nocapture %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @xsendline to i32 (i32, ...)*)(i32 67)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %1)
%5 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %1, i64 4294967295)
%6 = sext i32 %5 to i64
%7 = load i8, i8* %0
%8 = zext i8 %7 to i32
%9 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %8, i64 %6)
%10 = load i8, i8* %0
%11 = sext i8 %10 to i32
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %11)
%13 = getelementptr inbounds i8, i8* %0, i64 1
%14 = sext i32 %9 to i64
%15 = load i8, i8* %13
%16 = zext i8 %15 to i32
%17 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %16, i64 %14)
%18 = load i8, i8* %13
%19 = sext i8 %18 to i32
%20 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %19)
%21 = getelementptr inbounds i8, i8* %0, i64 2
%22 = sext i32 %17 to i64
%23 = load i8, i8* %21
%24 = zext i8 %23 to i32
%25 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %24, i64 %22)
%26 = load i8, i8* %21
%27 = sext i8 %26 to i32
%28 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %27)
%29 = getelementptr inbounds i8, i8* %0, i64 3
%30 = sext i32 %25 to i64
%31 = load i8, i8* %29
%32 = zext i8 %31 to i32
%33 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %32, i64 %30)
%34 = load i8, i8* %29
%35 = sext i8 %34 to i32
%36 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %35)
%37 = xor i32 %33, -1
%38 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %37)
%39 = ashr i32 %37, 8
%40 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %39)
%41 = ashr i32 %37, 16
%42 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %41)
%43 = ashr i32 %37, 24
%44 = tail call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %43)
ret i32 undef
}