#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 fd, 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    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    1170 <help_command_group+0x50>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeaa(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    116b <help_command_group+0x4b>
movl   $0x1,-0x1c(%rbp)
jmp    1170 <help_command_group+0x50>
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    %rdi,%rbx
xor    %esi,%esi
cmp    $0x2,%edx
jl     1143 <help_command_group+0x23>
mov    0x8(%rcx),%rdi
lea    0xeca(%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, i32 %2, i8** %3) {
%5 = alloca %struct.cmd_group*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
store %struct.cmd_group* %0, %struct.cmd_group** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
store i32 0, i32* %9
%10 = load i32, i32* %7
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %20
12: ; preds = %4
%13 = load i8**, i8*** %8
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %12
store i32 1, i32* %9
br label %19
19: ; preds = %18, %12
br label %20
20: ; preds = %19, %4
%21 = load %struct.cmd_group*, %struct.cmd_group** %5
%22 = load i32, i32* %9
%23 = call i32 @usage_command_group(%struct.cmd_group* %21, i32 %22, 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, i32 %2, i8** nocapture %3) {
%5 = icmp sgt i32 %2, 1
br i1 %5, label %6, label %12
6: ; preds = %4
%7 = getelementptr inbounds i8*, i8** %3, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ 0, %4 ], [ %11, %6 ]
%14 = tail call i32 @usage_command_group(%struct.cmd_group* %0, i32 %13, i32 0)
ret void
}