#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 EXIT_FAILURE;
int /*<<< orphan*/ puts(char *);
int help() {
  puts("PoC for checking if SQLite database has been changed by comparing "
       "sqlite header with copy of header in database.\n");
  puts("For more information see the README.md file.\n");
  puts("Usage: sqlite_unchanged [-s | -c ] [file]");
  puts("\t-s or --set:   store header in db");
  puts("\t-c or --check: compare header with stored header");
  puts("\tfile: filename or path");
  return (EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8b(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf70(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [114 x i8] c"PoC for checking if SQLite database has been changed by comparing sqlite header with copy of header in database.\0A\00"
@.str.1 = [46 x i8] c"For more information see the README.md file.\0A\00"
@.str.2 = [42 x i8] c"Usage: sqlite_unchanged [-s | -c ] [file]\00"
@.str.3 = [35 x i8] c"\09-s or --set: store header in db\00"
@.str.4 = [50 x i8] c"\09-c or --check: compare header with stored header\00"
@.str.5 = [24 x i8] c"\09file: filename or path\00"
@EXIT_FAILURE = global i32 0
define i32 @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
ret i32 %7
}

LLVM IR (-O2):
@.str = [114 x i8] c"PoC for checking if SQLite database has been changed by comparing sqlite header with copy of header in database.\0A\00"
@.str.1 = [46 x i8] c"For more information see the README.md file.\0A\00"
@.str.2 = [42 x i8] c"Usage: sqlite_unchanged [-s | -c ] [file]\00"
@.str.3 = [35 x i8] c"\09-s or --set: store header in db\00"
@.str.4 = [50 x i8] c"\09-c or --check: compare header with stored header\00"
@.str.5 = [24 x i8] c"\09file: filename or path\00"
@EXIT_FAILURE = global i32 0
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
ret i32 %7
}