#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int g_logv(char *p) {
  switch (*p) {
  case 0:
  case '1':
  case 'y':
  case 'Y':
  case 't':
  case 'T':
    return 1;
  case '0':
  case 'n':
  case 'N':
  case 'f':
  case 'F':
    break;
  default:
    fprintf(stderr, "++++ Unknown logical '%s' - false assumed\n", p);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<g_logv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     11dd <g_logv+0xcd>
jmp    1133 <g_logv+0x23>
mov    -0x14(%rbp),%eax
sub    $0x30,%eax
je     11e9 <g_logv+0xd9>
jmp    1144 <g_logv+0x34>
mov    -0x14(%rbp),%eax
sub    $0x31,%eax
je     11dd <g_logv+0xcd>
jmp    1155 <g_logv+0x45>
mov    -0x14(%rbp),%eax
sub    $0x46,%eax
je     11e9 <g_logv+0xd9>
jmp    1166 <g_logv+0x56>
mov    -0x14(%rbp),%eax
sub    $0x4e,%eax
je     11e9 <g_logv+0xd9>
jmp    1177 <g_logv+0x67>
mov    -0x14(%rbp),%eax
sub    $0x54,%eax
je     11dd <g_logv+0xcd>
jmp    1188 <g_logv+0x78>
mov    -0x14(%rbp),%eax
sub    $0x59,%eax
je     11dd <g_logv+0xcd>
jmp    1199 <g_logv+0x89>
mov    -0x14(%rbp),%eax
sub    $0x66,%eax
je     11e9 <g_logv+0xd9>
jmp    11aa <g_logv+0x9a>
mov    -0x14(%rbp),%eax
sub    $0x6e,%eax
je     11e9 <g_logv+0xd9>
jmp    11bb <g_logv+0xab>
mov    -0x14(%rbp),%eax
sub    $0x74,%eax
je     11dd <g_logv+0xcd>
jmp    11cc <g_logv+0xbc>
mov    -0x14(%rbp),%eax
sub    $0x79,%eax
jne    11ee <g_logv+0xde>
jmp    11dd <g_logv+0xcd>
movl   $0x1,-0x4(%rbp)
jmp    120e <g_logv+0xfe>
jmp    1207 <g_logv+0xf7>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xdfe(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_logv>:
push   %rax
mov    %rdi,%rdx
movsbl (%rdi),%ecx
mov    $0x1,%eax
lea    -0x30(%rcx),%esi
cmp    $0x49,%esi
ja     1138 <g_logv+0x28>
lea    0xed5(%rip),%rcx
movslq (%rcx,%rsi,4),%rsi
add    %rcx,%rsi
jmp    *%rsi
xor    %eax,%eax
pop    %rcx
ret
test   %ecx,%ecx
je     1136 <g_logv+0x26>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xfdc(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1134 <g_logv+0x24>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"++++ Unknown logical '%s' - false assumed\0A\00"
define i32 @g_logv(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
switch i32 %6, label %9 [
i32 0, label %7
i32 49, label %7
i32 121, label %7
i32 89, label %7
i32 116, label %7
i32 84, label %7
i32 48, label %8
i32 110, label %8
i32 78, label %8
i32 102, label %8
i32 70, label %8
]
7: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %14
8: ; preds = %1, %1, %1, %1, %1
br label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %3
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"++++ Unknown logical '%s' - false assumed\0A\00"
define i32 @g_logv(i8* %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %4 [
i32 0, label %8
i32 49, label %8
i32 121, label %8
i32 89, label %8
i32 116, label %8
i32 84, label %8
i32 48, label %7
i32 110, label %7
i32 78, label %7
i32 102, label %7
i32 70, label %7
]
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %1, %1, %1, %1, %1, %4
br label %8
8: ; preds = %1, %1, %1, %1, %1, %1, %7
%9 = phi i32 [ 0, %7 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %9
}