#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 XorrisO {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Xorriso_status(struct XorrisO *, char *,
                                  int /*<<< orphan*/ *, int);
scalar_t__ strcmp(char *, char *);
int Xorriso_option_status(struct XorrisO *xorriso, char *mode, int flag) {
  if (strcmp(mode, "short") == 0)
    Xorriso_status(xorriso, NULL, NULL, 1);
  else if (strcmp(mode, "long") == 0)
    Xorriso_status(xorriso, NULL, NULL, 0);
  else if (strcmp(mode, "long_history") == 0)
    Xorriso_status(xorriso, NULL, NULL, 8);
  else if (mode[0] == '-')
    Xorriso_status(xorriso, mode, NULL, 8);
  else
    Xorriso_status(xorriso, NULL, NULL, 1);
  return (1);
}


x86 assembly (clang, -O0):
<Xorriso_option_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1167 <Xorriso_option_status+0x47>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%ecx
mov    %rdx,%rsi
call   1040 <Xorriso_status@plt>
jmp    121b <Xorriso_option_status+0xfb>
mov    -0x10(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1198 <Xorriso_option_status+0x78>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
mov    %rdx,%rsi
call   1040 <Xorriso_status@plt>
jmp    1216 <Xorriso_option_status+0xf6>
mov    -0x10(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11cc <Xorriso_option_status+0xac>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x8,%ecx
mov    %rdx,%rsi
call   1040 <Xorriso_status@plt>
jmp    1211 <Xorriso_option_status+0xf1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11f7 <Xorriso_option_status+0xd7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x8,%ecx
call   1040 <Xorriso_status@plt>
jmp    120c <Xorriso_option_status+0xec>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%ecx
mov    %rdx,%rsi
call   1040 <Xorriso_status@plt>
jmp    1211 <Xorriso_option_status+0xf1>
jmp    1216 <Xorriso_option_status+0xf6>
jmp    121b <Xorriso_option_status+0xfb>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xorriso_option_status>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1173 <Xorriso_option_status+0x53>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1181 <Xorriso_option_status+0x61>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     118c <Xorriso_option_status+0x6c>
cmpb   $0x2d,(%rbx)
jne    1173 <Xorriso_option_status+0x53>
mov    %r14,%rdi
mov    %rbx,%rsi
jmp    1191 <Xorriso_option_status+0x71>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1198 <Xorriso_option_status+0x78>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1198 <Xorriso_option_status+0x78>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x8,%ecx
call   1040 <Xorriso_status@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.XorrisO = type { i32 }
@.str = [6 x i8] c"short\00"
@.str.1 = [5 x i8] c"long\00"
@.str.2 = [13 x i8] c"long_history\00"
define i32 @Xorriso_option_status(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = alloca %struct.XorrisO*
%5 = alloca i8*
%6 = alloca i32
store %struct.XorrisO* %0, %struct.XorrisO** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load %struct.XorrisO*, %struct.XorrisO** %4
%12 = call i32 @Xorriso_status(%struct.XorrisO* %11, i8* null, i32* null, i32 1)
br label %43
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load %struct.XorrisO*, %struct.XorrisO** %4
%19 = call i32 @Xorriso_status(%struct.XorrisO* %18, i8* null, i32* null, i32 0)
br label %42
20: ; preds = %13
%21 = load i8*, i8** %5
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load %struct.XorrisO*, %struct.XorrisO** %4
%26 = call i32 @Xorriso_status(%struct.XorrisO* %25, i8* null, i32* null, i32 8)
br label %41
27: ; preds = %20
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 45
br i1 %32, label %33, label %37
33: ; preds = %27
%34 = load %struct.XorrisO*, %struct.XorrisO** %4
%35 = load i8*, i8** %5
%36 = call i32 @Xorriso_status(%struct.XorrisO* %34, i8* %35, i32* null, i32 8)
br label %40
37: ; preds = %27
%38 = load %struct.XorrisO*, %struct.XorrisO** %4
%39 = call i32 @Xorriso_status(%struct.XorrisO* %38, i8* null, i32* null, i32 1)
br label %40
40: ; preds = %37, %33
br label %41
41: ; preds = %40, %24
br label %42
42: ; preds = %41, %17
br label %43
43: ; preds = %42, %10
ret i32 1
}

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
@.str = [6 x i8] c"short\00"
@.str.1 = [5 x i8] c"long\00"
@.str.2 = [13 x i8] c"long_history\00"
define i32 @Xorriso_option_status(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @Xorriso_status(%struct.XorrisO* %0, i8* null, i32* null, i32 1)
br label %25
8: ; preds = %3
%9 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @Xorriso_status(%struct.XorrisO* %0, i8* null, i32* null, i32 0)
br label %25
13: ; preds = %8
%14 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @Xorriso_status(%struct.XorrisO* %0, i8* null, i32* null, i32 8)
br label %25
18: ; preds = %13
%19 = load i8, i8* %1
%20 = icmp eq i8 %19, 45
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 @Xorriso_status(%struct.XorrisO* %0, i8* %1, i32* null, i32 8)
br label %25
23: ; preds = %18
%24 = tail call i32 @Xorriso_status(%struct.XorrisO* %0, i8* null, i32* null, i32 1)
br label %25
25: ; preds = %11, %21, %23, %16, %6
ret i32 1
}