void zsbh32(hdr, type) register char *hdr;
int type;
{
  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,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x43,%edi
mov    $0x0,%al
call   1030 <xsendline@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    $0xffffffff,%eax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <UPDC32@plt>
cltq
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jl     11c8 <zsbh32+0x98>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
and    $0xff,%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <UPDC32@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <zsbh32+0x49>
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jl     120b <zsbh32+0xdb>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <zsendline@plt>
mov    -0x18(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <zsbh32+0xab>
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 void @zsbh32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 (i32, ...) bitcast (i32 (...)* @xsendline to i32 (i32, ...)*)(i32 67)
%8 = load i32, i32* %4
%9 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %8)
store i64 4294967295, i64* %6
%10 = load i32, i32* %4
%11 = load i64, i64* %6
%12 = call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %10, i64 %11)
%13 = sext i32 %12 to i64
store i64 %13, i64* %6
store i32 4, i32* %5
br label %14
14: ; preds = %30, %2
%15 = load i32, i32* %5
%16 = add nsw i32 %15, -1
store i32 %16, i32* %5
%17 = icmp sge i32 %16, 0
br i1 %17, label %18, label %33
18: ; preds = %14
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = and i32 255, %21
%23 = load i64, i64* %6
%24 = call i32 (i32, i64, ...) bitcast (i32 (...)* @UPDC32 to i32 (i32, i64, ...)*)(i32 %22, i64 %23)
%25 = sext i32 %24 to i64
store i64 %25, i64* %6
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %28)
br label %30
30: ; preds = %18
%31 = load i8*, i8** %3
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %3
br label %14
33: ; preds = %14
%34 = load i64, i64* %6
%35 = xor i64 %34, -1
store i64 %35, i64* %6
store i32 4, i32* %5
br label %36
36: ; preds = %40, %33
%37 = load i32, i32* %5
%38 = add nsw i32 %37, -1
store i32 %38, i32* %5
%39 = icmp sge i32 %38, 0
br i1 %39, label %40, label %46
40: ; preds = %36
%41 = load i64, i64* %6
%42 = trunc i64 %41 to i32
%43 = call i32 (i32, ...) bitcast (i32 (...)* @zsendline to i32 (i32, ...)*)(i32 %42)
%44 = load i64, i64* %6
%45 = ashr i64 %44, 8
store i64 %45, i64* %6
br label %36
46: ; preds = %36
ret void
}

LLVM IR (-O2):
define void @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 void
}