#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*/ assert(void *);
int parse_boolean(char const *);
int config_parse_bool(const char *filename, unsigned line, const char *section,
                      const char *lvalue, int ltype, const char *rvalue,
                      void *data) {
  int k;
  bool *b = data;
  assert(filename);
  assert(lvalue);
  assert(rvalue);
  assert(data);
  k = parse_boolean(rvalue);
  if (k < 0)
    return 0;
  *b = !!k;
  return 0;
}


x86 assembly (clang, -O0):
<config_parse_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9,-0x38(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x28(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x38(%rbp),%rdi
call   1030 <assert@plt>
mov    0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x38(%rbp),%rdi
call   1040 <parse_boolean@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jge    1191 <config_parse_bool+0x71>
movl   $0x0,-0x4(%rbp)
jmp    11ae <config_parse_bool+0x8e>
cmpl   $0x0,-0x3c(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x48(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_parse_bool>:
push   %r15
push   %r14
push   %rbx
mov    %r9,%rbx
mov    %rcx,%r15
mov    0x20(%rsp),%r14
call   1030 <assert@plt>
mov    %r15,%rdi
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1030 <assert@plt>
mov    %r14,%rdi
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <parse_boolean@plt>
test   %eax,%eax
js     1162 <config_parse_bool+0x42>
setne  %al
movzbl %al,%eax
mov    %eax,(%r14)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @config_parse_bool(i8* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i8* %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32*
store i8* %0, i8** %9
store i32 %1, i32* %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32 %4, i32* %13
store i8* %5, i8** %14
store i8* %6, i8** %15
%18 = load i8*, i8** %15
%19 = bitcast i8* %18 to i32*
store i32* %19, i32** %17
%20 = load i8*, i8** %9
%21 = call i32 @assert(i8* %20)
%22 = load i8*, i8** %12
%23 = call i32 @assert(i8* %22)
%24 = load i8*, i8** %14
%25 = call i32 @assert(i8* %24)
%26 = load i8*, i8** %15
%27 = call i32 @assert(i8* %26)
%28 = load i8*, i8** %14
%29 = call i32 @parse_boolean(i8* %28)
store i32 %29, i32* %16
%30 = load i32, i32* %16
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %7
store i32 0, i32* %8
br label %40
33: ; preds = %7
%34 = load i32, i32* %16
%35 = icmp ne i32 %34, 0
%36 = xor i1 %35, true
%37 = xor i1 %36, true
%38 = zext i1 %37 to i32
%39 = load i32*, i32** %17
store i32 %38, i32* %39
store i32 0, i32* %8
br label %40
40: ; preds = %33, %32
%41 = load i32, i32* %8
ret i32 %41
}

LLVM IR (-O2):
define i32 @config_parse_bool(i8* %0, i32 %1, i8* nocapture readnone %2, i8* %3, i32 %4, i8* %5, i8* %6) {
%8 = tail call i32 @assert(i8* %0)
%9 = tail call i32 @assert(i8* %3)
%10 = tail call i32 @assert(i8* %5)
%11 = tail call i32 @assert(i8* %6)
%12 = tail call i32 @parse_boolean(i8* %5)
%13 = icmp slt i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %7
%15 = bitcast i8* %6 to i32*
%16 = icmp ne i32 %12, 0
%17 = zext i1 %16 to i32
store i32 %17, i32* %15
br label %18
18: ; preds = %7, %14
ret i32 0
}