#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*/ build_prj(char **);
int /*<<< orphan*/ clean_prj(char **);
int /*<<< orphan*/ generic_cmd(char **);
int process_params(char *params[]) {
  int i;
  for (i = 0; i < 'z' - 'a' + 1; i++) {
    if (params[i] != NULL) {
      switch ('a' + i) {
      case 'b':
        build_prj(params);
        break;
      case 'c':
        clean_prj(params);
        break;
      case 'g':
        generic_cmd(params);
        break;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<process_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    11d6 <process_params+0xa6>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11c3 <process_params+0x93>
mov    -0xc(%rbp),%eax
add    $0x61,%eax
mov    %eax,-0x10(%rbp)
sub    $0x62,%eax
je     1199 <process_params+0x69>
jmp    1177 <process_params+0x47>
mov    -0x10(%rbp),%eax
sub    $0x63,%eax
je     11a7 <process_params+0x77>
jmp    1188 <process_params+0x58>
mov    -0x10(%rbp),%eax
sub    $0x67,%eax
je     11b5 <process_params+0x85>
jmp    11be <process_params+0x8e>
mov    -0x8(%rbp),%rdi
call   1050 <build_prj@plt>
jmp    11be <process_params+0x8e>
mov    -0x8(%rbp),%rdi
call   1030 <clean_prj@plt>
jmp    11be <process_params+0x8e>
mov    -0x8(%rbp),%rdi
call   1040 <generic_cmd@plt>
jmp    11c3 <process_params+0x93>
jmp    11c8 <process_params+0x98>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <process_params+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_params>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
jmp    115a <process_params+0x2a>
mov    %r14,%rdi
call   1030 <clean_prj@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x1a,%rbx
je     1184 <process_params+0x54>
cmpq   $0x0,(%r14,%rbx,8)
je     1150 <process_params+0x20>
cmp    $0x6,%ebx
je     117a <process_params+0x4a>
cmp    $0x2,%ebx
je     113b <process_params+0xb>
cmp    $0x1,%ebx
jne    1150 <process_params+0x20>
mov    %r14,%rdi
call   1050 <build_prj@plt>
jmp    1150 <process_params+0x20>
mov    %r14,%rdi
call   1040 <generic_cmd@plt>
jmp    1150 <process_params+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @process_params(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %28, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 26
br i1 %6, label %7, label %31
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %27
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 97, %15
switch i32 %16, label %26 [
i32 98, label %17
i32 99, label %20
i32 103, label %23
]
17: ; preds = %14
%18 = load i8**, i8*** %2
%19 = call i32 @build_prj(i8** %18)
br label %26
20: ; preds = %14
%21 = load i8**, i8*** %2
%22 = call i32 @clean_prj(i8** %21)
br label %26
23: ; preds = %14
%24 = load i8**, i8*** %2
%25 = call i32 @generic_cmd(i8** %24)
br label %26
26: ; preds = %14, %23, %20, %17
br label %27
27: ; preds = %26, %7
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %4
31: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @process_params(i8** %0) {
br label %2
2: ; preds = %1, %15
%3 = phi i64 [ 0, %1 ], [ %16, %15 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %15, label %7
7: ; preds = %2
%8 = trunc i64 %3 to i32
switch i32 %8, label %15 [
i32 1, label %9
i32 2, label %11
i32 6, label %13
]
9: ; preds = %7
%10 = tail call i32 @build_prj(i8** %0)
br label %15
11: ; preds = %7
%12 = tail call i32 @clean_prj(i8** %0)
br label %15
13: ; preds = %7
%14 = tail call i32 @generic_cmd(i8** %0)
br label %15
15: ; preds = %2, %7, %13, %11, %9
%16 = add nuw nsw i64 %3, 1
%17 = icmp eq i64 %16, 26
br i1 %17, label %18, label %2
18: ; preds = %15
ret i32 0
}