#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char const *);
int unqliteExportDemoVfs();
int unqlite_lib_config(int, int);
void unqlite_start(void) {
  int rc;
  const char *failVfsMsg = "Error in VFS configuration";
  const char *failPageSzMsg = "Error in setting PageSize";
  rc = unqlite_lib_config(6, unqliteExportDemoVfs());
  if (rc != 0) {
    puts(failVfsMsg);
    exit(0);
  }
  rc = unqlite_lib_config(8, 512);
  if (rc != 0) {
    puts(failPageSzMsg);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<unqlite_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xeb1(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <unqliteExportDemoVfs@plt>
mov    %eax,%esi
mov    $0x6,%edi
call   1040 <unqlite_lib_config@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     118e <unqlite_start+0x4e>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    $0x8,%edi
mov    $0x200,%esi
call   1040 <unqlite_lib_config@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11ba <unqlite_start+0x7a>
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unqlite_start>:
push   %rax
xor    %eax,%eax
call   1050 <unqliteExportDemoVfs@plt>
mov    $0x6,%edi
mov    %eax,%esi
call   1040 <unqlite_lib_config@plt>
test   %eax,%eax
jne    116d <unqlite_start+0x2d>
mov    $0x8,%edi
mov    $0x200,%esi
call   1040 <unqlite_lib_config@plt>
test   %eax,%eax
jne    1176 <unqlite_start+0x36>
pop    %rax
ret
lea    0xe8c(%rip),%rdi
jmp    117d <unqlite_start+0x3d>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Error in VFS configuration\00"
@.str.1 = [26 x i8] c"Error in setting PageSize\00"
define void @unqlite_start() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = call i32 (...) @unqliteExportDemoVfs()
%5 = call i32 @unqlite_lib_config(i32 6, i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = call i32 @puts(i8* %9)
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %0
%13 = call i32 @unqlite_lib_config(i32 8, i32 512)
store i32 %13, i32* %1
%14 = load i32, i32* %1
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i8*, i8** %3
%18 = call i32 @puts(i8* %17)
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Error in VFS configuration\00"
@.str.1 = [26 x i8] c"Error in setting PageSize\00"
define void @unqlite_start() {
%1 = tail call i32 (...) @unqliteExportDemoVfs()
%2 = tail call i32 @unqlite_lib_config(i32 6, i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = tail call i32 @unqlite_lib_config(i32 8, i32 512)
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @exit(i32 0)
unreachable
13: ; preds = %7
ret void
}