#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*/ error_exit(int /*<<< orphan*/, char *, char const *,
                              char const *, int);
scalar_t__ strcasecmp(char const *, char *);
char parse_false_true(const char *value_in, const char *subject, int line) {
  if (strcasecmp(value_in, "YES") == 0 || strcasecmp(value_in, "JA") == 0 ||
      strcasecmp(value_in, "TRUE") == 0 || strcasecmp(value_in, "ON") == 0 ||
      strcasecmp(value_in, "1") == 0) {
    return 1;
  } else if (strcasecmp(value_in, "NO") == 0 ||
             strcasecmp(value_in, "NEE") == 0 ||
             strcasecmp(value_in, "FALSE") == 0 ||
             strcasecmp(value_in, "OFF") == 0 ||
             strcasecmp(value_in, "0") == 0) {
    return 0;
  }
  error_exit(0, "%s requires either 'true' or 'false', not '%s' (line %d)",
             subject, value_in, line);
  return 0;
}


x86 assembly (clang, -O0):
<parse_false_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     11b5 <parse_false_true+0x95>
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     11b5 <parse_false_true+0x95>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     11b5 <parse_false_true+0x95>
mov    -0x10(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     11b5 <parse_false_true+0x95>
mov    -0x10(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    11be <parse_false_true+0x9e>
movb   $0x1,-0x1(%rbp)
jmp    126c <parse_false_true+0x14c>
mov    -0x10(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1240 <parse_false_true+0x120>
mov    -0x10(%rbp),%rdi
lea    0xe31(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1240 <parse_false_true+0x120>
mov    -0x10(%rbp),%rdi
lea    0xe1b(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1240 <parse_false_true+0x120>
mov    -0x10(%rbp),%rdi
lea    0xe07(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1240 <parse_false_true+0x120>
mov    -0x10(%rbp),%rdi
lea    0xdf1(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1249 <parse_false_true+0x129>
movb   $0x0,-0x1(%rbp)
jmp    126c <parse_false_true+0x14c>
jmp    124e <parse_false_true+0x12e>
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %edi,%edi
lea    0xdc1(%rip),%rsi
call   1040 <error_exit@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_false_true>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec9(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    $0x1,%bpl
test   %rax,%rax
je     1229 <parse_false_true+0x109>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1229 <parse_false_true+0x109>
lea    0xea0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1229 <parse_false_true+0x109>
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1229 <parse_false_true+0x109>
lea    0xe78(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1229 <parse_false_true+0x109>
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1227 <parse_false_true+0x107>
lea    0xe51(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1227 <parse_false_true+0x107>
lea    0xe41(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1227 <parse_false_true+0x107>
lea    0xe33(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1227 <parse_false_true+0x107>
lea    0xe23(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1227 <parse_false_true+0x107>
lea    0xe11(%rip),%rsi
xor    %ebp,%ebp
xor    %edi,%edi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
call   1040 <error_exit@plt>
jmp    1229 <parse_false_true+0x109>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"JA\00"
@.str.2 = [5 x i8] c"TRUE\00"
@.str.3 = [3 x i8] c"ON\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [3 x i8] c"NO\00"
@.str.6 = [4 x i8] c"NEE\00"
@.str.7 = [6 x i8] c"FALSE\00"
@.str.8 = [4 x i8] c"OFF\00"
@.str.9 = [2 x i8] c"0\00"
@.str.10 = [57 x i8] c"%s requires either 'true' or 'false', not '%s' (line %d)\00"
define signext i8 @parse_false_true(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = call i64 @strcasecmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %27, label %11
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = call i64 @strcasecmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i8*, i8** %5
%17 = call i64 @strcasecmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = load i8*, i8** %5
%21 = call i64 @strcasecmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = load i8*, i8** %5
%25 = call i64 @strcasecmp(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23, %19, %15, %11, %3
store i8 1, i8* %4
br label %55
28: ; preds = %23
%29 = load i8*, i8** %5
%30 = call i64 @strcasecmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %48, label %32
32: ; preds = %28
%33 = load i8*, i8** %5
%34 = call i64 @strcasecmp(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %48, label %36
36: ; preds = %32
%37 = load i8*, i8** %5
%38 = call i64 @strcasecmp(i8* %37, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %48, label %40
40: ; preds = %36
%41 = load i8*, i8** %5
%42 = call i64 @strcasecmp(i8* %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %48, label %44
44: ; preds = %40
%45 = load i8*, i8** %5
%46 = call i64 @strcasecmp(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %44, %40, %36, %32, %28
store i8 0, i8* %4
br label %55
49: ; preds = %44
br label %50
50: ; preds = %49
%51 = load i8*, i8** %6
%52 = load i8*, i8** %5
%53 = load i32, i32* %7
%54 = call i32 @error_exit(i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0), i8* %51, i8* %52, i32 %53)
store i8 0, i8* %4
br label %55
55: ; preds = %50, %48, %27
%56 = load i8, i8* %4
ret i8 %56
}

LLVM IR (-O2):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"JA\00"
@.str.2 = [5 x i8] c"TRUE\00"
@.str.3 = [3 x i8] c"ON\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [3 x i8] c"NO\00"
@.str.6 = [4 x i8] c"NEE\00"
@.str.7 = [6 x i8] c"FALSE\00"
@.str.8 = [4 x i8] c"OFF\00"
@.str.9 = [2 x i8] c"0\00"
@.str.10 = [57 x i8] c"%s requires either 'true' or 'false', not '%s' (line %d)\00"
define signext i8 @parse_false_true(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %35, label %6
6: ; preds = %3
%7 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %35, label %9
9: ; preds = %6
%10 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %35, label %12
12: ; preds = %9
%13 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %35, label %15
15: ; preds = %12
%16 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %35, label %18
18: ; preds = %15
%19 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %35, label %21
21: ; preds = %18
%22 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %35, label %24
24: ; preds = %21
%25 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %35, label %27
27: ; preds = %24
%28 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %35, label %30
30: ; preds = %27
%31 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 @error_exit(i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0), i8* %1, i8* %0, i32 %2)
br label %35
35: ; preds = %18, %21, %24, %27, %30, %3, %6, %9, %12, %15, %33
%36 = phi i8 [ 0, %33 ], [ 1, %15 ], [ 1, %12 ], [ 1, %9 ], [ 1, %6 ], [ 1, %3 ], [ 0, %30 ], [ 0, %27 ], [ 0, %24 ], [ 0, %21 ], [ 0, %18 ]
ret i8 %36
}