#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 cmd_group {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage_command_group(struct cmd_group const *, int,
                                       int /*<<< orphan*/);
void help_command_group(const struct cmd_group *grp, int argc, char **argv) {
  int full = 0;
  if (argc > 1) {
    if (!strcmp(argv[1], "--full"))
      full = 1;
  }
  usage_command_group(grp, full, 0);
}


x86 assembly (clang, -O0):
<help_command_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    116d <help_command_group+0x4d>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xead(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1168 <help_command_group+0x48>
movl   $0x1,-0x1c(%rbp)
jmp    116d <help_command_group+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
xor    %edx,%edx
call   1040 <usage_command_group@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_command_group>:
push   %rbx
mov    %esi,%eax
mov    %rdi,%rbx
xor    %esi,%esi
cmp    $0x2,%eax
jl     1145 <help_command_group+0x25>
mov    0x8(%rdx),%rdi
lea    0xec8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    %rbx,%rdi
xor    %edx,%edx
pop    %rbx
jmp    1040 <usage_command_group@plt>

LLVM IR (-O0):
%struct.cmd_group = type { i32 }
@.str = [7 x i8] c"--full\00"
define void @help_command_group(%struct.cmd_group* %0, i32 %1, i8** %2) {
%4 = alloca %struct.cmd_group*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store %struct.cmd_group* %0, %struct.cmd_group** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %10
store i32 1, i32* %7
br label %17
17: ; preds = %16, %10
br label %18
18: ; preds = %17, %3
%19 = load %struct.cmd_group*, %struct.cmd_group** %4
%20 = load i32, i32* %7
%21 = call i32 @usage_command_group(%struct.cmd_group* %19, i32 %20, i32 0)
ret void
}

LLVM IR (-O2):
%struct.cmd_group = type { i32 }
@.str = [7 x i8] c"--full\00"
define void @help_command_group(%struct.cmd_group* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %3
%12 = phi i32 [ 0, %3 ], [ %10, %5 ]
%13 = tail call i32 @usage_command_group(%struct.cmd_group* %0, i32 %12, i32 0)
ret void
}