#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*/ dbg_set_maxlevel(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ main_switch_test(int, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int num_var = argc - 1;
  char **ptr_var = argv + 1;
  if ((num_var > 1) && (ptr_var[0][0] == '@')) {
    dbg_set_maxlevel(10);
    num_var--;
    ptr_var++;
  }
  fprintf(stderr, "\n");
  main_switch_test(num_var, ptr_var);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x14(%rbp)
jle    1197 <main+0x67>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    1197 <main+0x67>
mov    $0xa,%edi
call   1040 <dbg_set_maxlevel@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xe59(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <main_switch_test@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebp
lea    -0x1(%rbp),%r14d
lea    0x8(%rsi),%r15
cmp    $0x3,%edi
jl     1168 <main+0x38>
mov    (%r15),%rax
cmpb   $0x40,(%rax)
jne    1168 <main+0x38>
mov    %rsi,%rbx
mov    $0xa,%edi
call   1040 <dbg_set_maxlevel@plt>
add    $0xfffffffe,%ebp
add    $0x10,%rbx
mov    %ebp,%r14d
mov    %rbx,%r15
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xe88(%rip),%rsi
call   1050 <fprintf@plt>
mov    %r14d,%edi
mov    %r15,%rsi
call   1030 <main_switch_test@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %6
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
store i8** %11, i8*** %7
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %28
14: ; preds = %2
%15 = load i8**, i8*** %7
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 64
br i1 %21, label %22, label %28
22: ; preds = %14
%23 = call i32 @dbg_set_maxlevel(i32 10)
%24 = load i32, i32* %6
%25 = add nsw i32 %24, -1
store i32 %25, i32* %6
%26 = load i8**, i8*** %7
%27 = getelementptr inbounds i8*, i8** %26, i32 1
store i8** %27, i8*** %7
br label %28
28: ; preds = %22, %14, %2
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = load i32, i32* %6
%32 = load i8**, i8*** %7
%33 = call i32 @main_switch_test(i32 %31, i8** %32)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = add nsw i32 %0, -1
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = icmp sgt i32 %0, 2
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 64
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = tail call i32 @dbg_set_maxlevel(i32 10)
%12 = add nsw i32 %0, -2
%13 = getelementptr inbounds i8*, i8** %1, i64 2
br label %14
14: ; preds = %10, %6, %2
%15 = phi i32 [ %12, %10 ], [ %3, %6 ], [ %3, %2 ]
%16 = phi i8** [ %13, %10 ], [ %4, %6 ], [ %4, %2 ]
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @main_switch_test(i32 %15, i8** %16)
ret i32 1
}