int uputcmd(u, size, start, cmd)
register struct undostack *u;
int size, start;
char cmd;
{ return (pushw(u, size) && pushw(u, start) && pushw(u, cmd)); }


x86 assembly (clang, -O0):
<uputcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <pushw@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x12(%rbp)
je     117b <uputcmd+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1030 <pushw@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x12(%rbp)
je     117b <uputcmd+0x6b>
mov    -0x8(%rbp),%rdi
movsbl -0x11(%rbp),%esi
mov    $0x0,%al
call   1030 <pushw@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uputcmd>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <pushw@plt>
test   %eax,%eax
je     1156 <uputcmd+0x46>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1030 <pushw@plt>
test   %eax,%eax
je     1156 <uputcmd+0x46>
movsbl %r14b,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <pushw@plt>
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.undostack = type opaque
define i32 @uputcmd(%struct.undostack* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.undostack*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = trunc i32 %3 to i8
store %struct.undostack* %0, %struct.undostack** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %9, i8* %8
%10 = load %struct.undostack*, %struct.undostack** %5
%11 = load i32, i32* %6
%12 = call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %10, i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %4
%15 = load %struct.undostack*, %struct.undostack** %5
%16 = load i32, i32* %7
%17 = call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %15, i32 %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load %struct.undostack*, %struct.undostack** %5
%21 = load i8, i8* %8
%22 = sext i8 %21 to i32
%23 = call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %20, i32 %22)
%24 = icmp ne i32 %23, 0
br label %25
25: ; preds = %19, %14, %4
%26 = phi i1 [ false, %14 ], [ false, %4 ], [ %24, %19 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
%struct.undostack = type opaque
define i32 @uputcmd(%struct.undostack* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %0, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %4
%8 = tail call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %0, i32 %2)
%9 = icmp eq i32 %8, 0
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = shl i32 %3, 24
%12 = ashr exact i32 %11, 24
%13 = tail call i32 (%struct.undostack*, i32, ...) bitcast (i32 (...)* @pushw to i32 (%struct.undostack*, i32, ...)*)(%struct.undostack* %0, i32 %12)
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %10, %7, %4
%17 = phi i32 [ 0, %7 ], [ 0, %4 ], [ %15, %10 ]
ret i32 %17
}