#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 */
unsigned char *print_byte_range(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ print_decode_line(unsigned char *, int, int, char *);
int /*<<< orphan*/ printf(char *);
void print_db_header(void) {
  unsigned char *aData;
  aData = print_byte_range(0, 100, 0);
  printf("Decoded:\n");
  print_decode_line(aData, 16, 2, "Database page size");
  print_decode_line(aData, 18, 1, "File format write version");
  print_decode_line(aData, 19, 1, "File format read version");
  print_decode_line(aData, 20, 1, "Reserved space at end of page");
  print_decode_line(aData, 24, 4, "File change counter");
  print_decode_line(aData, 28, 4, "Size of database in pages");
  print_decode_line(aData, 32, 4, "Page number of first freelist page");
  print_decode_line(aData, 36, 4, "Number of freelist pages");
  print_decode_line(aData, 40, 4, "Schema cookie");
  print_decode_line(aData, 44, 4, "Schema format version");
  print_decode_line(aData, 48, 4, "Default page cache size");
  print_decode_line(aData, 52, 4, "Largest auto-vac root page");
  print_decode_line(aData, 56, 4, "Text encoding");
  print_decode_line(aData, 60, 4, "User version");
  print_decode_line(aData, 64, 4, "Incremental-vacuum mode");
  print_decode_line(aData, 68, 4, "meta[7]");
  print_decode_line(aData, 72, 4, "meta[8]");
  print_decode_line(aData, 76, 4, "meta[9]");
  print_decode_line(aData, 80, 4, "meta[10]");
  print_decode_line(aData, 84, 4, "meta[11]");
  print_decode_line(aData, 88, 4, "meta[12]");
  print_decode_line(aData, 92, 4, "Change counter for version number");
  print_decode_line(aData, 96, 4, "SQLite version number");
}


x86 assembly (clang, -O0):
<print_db_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edx,%edx
mov    $0x64,%esi
mov    %edx,%edi
call   1030 <print_byte_range@plt>
mov    %rax,-0x8(%rbp)
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
mov    $0x2,%edx
lea    0xe9f(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
lea    0xe98(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
lea    0xe98(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
lea    0xe97(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x18,%esi
mov    $0x4,%edx
lea    0xe9b(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1c,%esi
mov    $0x4,%edx
lea    0xe95(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
mov    $0x4,%edx
lea    0xe95(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x24,%esi
mov    $0x4,%edx
lea    0xe9e(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
mov    $0x4,%edx
lea    0xe9d(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2c,%esi
mov    $0x4,%edx
lea    0xe91(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x30,%esi
mov    $0x4,%edx
lea    0xe8d(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x34,%esi
mov    $0x4,%edx
lea    0xe8b(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x38,%esi
mov    $0x4,%edx
lea    0xe8c(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
mov    $0x4,%edx
lea    0xe80(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x40,%esi
mov    $0x4,%edx
lea    0xe73(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x44,%esi
mov    $0x4,%edx
lea    0xe71(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x48,%esi
mov    $0x4,%edx
lea    0xe5f(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4c,%esi
mov    $0x4,%edx
lea    0xe4d(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x50,%esi
mov    $0x4,%edx
lea    0xe3b(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x54,%esi
mov    $0x4,%edx
lea    0xe2a(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x58,%esi
mov    $0x4,%edx
lea    0xe19(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
mov    $0x4,%edx
lea    0xe08(%rip),%rcx
call   1050 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x60,%esi
mov    $0x4,%edx
lea    0xe10(%rip),%rcx
call   1050 <print_decode_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_db_header>:
push   %rbx
xor    %edi,%edi
mov    $0x64,%esi
xor    %edx,%edx
call   1040 <print_byte_range@plt>
mov    %rax,%rbx
lea    0x107a(%rip),%rdi
call   1030 <puts@plt>
lea    0xeab(%rip),%rcx
mov    %rbx,%rdi
mov    $0x10,%esi
mov    $0x2,%edx
call   1050 <print_decode_line@plt>
lea    0xea5(%rip),%rcx
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x1,%edx
call   1050 <print_decode_line@plt>
lea    0xea6(%rip),%rcx
mov    %rbx,%rdi
mov    $0x13,%esi
mov    $0x1,%edx
call   1050 <print_decode_line@plt>
lea    0xea6(%rip),%rcx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x1,%edx
call   1050 <print_decode_line@plt>
lea    0xeab(%rip),%rcx
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea6(%rip),%rcx
mov    %rbx,%rdi
mov    $0x1c,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea7(%rip),%rcx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xeb1(%rip),%rcx
mov    %rbx,%rdi
mov    $0x24,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xeb1(%rip),%rcx
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea6(%rip),%rcx
mov    %rbx,%rdi
mov    $0x2c,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea3(%rip),%rcx
mov    %rbx,%rdi
mov    $0x30,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea2(%rip),%rcx
mov    %rbx,%rdi
mov    $0x34,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xea4(%rip),%rcx
mov    %rbx,%rdi
mov    $0x38,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe99(%rip),%rcx
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe8d(%rip),%rcx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe8c(%rip),%rcx
mov    %rbx,%rdi
mov    $0x44,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe7b(%rip),%rcx
mov    %rbx,%rdi
mov    $0x48,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe6a(%rip),%rcx
mov    %rbx,%rdi
mov    $0x4c,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe59(%rip),%rcx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe49(%rip),%rcx
mov    %rbx,%rdi
mov    $0x54,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe39(%rip),%rcx
mov    %rbx,%rdi
mov    $0x58,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe29(%rip),%rcx
mov    %rbx,%rdi
mov    $0x5c,%esi
mov    $0x4,%edx
call   1050 <print_decode_line@plt>
lea    0xe32(%rip),%rcx
mov    %rbx,%rdi
mov    $0x60,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1050 <print_decode_line@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Decoded:\0A\00"
@.str.1 = [19 x i8] c"Database page size\00"
@.str.2 = [26 x i8] c"File format write version\00"
@.str.3 = [25 x i8] c"File format read version\00"
@.str.4 = [30 x i8] c"Reserved space at end of page\00"
@.str.5 = [20 x i8] c"File change counter\00"
@.str.6 = [26 x i8] c"Size of database in pages\00"
@.str.7 = [35 x i8] c"Page number of first freelist page\00"
@.str.8 = [25 x i8] c"Number of freelist pages\00"
@.str.9 = [14 x i8] c"Schema cookie\00"
@.str.10 = [22 x i8] c"Schema format version\00"
@.str.11 = [24 x i8] c"Default page cache size\00"
@.str.12 = [27 x i8] c"Largest auto-vac root page\00"
@.str.13 = [14 x i8] c"Text encoding\00"
@.str.14 = [13 x i8] c"User version\00"
@.str.15 = [24 x i8] c"Incremental-vacuum mode\00"
@.str.16 = [8 x i8] c"meta[7]\00"
@.str.17 = [8 x i8] c"meta[8]\00"
@.str.18 = [8 x i8] c"meta[9]\00"
@.str.19 = [9 x i8] c"meta[10]\00"
@.str.20 = [9 x i8] c"meta[11]\00"
@.str.21 = [9 x i8] c"meta[12]\00"
@.str.22 = [34 x i8] c"Change counter for version number\00"
@.str.23 = [22 x i8] c"SQLite version number\00"
define void @print_db_header() {
%1 = alloca i8*
%2 = call i8* @print_byte_range(i32 0, i32 100, i32 0)
store i8* %2, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @print_decode_line(i8* %4, i32 16, i32 2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = call i32 @print_decode_line(i8* %6, i32 18, i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%8 = load i8*, i8** %1
%9 = call i32 @print_decode_line(i8* %8, i32 19, i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%10 = load i8*, i8** %1
%11 = call i32 @print_decode_line(i8* %10, i32 20, i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%12 = load i8*, i8** %1
%13 = call i32 @print_decode_line(i8* %12, i32 24, i32 4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%14 = load i8*, i8** %1
%15 = call i32 @print_decode_line(i8* %14, i32 28, i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%16 = load i8*, i8** %1
%17 = call i32 @print_decode_line(i8* %16, i32 32, i32 4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%18 = load i8*, i8** %1
%19 = call i32 @print_decode_line(i8* %18, i32 36, i32 4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%20 = load i8*, i8** %1
%21 = call i32 @print_decode_line(i8* %20, i32 40, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%22 = load i8*, i8** %1
%23 = call i32 @print_decode_line(i8* %22, i32 44, i32 4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%24 = load i8*, i8** %1
%25 = call i32 @print_decode_line(i8* %24, i32 48, i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%26 = load i8*, i8** %1
%27 = call i32 @print_decode_line(i8* %26, i32 52, i32 4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%28 = load i8*, i8** %1
%29 = call i32 @print_decode_line(i8* %28, i32 56, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
%30 = load i8*, i8** %1
%31 = call i32 @print_decode_line(i8* %30, i32 60, i32 4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%32 = load i8*, i8** %1
%33 = call i32 @print_decode_line(i8* %32, i32 64, i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%34 = load i8*, i8** %1
%35 = call i32 @print_decode_line(i8* %34, i32 68, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%36 = load i8*, i8** %1
%37 = call i32 @print_decode_line(i8* %36, i32 72, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%38 = load i8*, i8** %1
%39 = call i32 @print_decode_line(i8* %38, i32 76, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%40 = load i8*, i8** %1
%41 = call i32 @print_decode_line(i8* %40, i32 80, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
%42 = load i8*, i8** %1
%43 = call i32 @print_decode_line(i8* %42, i32 84, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%44 = load i8*, i8** %1
%45 = call i32 @print_decode_line(i8* %44, i32 88, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%46 = load i8*, i8** %1
%47 = call i32 @print_decode_line(i8* %46, i32 92, i32 4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0))
%48 = load i8*, i8** %1
%49 = call i32 @print_decode_line(i8* %48, i32 96, i32 4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"Database page size\00"
@.str.2 = [26 x i8] c"File format write version\00"
@.str.3 = [25 x i8] c"File format read version\00"
@.str.4 = [30 x i8] c"Reserved space at end of page\00"
@.str.5 = [20 x i8] c"File change counter\00"
@.str.6 = [26 x i8] c"Size of database in pages\00"
@.str.7 = [35 x i8] c"Page number of first freelist page\00"
@.str.8 = [25 x i8] c"Number of freelist pages\00"
@.str.9 = [14 x i8] c"Schema cookie\00"
@.str.10 = [22 x i8] c"Schema format version\00"
@.str.11 = [24 x i8] c"Default page cache size\00"
@.str.12 = [27 x i8] c"Largest auto-vac root page\00"
@.str.13 = [14 x i8] c"Text encoding\00"
@.str.14 = [13 x i8] c"User version\00"
@.str.15 = [24 x i8] c"Incremental-vacuum mode\00"
@.str.16 = [8 x i8] c"meta[7]\00"
@.str.17 = [8 x i8] c"meta[8]\00"
@.str.18 = [8 x i8] c"meta[9]\00"
@.str.19 = [9 x i8] c"meta[10]\00"
@.str.20 = [9 x i8] c"meta[11]\00"
@.str.21 = [9 x i8] c"meta[12]\00"
@.str.22 = [34 x i8] c"Change counter for version number\00"
@.str.23 = [22 x i8] c"SQLite version number\00"
@str = [9 x i8] c"Decoded:\00"
define void @print_db_header() {
%1 = tail call i8* @print_byte_range(i32 0, i32 100, i32 0)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @print_decode_line(i8* %1, i32 16, i32 2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @print_decode_line(i8* %1, i32 18, i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @print_decode_line(i8* %1, i32 19, i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @print_decode_line(i8* %1, i32 20, i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @print_decode_line(i8* %1, i32 24, i32 4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @print_decode_line(i8* %1, i32 28, i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @print_decode_line(i8* %1, i32 32, i32 4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @print_decode_line(i8* %1, i32 36, i32 4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @print_decode_line(i8* %1, i32 40, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @print_decode_line(i8* %1, i32 44, i32 4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 @print_decode_line(i8* %1, i32 48, i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%14 = tail call i32 @print_decode_line(i8* %1, i32 52, i32 4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 @print_decode_line(i8* %1, i32 56, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
%16 = tail call i32 @print_decode_line(i8* %1, i32 60, i32 4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 @print_decode_line(i8* %1, i32 64, i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%18 = tail call i32 @print_decode_line(i8* %1, i32 68, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%19 = tail call i32 @print_decode_line(i8* %1, i32 72, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%20 = tail call i32 @print_decode_line(i8* %1, i32 76, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%21 = tail call i32 @print_decode_line(i8* %1, i32 80, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
%22 = tail call i32 @print_decode_line(i8* %1, i32 84, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%23 = tail call i32 @print_decode_line(i8* %1, i32 88, i32 4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%24 = tail call i32 @print_decode_line(i8* %1, i32 92, i32 4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0))
%25 = tail call i32 @print_decode_line(i8* %1, i32 96, i32 4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
ret void
}