int make_remove_command(argc, argv, bpp, lenp)
int argc, *lenp;
char **argv, **bpp;
{
  int argc_passed = 0, passed;
  if (argc == 0) {
    warnx("make_remove_command: command is too short");
    return (-1);
  }
  if (strcmp(argv[0], "binding") == 0) {
    if (put32(bpp, lenp, 1))
      goto fail;
    if ((passed = make_binding_object(argc - 1, argv + 1, bpp, lenp)) < 0) {
      return (-1);
    }
    argc_passed += passed;
  } else {
    warnx("remove target not supported: %s", argv[0]);
    return (-1);
  }
  argc_passed++;
  return (argc_passed);
fail:
  warnx("make_remove_command failed");
  return (-1);
}


x86 assembly (clang, -O0):
<make_remove_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1182 <make_remove_command+0x42>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <warnx@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    124d <make_remove_command+0x10d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe9a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1203 <make_remove_command+0xc3>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <put32@plt>
cmp    $0x0,%eax
je     11c0 <make_remove_command+0x80>
jmp    1238 <make_remove_command+0xf8>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1060 <make_binding_object@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
jge    11f5 <make_remove_command+0xb5>
movl   $0xffffffff,-0x4(%rbp)
jmp    124d <make_remove_command+0x10d>
mov    -0x28(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1224 <make_remove_command+0xe4>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <warnx@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    124d <make_remove_command+0x10d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    124d <make_remove_command+0x10d>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <warnx@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_remove_command>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
je     1180 <make_remove_command+0x40>
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %edi,%ebp
mov    (%rsi),%rbx
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1189 <make_remove_command+0x49>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <warnx@plt>
jmp    11ad <make_remove_command+0x6d>
lea    0xe79(%rip),%rdi
jmp    11a6 <make_remove_command+0x66>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <put32@plt>
test   %eax,%eax
je     11bb <make_remove_command+0x7b>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1030 <warnx@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xffffffff,%ebp
add    $0x8,%r12
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1060 <make_binding_object@plt>
lea    0x1(%rax),%ecx
test   %eax,%eax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
jmp    11b2 <make_remove_command+0x72>

LLVM IR (-O0):
@.str = [42 x i8] c"make_remove_command: command is too short\00"
@.str.1 = [8 x i8] c"binding\00"
@.str.2 = [32 x i8] c"remove target not supported: %s\00"
@.str.3 = [27 x i8] c"make_remove_command failed\00"
define i32 @make_remove_command(i32 %0, i8** %1, i8** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8** %2, i8*** %8
store i32* %3, i32** %9
store i32 0, i32* %10
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
br label %53
16: ; preds = %4
%17 = load i8**, i8*** %7
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %42
22: ; preds = %16
%23 = load i8**, i8*** %8
%24 = load i32*, i32** %9
%25 = call i32 (i8**, i32*, i32, ...) bitcast (i32 (...)* @put32 to i32 (i8**, i32*, i32, ...)*)(i8** %23, i32* %24, i32 1)
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %22
br label %51
28: ; preds = %22
%29 = load i32, i32* %6
%30 = sub nsw i32 %29, 1
%31 = load i8**, i8*** %7
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8**, i8*** %8
%34 = load i32*, i32** %9
%35 = call i32 (i32, i8**, i8**, i32*, ...) bitcast (i32 (...)* @make_binding_object to i32 (i32, i8**, i8**, i32*, ...)*)(i32 %30, i8** %32, i8** %33, i32* %34)
store i32 %35, i32* %11
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %28
store i32 -1, i32* %5
br label %53
38: ; preds = %28
%39 = load i32, i32* %11
%40 = load i32, i32* %10
%41 = add nsw i32 %40, %39
store i32 %41, i32* %10
br label %47
42: ; preds = %16
%43 = load i8**, i8*** %7
%44 = getelementptr inbounds i8*, i8** %43, i64 0
%45 = load i8*, i8** %44
%46 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %45)
store i32 -1, i32* %5
br label %53
47: ; preds = %38
%48 = load i32, i32* %10
%49 = add nsw i32 %48, 1
store i32 %49, i32* %10
%50 = load i32, i32* %10
store i32 %50, i32* %5
br label %53
51: ; preds = %27
%52 = call i32 (i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %5
br label %53
53: ; preds = %51, %47, %42, %37, %14
%54 = load i32, i32* %5
ret i32 %54
}

LLVM IR (-O2):
@.str = [42 x i8] c"make_remove_command: command is too short\00"
@.str.1 = [8 x i8] c"binding\00"
@.str.2 = [32 x i8] c"remove target not supported: %s\00"
@.str.3 = [27 x i8] c"make_remove_command failed\00"
define i32 @make_remove_command(i32 %0, i8** %1, i8** %2, i32* %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %26
8: ; preds = %4
%9 = load i8*, i8** %1
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = tail call i32 (i8**, i32*, i32, ...) bitcast (i32 (...)* @put32 to i32 (i8**, i32*, i32, ...)*)(i8** %2, i32* %3, i32 1)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = add nsw i32 %0, -1
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = tail call i32 (i32, i8**, i8**, i32*, ...) bitcast (i32 (...)* @make_binding_object to i32 (i32, i8**, i8**, i32*, ...)*)(i32 %16, i8** %17, i8** %2, i32* %3)
%19 = add nsw i32 %18, 1
%20 = icmp sgt i32 %18, -1
%21 = select i1 %20, i32 %19, i32 -1
br label %26
22: ; preds = %8
%23 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %9)
br label %26
24: ; preds = %12
%25 = tail call i32 (i8*, ...) bitcast (i32 (...)* @warnx to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %15, %24, %22, %6
%27 = phi i32 [ -1, %6 ], [ -1, %24 ], [ -1, %22 ], [ %21, %15 ]
ret i32 %27
}