int sendreply(m, p, sz)
struct message_hdr *m;
char *p;
long sz;
{
  if (!uputm(m) || !(sz && p ? usend(p, sz) : 1)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<sendreply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <uputm@plt>
cmp    $0x0,%eax
je     118a <sendreply+0x6a>
cmpq   $0x0,-0x20(%rbp)
je     117b <sendreply+0x5b>
cmpq   $0x0,-0x18(%rbp)
je     117b <sendreply+0x5b>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <usend@plt>
cmp    $0x0,%eax
jne    1196 <sendreply+0x76>
jmp    118a <sendreply+0x6a>
mov    $0x1,%al
test   $0x1,%al
jne    1196 <sendreply+0x76>
jmp    118a <sendreply+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    119d <sendreply+0x7d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendreply>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <uputm@plt>
test   %eax,%eax
je     1159 <sendreply+0x39>
test   %rbx,%rbx
je     1154 <sendreply+0x34>
test   %r14,%r14
je     1154 <sendreply+0x34>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <usend@plt>
test   %eax,%eax
je     1159 <sendreply+0x39>
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.message_hdr = type opaque
define i32 @sendreply(%struct.message_hdr* %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca %struct.message_hdr*
%6 = alloca i8*
%7 = alloca i64
store %struct.message_hdr* %0, %struct.message_hdr** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load %struct.message_hdr*, %struct.message_hdr** %5
%9 = call i32 (%struct.message_hdr*, ...) bitcast (i32 (...)* @uputm to i32 (%struct.message_hdr*, ...)*)(%struct.message_hdr* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %3
%12 = load i64, i64* %7
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i8*, i8** %6
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i8*, i8** %6
%19 = load i64, i64* %7
%20 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @usend to i32 (i8*, i64, ...)*)(i8* %18, i64 %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %24, label %23
22: ; preds = %14, %11
br i1 true, label %24, label %23
23: ; preds = %22, %17, %3
store i32 0, i32* %4
br label %25
24: ; preds = %22, %17
store i32 1, i32* %4
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
%struct.message_hdr = type opaque
define i32 @sendreply(%struct.message_hdr* %0, i8* %1, i64 %2) {
%4 = tail call i32 (%struct.message_hdr*, ...) bitcast (i32 (...)* @uputm to i32 (%struct.message_hdr*, ...)*)(%struct.message_hdr* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3
%7 = icmp ne i64 %2, 0
%8 = icmp ne i8* %1, null
%9 = and i1 %8, %7
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @usend to i32 (i8*, i64, ...)*)(i8* %1, i64 %2)
%12 = icmp eq i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %6, %10
br label %14
14: ; preds = %3, %10, %13
%15 = phi i32 [ 1, %13 ], [ 0, %10 ], [ 0, %3 ]
ret i32 %15
}