#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*/ strcasecmp(char *, char *);
int _parse_library_separated(char *arg, int *LIBRARY_SEPARATED) {
  if (!strcasecmp(arg, "all"))
    *LIBRARY_SEPARATED = 0;
  else if (!strcasecmp(arg, "sep"))
    *LIBRARY_SEPARATED = 1;
  else
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<_parse_library_separated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1148 <_parse_library_separated+0x38>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1181 <_parse_library_separated+0x71>
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1170 <_parse_library_separated+0x60>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    117c <_parse_library_separated+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    1188 <_parse_library_separated+0x78>
jmp    1181 <_parse_library_separated+0x71>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_parse_library_separated>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1148 <_parse_library_separated+0x38>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
jne    114d <_parse_library_separated+0x3d>
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
@.str.1 = [4 x i8] c"sep\00"
define i32 @_parse_library_separated(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
%6 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = load i32*, i32** %5
store i32 0, i32* %10
br label %19
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 @strcasecmp(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %11
%16 = load i32*, i32** %5
store i32 1, i32* %16
br label %18
17: ; preds = %11
store i32 1, i32* %3
br label %20
18: ; preds = %15
br label %19
19: ; preds = %18, %9
store i32 0, i32* %3
br label %20
20: ; preds = %19, %17
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
@.str.1 = [4 x i8] c"sep\00"
define i32 @_parse_library_separated(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5, %2
%9 = phi i32 [ 0, %2 ], [ 1, %5 ]
store i32 %9, i32* %1
br label %10
10: ; preds = %5, %8
%11 = phi i32 [ 0, %8 ], [ 1, %5 ]
ret i32 %11
}