#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*/ showConditions();
int /*<<< orphan*/ showWarranty();
int /*<<< orphan*/ strcmp(char *, char *);
void executeGpl(int nargs, char *command, char option) {
  switch (nargs) {
  case 2:
    if (!strcmp(command, "show")) {
      if (option == 'w')
        showWarranty();
      else if (option == 'c')
        showConditions();
    }
    break;
  }
}


x86 assembly (clang, -O0):
<executeGpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
jne    11aa <executeGpl+0x7a>
jmp    1155 <executeGpl+0x25>
mov    -0x10(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11a5 <executeGpl+0x75>
movsbl -0x11(%rbp),%eax
cmp    $0x77,%eax
jne    1187 <executeGpl+0x57>
mov    $0x0,%al
call   1030 <showWarranty@plt>
jmp    11a0 <executeGpl+0x70>
movsbl -0x11(%rbp),%eax
cmp    $0x63,%eax
jne    119b <executeGpl+0x6b>
mov    $0x0,%al
call   1050 <showConditions@plt>
jmp    11a0 <executeGpl+0x70>
jmp    11a5 <executeGpl+0x75>
jmp    11aa <executeGpl+0x7a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<executeGpl>:
push   %rbx
cmp    $0x2,%edi
jne    114e <executeGpl+0x1e>
mov    %edx,%ebx
lea    0xec1(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1150 <executeGpl+0x20>
pop    %rbx
ret
cmp    $0x63,%bl
je     1162 <executeGpl+0x32>
cmp    $0x77,%bl
jne    114e <executeGpl+0x1e>
xor    %eax,%eax
pop    %rbx
jmp    1030 <showWarranty@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <showConditions@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"show\00"
define void @executeGpl(i32 %0, i8* %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%7 = load i32, i32* %4
switch i32 %7, label %27 [
i32 2, label %8
]
8: ; preds = %3
%9 = load i8*, i8** %5
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %26, label %12
12: ; preds = %8
%13 = load i8, i8* %6
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 119
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @showWarranty()
br label %25
18: ; preds = %12
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 99
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (...) @showConditions()
br label %24
24: ; preds = %22, %18
br label %25
25: ; preds = %24, %16
br label %26
26: ; preds = %25, %8
br label %27
27: ; preds = %3, %26
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"show\00"
define void @executeGpl(i32 %0, i8* nocapture %1, i8 signext %2) {
%4 = icmp eq i32 %0, 2
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
switch i8 %2, label %13 [
i8 119, label %9
i8 99, label %11
]
9: ; preds = %8
%10 = tail call i32 (...) @showWarranty()
br label %13
11: ; preds = %8
%12 = tail call i32 (...) @showConditions()
br label %13
13: ; preds = %8, %5, %11, %9, %3
ret void
}