#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*/ printf(char *, char *, ...);
void wg_print_code_version(void) {
  int i = 1;
  char *i_bytes = (char *)&i;
  printf("\nlibwgdb version: %d.%d.%d\n", 0, 8, 0);
  printf("byte order: %s endian\n", (i_bytes[0] == 1 ? "little" : "big"));
  printf("compile-time features:\n"
         "  64-bit encoded data: %s\n"
         "  queued locks: %s\n"
         "  chained nodes in T-tree: %s\n"
         "  record backlinking: %s\n"
         "  child databases: %s\n"
         "  index templates: %s\n",
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x1 ? "yes" : "no"),
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x2 ? "yes" : "no"),
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x4 ? "yes" : "no"),
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x8 ? "yes" : "no"),
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x10 ? "yes" : "no"),
         ((0x0 | 0x0 | 0x4 | 0x8 | 0x0 | 0x20) & 0x20 ? "yes" : "no"));
}


x86 assembly (clang, -O0):
<wg_print_code_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xed2(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
lea    0xeec(%rip),%rsi
lea    0xede(%rip),%rax
cmp    $0x1,%ecx
cmove  %rax,%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xf6e(%rip),%r9
lea    0xf6a(%rip),%rax
mov    %r9,%rsi
mov    %r9,%rdx
mov    %rax,%rcx
mov    %rax,%r8
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wg_print_code_version>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    0xefd(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfa1(%rip),%rcx
mov    %rcx,(%rsp)
lea    0xeeb(%rip),%rdi
lea    0xf8c(%rip),%rdx
mov    %rdx,%rsi
mov    %rcx,%r8
mov    %rdx,%r9
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0Alibwgdb version: %d.%d.%d\0A\00"
@.str.1 = [23 x i8] c"byte order: %s endian\0A\00"
@.str.2 = [7 x i8] c"little\00"
@.str.3 = [4 x i8] c"big\00"
@.str.4 = [168 x i8] c"compile-time features:\0A 64-bit encoded data: %s\0A queued locks: %s\0A chained nodes in T-tree: %s\0A record backlinking: %s\0A child databases: %s\0A index templates: %s\0A\00"
@.str.5 = [3 x i8] c"no\00"
@.str.6 = [4 x i8] c"yes\00"
define void @wg_print_code_version() {
%1 = alloca i32
%2 = alloca i8*
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* null, i32 8, i32 0)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
%12 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0Alibwgdb version: %d.%d.%d\0A\00"
@.str.1 = [23 x i8] c"byte order: %s endian\0A\00"
@.str.2 = [7 x i8] c"little\00"
@.str.4 = [168 x i8] c"compile-time features:\0A 64-bit encoded data: %s\0A queued locks: %s\0A chained nodes in T-tree: %s\0A record backlinking: %s\0A child databases: %s\0A index templates: %s\0A\00"
@.str.5 = [3 x i8] c"no\00"
@.str.6 = [4 x i8] c"yes\00"
define void @wg_print_code_version() {
%1 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* null, i32 8, i32 0)
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
ret void
}