int main() {
  char *p = (char *)0x4000;
  short *q = (short *)0x5000;
  int *r = (int *)0x6000;
  int *output = (int *)0x7000;
  char s;
  short t;
  int u;
  *p = (char)1;
  p++;
  *p = (char)2;
  p++;
  *p = (char)3;
  p++;
  *p = (char)4;
  p++;
  *p = (char)5;
  *q = (short)0x1112;
  q++;
  *q = (short)0x1314;
  q++;
  *q = (short)0x1516;
  *r = 0x21222324;
  r++;
  *r = 0x25262728;
  r++;
  *r = 0x292a2b2c;
  p = (char *)0x6000;
  s = *p;
  if (s == 0x21)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
  p = (char *)0x6001;
  s = *p;
  if (s == 0x22)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
  p = (char *)0x6002;
  s = *p;
  if (s == 0x23)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
  p = (char *)0x6003;
  s = *p;
  if (s == 0x24)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
  q = (short *)0x4000;
  t = *q;
  if (t == 0x0102)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
  r = (int *)0x4000;
  u = *r;
  if (u == 0x01020304)
    *output = 0x53534150;
  else
    *output = 0x4C494146;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4000,%eax
mov    %rax,-0x10(%rbp)
mov    $0x5000,%eax
mov    %rax,-0x18(%rbp)
mov    $0x6000,%eax
mov    %rax,-0x20(%rbp)
mov    $0x7000,%eax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x2,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x3,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x4,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x5,(%rax)
mov    -0x18(%rbp),%rax
movw   $0x1112,(%rax)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movw   $0x1314,(%rax)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movw   $0x1516,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x21222324,(%rax)
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x25262728,(%rax)
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x292a2b2c,(%rax)
mov    $0x6000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x21,%eax
jne    1219 <main+0x119>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    1223 <main+0x123>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    $0x6001,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x22,%eax
jne    1251 <main+0x151>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    125b <main+0x15b>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    $0x6002,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x23,%eax
jne    1289 <main+0x189>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    1293 <main+0x193>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    $0x6003,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x24,%eax
jne    12c1 <main+0x1c1>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    12cb <main+0x1cb>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    $0x4000,%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x2c(%rbp)
movswl -0x2c(%rbp),%eax
cmp    $0x102,%eax
jne    12fd <main+0x1fd>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    1307 <main+0x207>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    $0x4000,%eax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x1020304,-0x30(%rbp)
jne    1335 <main+0x235>
mov    -0x28(%rbp),%rax
movl   $0x53534150,(%rax)
jmp    133f <main+0x23f>
mov    -0x28(%rbp),%rax
movl   $0x4c494146,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movb   $0x1,0x4000
01
movb   $0x2,0x4001
02
movb   $0x3,0x4002
03
movb   $0x4,0x4003
04
movb   $0x5,0x4004
05
movw   $0x1112,0x5000
movw   $0x1314,0x5002
movw   $0x1516,0x5004
movl   $0x21222324,0x6000
24 23 22 21
movl   $0x25262728,0x6004
28 27 26 25
movl   $0x292a2b2c,0x6008
2c 2b 2a 29
movzwl 0x4000,%eax
cmp    $0x102,%eax
mov    $0x53534150,%eax
mov    $0x4c494146,%ecx
cmove  %eax,%ecx
mov    $0x4c494146,%edx
mov    %ecx,0x7000
cmpl   $0x1020304,0x4000
04 03 02 01
cmove  %eax,%edx
mov    %edx,0x7000
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i16*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
store i32 0, i32* %1
store i8* inttoptr (i64 16384 to i8*), i8** %2
store i16* inttoptr (i64 20480 to i16*), i16** %3
store i32* inttoptr (i64 24576 to i32*), i32** %4
store i32* inttoptr (i64 28672 to i32*), i32** %5
%9 = load i8*, i8** %2
store i8 1, i8* %9
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%12 = load i8*, i8** %2
store i8 2, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
%15 = load i8*, i8** %2
store i8 3, i8* %15
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
%18 = load i8*, i8** %2
store i8 4, i8* %18
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
%21 = load i8*, i8** %2
store i8 5, i8* %21
%22 = load i16*, i16** %3
store i16 4370, i16* %22
%23 = load i16*, i16** %3
%24 = getelementptr inbounds i16, i16* %23, i32 1
store i16* %24, i16** %3
%25 = load i16*, i16** %3
store i16 4884, i16* %25
%26 = load i16*, i16** %3
%27 = getelementptr inbounds i16, i16* %26, i32 1
store i16* %27, i16** %3
%28 = load i16*, i16** %3
store i16 5398, i16* %28
%29 = load i32*, i32** %4
store i32 555885348, i32* %29
%30 = load i32*, i32** %4
%31 = getelementptr inbounds i32, i32* %30, i32 1
store i32* %31, i32** %4
%32 = load i32*, i32** %4
store i32 623257384, i32* %32
%33 = load i32*, i32** %4
%34 = getelementptr inbounds i32, i32* %33, i32 1
store i32* %34, i32** %4
%35 = load i32*, i32** %4
store i32 690629420, i32* %35
store i8* inttoptr (i64 24576 to i8*), i8** %2
%36 = load i8*, i8** %2
%37 = load i8, i8* %36
store i8 %37, i8* %6
%38 = load i8, i8* %6
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 33
br i1 %40, label %41, label %43
41: ; preds = %0
%42 = load i32*, i32** %5
store i32 1397965136, i32* %42
br label %45
43: ; preds = %0
%44 = load i32*, i32** %5
store i32 1279869254, i32* %44
br label %45
45: ; preds = %43, %41
store i8* inttoptr (i64 24577 to i8*), i8** %2
%46 = load i8*, i8** %2
%47 = load i8, i8* %46
store i8 %47, i8* %6
%48 = load i8, i8* %6
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 34
br i1 %50, label %51, label %53
51: ; preds = %45
%52 = load i32*, i32** %5
store i32 1397965136, i32* %52
br label %55
53: ; preds = %45
%54 = load i32*, i32** %5
store i32 1279869254, i32* %54
br label %55
55: ; preds = %53, %51
store i8* inttoptr (i64 24578 to i8*), i8** %2
%56 = load i8*, i8** %2
%57 = load i8, i8* %56
store i8 %57, i8* %6
%58 = load i8, i8* %6
%59 = sext i8 %58 to i32
%60 = icmp eq i32 %59, 35
br i1 %60, label %61, label %63
61: ; preds = %55
%62 = load i32*, i32** %5
store i32 1397965136, i32* %62
br label %65
63: ; preds = %55
%64 = load i32*, i32** %5
store i32 1279869254, i32* %64
br label %65
65: ; preds = %63, %61
store i8* inttoptr (i64 24579 to i8*), i8** %2
%66 = load i8*, i8** %2
%67 = load i8, i8* %66
store i8 %67, i8* %6
%68 = load i8, i8* %6
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 36
br i1 %70, label %71, label %73
71: ; preds = %65
%72 = load i32*, i32** %5
store i32 1397965136, i32* %72
br label %75
73: ; preds = %65
%74 = load i32*, i32** %5
store i32 1279869254, i32* %74
br label %75
75: ; preds = %73, %71
store i16* inttoptr (i64 16384 to i16*), i16** %3
%76 = load i16*, i16** %3
%77 = load i16, i16* %76
store i16 %77, i16* %7
%78 = load i16, i16* %7
%79 = sext i16 %78 to i32
%80 = icmp eq i32 %79, 258
br i1 %80, label %81, label %83
81: ; preds = %75
%82 = load i32*, i32** %5
store i32 1397965136, i32* %82
br label %85
83: ; preds = %75
%84 = load i32*, i32** %5
store i32 1279869254, i32* %84
br label %85
85: ; preds = %83, %81
store i32* inttoptr (i64 16384 to i32*), i32** %4
%86 = load i32*, i32** %4
%87 = load i32, i32* %86
store i32 %87, i32* %8
%88 = load i32, i32* %8
%89 = icmp eq i32 %88, 16909060
br i1 %89, label %90, label %92
90: ; preds = %85
%91 = load i32*, i32** %5
store i32 1397965136, i32* %91
br label %94
92: ; preds = %85
%93 = load i32*, i32** %5
store i32 1279869254, i32* %93
br label %94
94: ; preds = %92, %90
%95 = load i32, i32* %1
ret i32 %95
}

LLVM IR (-O2):
define i32 @main() {
store i8 1, i8* inttoptr (i64 16384 to i8*)
store i8 2, i8* inttoptr (i64 16385 to i8*)
store i8 3, i8* inttoptr (i64 16386 to i8*)
store i8 4, i8* inttoptr (i64 16387 to i8*)
store i8 5, i8* inttoptr (i64 16388 to i8*)
store i16 4370, i16* inttoptr (i64 20480 to i16*)
store i16 4884, i16* inttoptr (i64 20482 to i16*)
store i16 5398, i16* inttoptr (i64 20484 to i16*)
store i32 555885348, i32* inttoptr (i64 24576 to i32*)
store i32 623257384, i32* inttoptr (i64 24580 to i32*)
store i32 690629420, i32* inttoptr (i64 24584 to i32*)
%1 = load i16, i16* inttoptr (i64 16384 to i16*)
%2 = icmp eq i16 %1, 258
%3 = select i1 %2, i32 1397965136, i32 1279869254
store i32 %3, i32* inttoptr (i64 28672 to i32*)
%4 = load i32, i32* inttoptr (i64 16384 to i32*)
%5 = icmp eq i32 %4, 16909060
%6 = select i1 %5, i32 1397965136, i32 1279869254
store i32 %6, i32* inttoptr (i64 28672 to i32*)
ret i32 0
}