#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 atoi(char const *);
int config_istrue(const char *val) {
  if (*val == 'T' || *val == 't')
    return 1;
  if (*val == '0' || *val == 'F' || *val == 'f')
    return 0;
  return atoi(val);
}


x86 assembly (clang, -O0):
<config_istrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x54,%eax
je     113c <config_istrue+0x2c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x74,%eax
jne    1148 <config_istrue+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1190 <config_istrue+0x80>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
je     1178 <config_istrue+0x68>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x46,%eax
je     1178 <config_istrue+0x68>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x66,%eax
jne    1184 <config_istrue+0x74>
movl   $0x0,-0x4(%rbp)
jmp    1190 <config_istrue+0x80>
mov    -0x10(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_istrue>:
mov    (%rdi),%cl
cmp    $0x53,%cl
jle    112d <config_istrue+0x1d>
mov    $0x1,%eax
cmp    $0x54,%cl
je     1139 <config_istrue+0x29>
cmp    $0x74,%cl
je     1139 <config_istrue+0x29>
cmp    $0x66,%cl
je     1137 <config_istrue+0x27>
jmp    113a <config_istrue+0x2a>
cmp    $0x30,%cl
je     1137 <config_istrue+0x27>
cmp    $0x46,%cl
jne    113a <config_istrue+0x2a>
xor    %eax,%eax
ret
jmp    1030 <atoi@plt>

LLVM IR (-O0):
define i32 @config_istrue(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 84
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 116
br i1 %12, label %13, label %14
13: ; preds = %8, %1
store i32 1, i32* %2
br label %33
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 48
br i1 %18, label %29, label %19
19: ; preds = %14
%20 = load i8*, i8** %3
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 70
br i1 %23, label %29, label %24
24: ; preds = %19
%25 = load i8*, i8** %3
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 102
br i1 %28, label %29, label %30
29: ; preds = %24, %19, %14
store i32 0, i32* %2
br label %33
30: ; preds = %24
%31 = load i8*, i8** %3
%32 = call i32 @atoi(i8* %31)
store i32 %32, i32* %2
br label %33
33: ; preds = %30, %29, %13
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @config_istrue(i8* nocapture %0) {
%2 = load i8, i8* %0
switch i8 %2, label %4 [
i8 84, label %6
i8 116, label %6
i8 48, label %3
i8 70, label %3
i8 102, label %3
]
3: ; preds = %1, %1, %1
br label %6
4: ; preds = %1
%5 = tail call i32 @atoi(i8* %0)
br label %6
6: ; preds = %1, %1, %4, %3
%7 = phi i32 [ 0, %3 ], [ %5, %4 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}