#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 int PER_BSD;
unsigned int const PER_LINUX;
unsigned int SHORT_INODE;
unsigned int STICKY_TIMEOUTS;
unsigned int WHOLE_SECONDS;
unsigned int personality(unsigned int const);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int main(void) {
  const unsigned int good_type = PER_BSD;
  const char *good_type_str = "PER_BSD";
  const unsigned int bad_type = 0x1f;
  const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/";
  const unsigned int good_flags = SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS;
  const char *good_flags_str = "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS";
  const unsigned int bad_flags = 0x10000;
  const char *bad_flags_str = "0x10000";
  const unsigned int saved_pers = personality(0xffffffff);
  printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers);
  personality(PER_LINUX);
  printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers);
  personality(0xffffffff);
  puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)");
  personality(good_flags);
  printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n",
         good_flags_str);
  personality(bad_flags);
  printf("personality\\(PER_LINUX\\|%s\\)"
         " = %#x \\(PER_LINUX\\|%s\\)\n",
         bad_flags_str, good_flags, good_flags_str);
  personality(good_flags | bad_flags);
  printf("personality\\(PER_LINUX\\|%s\\|%s\\)"
         " = %#x \\(PER_LINUX\\|%s\\)\n",
         good_flags_str, bad_flags_str, bad_flags, bad_flags_str);
  personality(good_type);
  printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", good_type_str,
         good_flags | bad_flags, good_flags_str, bad_flags_str);
  personality(good_type | good_flags);
  printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", good_type_str,
         good_flags_str, good_type, good_type_str);
  personality(good_type | bad_flags);
  printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", good_type_str,
         bad_flags_str, good_type | good_flags, good_type_str, good_flags_str);
  personality(good_type | good_flags | bad_flags);
  printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", good_type_str,
         good_flags_str, bad_flags_str, good_type | bad_flags, good_type_str,
         bad_flags_str);
  personality(bad_type);
  printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", bad_type_str,
         good_type | good_flags | bad_flags, good_type_str, good_flags_str,
         bad_flags_str);
  personality(bad_type | good_flags);
  printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", bad_type_str,
         good_flags_str, bad_type, bad_type_str);
  personality(bad_type | bad_flags);
  printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", bad_type_str,
         bad_flags_str, bad_type | good_flags, bad_type_str, good_flags_str);
  personality(bad_type | good_flags | bad_flags);
  printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", bad_type_str,
         good_flags_str, bad_flags_str, bad_type | bad_flags, bad_type_str,
         bad_flags_str);
  personality(saved_pers);
  printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n",
         bad_type | good_flags | bad_flags, bad_type_str, good_flags_str,
         bad_flags_str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
lea    0xeae(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1f,-0x14(%rbp)
lea    0xea4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
mov    0x2e60(%rip),%rcx
or     (%rcx),%eax
mov    0x2e77(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x24(%rbp)
lea    0xe93(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0x10000,-0x34(%rbp)
lea    0xead(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    $0xffffffff,%edi
call   1030 <personality@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
call   1030 <personality@plt>
mov    -0x44(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   1030 <personality@plt>
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
mov    -0x24(%rbp),%edi
call   1030 <personality@plt>
mov    -0x30(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x10000,%edi
call   1030 <personality@plt>
mov    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%edi
or     $0x10000,%edi
call   1030 <personality@plt>
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x40(%rbp),%r8
lea    0xee7(%rip),%rdi
mov    $0x10000,%ecx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <personality@plt>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
or     $0x10000,%edx
mov    -0x30(%rbp),%rcx
mov    -0x40(%rbp),%r8
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
or     -0x24(%rbp),%edi
call   1030 <personality@plt>
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
or     $0x10000,%edi
call   1030 <personality@plt>
mov    -0x10(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x8(%rbp),%ecx
or     -0x24(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
or     -0x24(%rbp),%edi
or     $0x10000,%edi
call   1030 <personality@plt>
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x8(%rbp),%r8d
or     $0x10000,%r8d
mov    -0x10(%rbp),%r9
mov    -0x40(%rbp),%rax
lea    0xed4(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1f,%edi
call   1030 <personality@plt>
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%edx
or     -0x24(%rbp),%edx
or     $0x10000,%edx
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x40(%rbp),%r9
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%edi
or     $0x1f,%edi
call   1030 <personality@plt>
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    0xe2b(%rip),%rdi
mov    $0x1f,%ecx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1001f,%edi
call   1030 <personality@plt>
mov    -0x20(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x24(%rbp),%ecx
or     $0x1f,%ecx
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%edi
or     $0x1f,%edi
or     $0x10000,%edi
call   1030 <personality@plt>
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%r9
mov    -0x40(%rbp),%rax
lea    0xe11(%rip),%rdi
mov    $0x1001f,%r8d
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x44(%rbp),%edi
call   1030 <personality@plt>
mov    -0x24(%rbp),%esi
or     $0x1f,%esi
or     $0x10000,%esi
mov    -0x20(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x40(%rbp),%r8
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e9b(%rip),%rax
mov    0x2e84(%rip),%rcx
mov    0x2e85(%rip),%rdx
mov    (%rdx),%r14d
or     (%rcx),%r14d
mov    (%rax),%ebp
mov    0x2e96(%rip),%rax
or     (%rax),%r14d
mov    $0xffffffff,%edi
call   1030 <personality@plt>
mov    %eax,%ebx
mov    %eax,0x14(%rsp)
lea    0xed8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1030 <personality@plt>
lea    0xeec(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   1030 <personality@plt>
lea    0xefc(%rip),%rdi
call   1040 <puts@plt>
mov    %r14d,%edi
call   1030 <personality@plt>
lea    0xf14(%rip),%rdi
lea    0xe58(%rip),%r15
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x10000,%edi
call   1030 <personality@plt>
lea    0xf22(%rip),%rdi
lea    0xe62(%rip),%r12
mov    %r12,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%ebx
or     $0x10000,%ebx
mov    %ebx,%edi
call   1030 <personality@plt>
lea    0xf2a(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    $0x10000,%ecx
mov    %r12,%r8
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%edi
call   1030 <personality@plt>
lea    0xf41(%rip),%rdi
lea    0xdc5(%rip),%r13
mov    %r13,%rsi
mov    %ebx,%edx
mov    %r15,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%ebx
or     %ebp,%ebx
mov    %ebx,%edi
call   1030 <personality@plt>
lea    0xf44(%rip),%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
mov    %r13,%r8
xor    %eax,%eax
call   1050 <printf@plt>
or     $0x10000,%ebp
mov    %ebp,%edi
call   1030 <personality@plt>
lea    0xf42(%rip),%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
mov    %r13,%r8
mov    %r15,%r9
xor    %eax,%eax
call   1050 <printf@plt>
or     $0x10000,%ebx
mov    %ebx,%edi
call   1030 <personality@plt>
mov    %r12,(%rsp)
lea    0xf3d(%rip),%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %ebp,%r8d
mov    %r13,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1f,%edi
call   1030 <personality@plt>
lea    0xf42(%rip),%rdi
lea    0xd27(%rip),%rbp
mov    %rbp,%rsi
mov    %ebx,%edx
mov    %r13,%rcx
mov    %r15,%r8
mov    %r12,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%ebx
or     $0x1f,%ebx
mov    %ebx,%edi
call   1030 <personality@plt>
lea    0xe9a(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    $0x1f,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1001f,%edi
call   1030 <personality@plt>
lea    0xe98(%rip),%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
mov    %rbp,%r8
mov    %r15,%r9
xor    %eax,%eax
call   1050 <printf@plt>
or     $0x1001f,%r14d
mov    %r14d,%edi
call   1030 <personality@plt>
mov    %r12,(%rsp)
lea    0xe91(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    $0x1001f,%r8d
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%edi
call   1030 <personality@plt>
lea    0xebc(%rip),%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PER_BSD = global i32 0
@.str = [8 x i8] c"PER_BSD\00"
@.str.1 = [24 x i8] c"0x1f /\\* PER_\\?\\?\\? \\*/\00"
@SHORT_INODE = global i32 0
@WHOLE_SECONDS = global i32 0
@STICKY_TIMEOUTS = global i32 0
@.str.2 = [44 x i8] c"SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS\00"
@.str.3 = [8 x i8] c"0x10000\00"
@.str.4 = [43 x i8] c"personality\\(0xffffffff\\) = %#x \\([^)]*\\)\0A\00"
@PER_LINUX = constant i32 0
@.str.5 = [42 x i8] c"personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\0A\00"
@.str.6 = [44 x i8] c"personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)\00"
@.str.7 = [48 x i8] c"personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\0A\00"
@.str.8 = [54 x i8] c"personality\\(PER_LINUX\\|%s\\) = %#x \\(PER_LINUX\\|%s\\)\0A\00"
@.str.9 = [58 x i8] c"personality\\(PER_LINUX\\|%s\\|%s\\) = %#x \\(PER_LINUX\\|%s\\)\0A\00"
@.str.10 = [47 x i8] c"personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\0A\00"
@.str.11 = [36 x i8] c"personality\\(%s\\|%s\\) = %#x \\(%s\\)\0A\00"
@.str.12 = [40 x i8] c"personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\0A\00"
@.str.13 = [44 x i8] c"personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\0A\00"
@.str.14 = [40 x i8] c"personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\0A\00"
@.str.15 = [43 x i8] c"personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 0, i32* %1
%11 = load i32, i32* @PER_BSD
store i32 %11, i32* %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
store i32 31, i32* %4
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8** %5
%12 = load i32, i32* @SHORT_INODE
%13 = load i32, i32* @WHOLE_SECONDS
%14 = or i32 %12, %13
%15 = load i32, i32* @STICKY_TIMEOUTS
%16 = or i32 %14, %15
store i32 %16, i32* %6
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8** %7
store i32 65536, i32* %8
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %9
%17 = call i32 @personality(i32 -1)
store i32 %17, i32* %10
%18 = load i32, i32* %10
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @PER_LINUX
%21 = call i32 @personality(i32 %20)
%22 = load i32, i32* %10
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = call i32 @personality(i32 -1)
%25 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%26 = load i32, i32* %6
%27 = call i32 @personality(i32 %26)
%28 = load i8*, i8** %7
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0), i8* %28)
%30 = call i32 @personality(i32 65536)
%31 = load i8*, i8** %9
%32 = load i32, i32* %6
%33 = load i8*, i8** %7
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* %31, i32 %32, i8* %33)
%35 = load i32, i32* %6
%36 = or i32 %35, 65536
%37 = call i32 @personality(i32 %36)
%38 = load i8*, i8** %7
%39 = load i8*, i8** %9
%40 = load i8*, i8** %9
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* %38, i8* %39, i32 65536, i8* %40)
%42 = load i32, i32* %2
%43 = call i32 @personality(i32 %42)
%44 = load i8*, i8** %3
%45 = load i32, i32* %6
%46 = or i32 %45, 65536
%47 = load i8*, i8** %7
%48 = load i8*, i8** %9
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i8* %44, i32 %46, i8* %47, i8* %48)
%50 = load i32, i32* %2
%51 = load i32, i32* %6
%52 = or i32 %50, %51
%53 = call i32 @personality(i32 %52)
%54 = load i8*, i8** %3
%55 = load i8*, i8** %7
%56 = load i32, i32* %2
%57 = load i8*, i8** %3
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* %54, i8* %55, i32 %56, i8* %57)
%59 = load i32, i32* %2
%60 = or i32 %59, 65536
%61 = call i32 @personality(i32 %60)
%62 = load i8*, i8** %3
%63 = load i8*, i8** %9
%64 = load i32, i32* %2
%65 = load i32, i32* %6
%66 = or i32 %64, %65
%67 = load i8*, i8** %3
%68 = load i8*, i8** %7
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* %62, i8* %63, i32 %66, i8* %67, i8* %68)
%70 = load i32, i32* %2
%71 = load i32, i32* %6
%72 = or i32 %70, %71
%73 = or i32 %72, 65536
%74 = call i32 @personality(i32 %73)
%75 = load i8*, i8** %3
%76 = load i8*, i8** %7
%77 = load i8*, i8** %9
%78 = load i32, i32* %2
%79 = or i32 %78, 65536
%80 = load i8*, i8** %3
%81 = load i8*, i8** %9
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i8* %75, i8* %76, i8* %77, i32 %79, i8* %80, i8* %81)
%83 = call i32 @personality(i32 31)
%84 = load i8*, i8** %5
%85 = load i32, i32* %2
%86 = load i32, i32* %6
%87 = or i32 %85, %86
%88 = or i32 %87, 65536
%89 = load i8*, i8** %3
%90 = load i8*, i8** %7
%91 = load i8*, i8** %9
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0), i8* %84, i32 %88, i8* %89, i8* %90, i8* %91)
%93 = load i32, i32* %6
%94 = or i32 31, %93
%95 = call i32 @personality(i32 %94)
%96 = load i8*, i8** %5
%97 = load i8*, i8** %7
%98 = load i8*, i8** %5
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* %96, i8* %97, i32 31, i8* %98)
%100 = call i32 @personality(i32 65567)
%101 = load i8*, i8** %5
%102 = load i8*, i8** %9
%103 = load i32, i32* %6
%104 = or i32 31, %103
%105 = load i8*, i8** %5
%106 = load i8*, i8** %7
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* %101, i8* %102, i32 %104, i8* %105, i8* %106)
%108 = load i32, i32* %6
%109 = or i32 31, %108
%110 = or i32 %109, 65536
%111 = call i32 @personality(i32 %110)
%112 = load i8*, i8** %5
%113 = load i8*, i8** %7
%114 = load i8*, i8** %9
%115 = load i8*, i8** %5
%116 = load i8*, i8** %9
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i8* %112, i8* %113, i8* %114, i32 65567, i8* %115, i8* %116)
%118 = load i32, i32* %10
%119 = call i32 @personality(i32 %118)
%120 = load i32, i32* %6
%121 = or i32 31, %120
%122 = or i32 %121, 65536
%123 = load i8*, i8** %5
%124 = load i8*, i8** %7
%125 = load i8*, i8** %9
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %122, i8* %123, i8* %124, i8* %125)
ret i32 0
}

LLVM IR (-O2):
@PER_BSD = global i32 0
@.str = [8 x i8] c"PER_BSD\00"
@.str.1 = [24 x i8] c"0x1f /\\* PER_\\?\\?\\? \\*/\00"
@SHORT_INODE = global i32 0
@WHOLE_SECONDS = global i32 0
@STICKY_TIMEOUTS = global i32 0
@.str.2 = [44 x i8] c"SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS\00"
@.str.3 = [8 x i8] c"0x10000\00"
@.str.4 = [43 x i8] c"personality\\(0xffffffff\\) = %#x \\([^)]*\\)\0A\00"
@PER_LINUX = constant i32 0
@.str.5 = [42 x i8] c"personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\0A\00"
@.str.6 = [44 x i8] c"personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)\00"
@.str.7 = [48 x i8] c"personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\0A\00"
@.str.8 = [54 x i8] c"personality\\(PER_LINUX\\|%s\\) = %#x \\(PER_LINUX\\|%s\\)\0A\00"
@.str.9 = [58 x i8] c"personality\\(PER_LINUX\\|%s\\|%s\\) = %#x \\(PER_LINUX\\|%s\\)\0A\00"
@.str.10 = [47 x i8] c"personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\0A\00"
@.str.11 = [36 x i8] c"personality\\(%s\\|%s\\) = %#x \\(%s\\)\0A\00"
@.str.12 = [40 x i8] c"personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\0A\00"
@.str.13 = [44 x i8] c"personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\0A\00"
@.str.14 = [40 x i8] c"personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\0A\00"
@.str.15 = [43 x i8] c"personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\0A\00"
define i32 @main() {
%1 = load i32, i32* @PER_BSD
%2 = load i32, i32* @SHORT_INODE
%3 = load i32, i32* @WHOLE_SECONDS
%4 = or i32 %3, %2
%5 = load i32, i32* @STICKY_TIMEOUTS
%6 = or i32 %4, %5
%7 = tail call i32 @personality(i32 -1)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %7)
%9 = tail call i32 @personality(i32 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 %7)
%11 = tail call i32 @personality(i32 -1)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%13 = tail call i32 @personality(i32 %6)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i32 @personality(i32 65536)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%17 = or i32 %6, 65536
%18 = tail call i32 @personality(i32 %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 65536, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%20 = tail call i32 @personality(i32 %1)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%22 = or i32 %6, %1
%23 = tail call i32 @personality(i32 %22)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%25 = or i32 %1, 65536
%26 = tail call i32 @personality(i32 %25)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%28 = or i32 %22, 65536
%29 = tail call i32 @personality(i32 %28)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%31 = tail call i32 @personality(i32 31)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%33 = or i32 %6, 31
%34 = tail call i32 @personality(i32 %33)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%36 = tail call i32 @personality(i32 65567)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %33, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%38 = or i32 %6, 65567
%39 = tail call i32 @personality(i32 %38)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 65567, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%41 = tail call i32 @personality(i32 %7)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %38, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}