#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 /*<<< orphan*/ strcmp(char *, char *);
void uwsgi_opt_true(char *opt, char *value, void *key) {
  int *ptr = (int *)key;
  *ptr = 1;
  if (value) {
    if (!strcasecmp("false", value) || !strcasecmp("off", value) ||
        !strcasecmp("no", value) || !strcmp("0", value)) {
      *ptr = 0;
    }
  }
}


x86 assembly (clang, -O0):
<uwsgi_opt_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     11c4 <uwsgi_opt_true+0xa4>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
je     11b5 <uwsgi_opt_true+0x95>
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
je     11b5 <uwsgi_opt_true+0x95>
mov    -0x10(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
je     11b5 <uwsgi_opt_true+0x95>
mov    -0x10(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11bf <uwsgi_opt_true+0x9f>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
jmp    11c4 <uwsgi_opt_true+0xa4>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_opt_true>:
push   %r14
push   %rbx
push   %rax
movl   $0x1,(%rdx)
test   %rsi,%rsi
je     1185 <uwsgi_opt_true+0x65>
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xec4(%rip),%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     117e <uwsgi_opt_true+0x5e>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     117e <uwsgi_opt_true+0x5e>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     117e <uwsgi_opt_true+0x5e>
lea    0xe9b(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1185 <uwsgi_opt_true+0x65>
movl   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"false\00"
@.str.1 = [4 x i8] c"off\00"
@.str.2 = [3 x i8] c"no\00"
@.str.3 = [2 x i8] c"0\00"
define void @uwsgi_opt_true(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
store i32 1, i32* %10
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %32
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = call i32 @strcasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = load i8*, i8** %5
%19 = call i32 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = load i8*, i8** %5
%23 = call i32 @strcasecmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i8*, i8** %5
%27 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %26)
%28 = icmp ne i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %25, %21, %17, %13
%30 = load i32*, i32** %7
store i32 0, i32* %30
br label %31
31: ; preds = %29, %25
br label %32
32: ; preds = %31, %3
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [4 x i8] c"off\00"
@.str.2 = [3 x i8] c"no\00"
@.str.3 = [2 x i8] c"0\00"
define void @uwsgi_opt_true(i8* nocapture readnone %0, i8* %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i32*
store i32 1, i32* %4
%5 = icmp eq i8* %1, null
br i1 %5, label %19, label %6
6: ; preds = %3
%7 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%11 = icmp eq i32 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%14 = icmp eq i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15, %12, %9, %6
store i32 0, i32* %4
br label %19
19: ; preds = %15, %18, %3
ret void
}