#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 */

/* Variables and functions */
int /*<<< orphan*/ alsaucm_test_cmd_svr();
int /*<<< orphan*/ print_help_menu();
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *help_str = "help";
  argc--;
  argv++;
  if (argc > 0) {
    if (!strncmp(argv[0], help_str, strlen(argv[0])))
      print_help_menu();
  } else
    alsaucm_test_cmd_svr();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    11c3 <main+0x83>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11be <main+0x7e>
mov    $0x0,%al
call   1050 <print_help_menu@plt>
jmp    11ca <main+0x8a>
mov    $0x0,%al
call   1060 <alsaucm_test_cmd_svr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     1170 <main+0x30>
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1177 <main+0x37>
xor    %eax,%eax
call   1050 <print_help_menu@plt>
jmp    1177 <main+0x37>
xor    %eax,%eax
call   1060 <alsaucm_test_cmd_svr@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"help\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i32 1
store i8** %10, i8*** %5
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %27
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = load i8*, i8** %6
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @strlen(i8* %20)
%22 = call i32 @strncmp(i8* %16, i8* %17, i32 %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %13
%25 = call i32 (...) @print_help_menu()
br label %26
26: ; preds = %24, %13
br label %29
27: ; preds = %2
%28 = call i32 (...) @alsaucm_test_cmd_svr()
br label %29
29: ; preds = %27, %26
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"help\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strlen(i8* %6)
%8 = tail call i32 @strncmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = tail call i32 (...) @print_help_menu()
br label %14
12: ; preds = %2
%13 = tail call i32 (...) @alsaucm_test_cmd_svr()
br label %14
14: ; preds = %4, %10, %12
ret i32 0
}