#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cli_error(struct cli_def *, char *);
int /*<<< orphan*/ cli_int_buildmode_reset_unset_help(struct cli_def *);
int cli_int_buildmode_cmd_cback(struct cli_def *cli, const char *command,
                                char *argv[], int argc) {
  int rc = -10;
  if (argc) {
    cli_error(cli, "Extra arguments on command line, command ignored.");
    rc = -1;
  }
  cli_int_buildmode_reset_unset_help(cli);
  return rc;
}


x86 assembly (clang, -O0):
<cli_int_buildmode_cmd_cback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0xfffffff6,-0x20(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     115f <cli_int_buildmode_cmd_cback+0x3f>
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1030 <cli_error@plt>
movl   $0xffffffff,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cli_int_buildmode_reset_unset_help@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_int_buildmode_cmd_cback>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %ecx,%ecx
je     1140 <cli_int_buildmode_cmd_cback+0x20>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <cli_error@plt>
mov    $0xffffffff,%ebp
jmp    1145 <cli_int_buildmode_cmd_cback+0x25>
mov    $0xfffffff6,%ebp
mov    %rbx,%rdi
call   1040 <cli_int_buildmode_reset_unset_help@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.cli_def = type { i32 }
@.str = [50 x i8] c"Extra arguments on command line, command ignored.\00"
define i32 @cli_int_buildmode_cmd_cback(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = alloca %struct.cli_def*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store %struct.cli_def* %0, %struct.cli_def** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
store i32 -10, i32* %9
%10 = load i32, i32* %8
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load %struct.cli_def*, %struct.cli_def** %5
%14 = call i32 @cli_error(%struct.cli_def* %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %9
br label %15
15: ; preds = %12, %4
%16 = load %struct.cli_def*, %struct.cli_def** %5
%17 = call i32 @cli_int_buildmode_reset_unset_help(%struct.cli_def* %16)
%18 = load i32, i32* %9
ret i32 %18
}

LLVM IR (-O2):
%struct.cli_def = type { i32 }
@.str = [50 x i8] c"Extra arguments on command line, command ignored.\00"
define i32 @cli_int_buildmode_cmd_cback(%struct.cli_def* %0, i8* nocapture readnone %1, i8** nocapture readnone %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @cli_error(%struct.cli_def* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ -1, %6 ], [ -10, %4 ]
%10 = tail call i32 @cli_int_buildmode_reset_unset_help(%struct.cli_def* %0)
ret i32 %9
}