#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*/ fail(int);
int loadb_bp(unsigned int);
unsigned long long loaddw_bp(unsigned int);
int loadhw_bp(unsigned int);
unsigned long long loadw_bp(unsigned int);
int /*<<< orphan*/ report_mem_test();
int /*<<< orphan*/ report_subtest(int);
int mem_test(void) {
  unsigned long long i;
  unsigned char has_mmu;
  volatile char byteline[32];
  volatile unsigned short hwordline[16];
  volatile unsigned int wordline[8];
  volatile long long int dwordline[4];
  report_mem_test();
  has_mmu = 1;
  report_subtest(1);
  for (i = 0; i < 32; i++) {
    byteline[i] = i;
  }
  for (i = 0; i < 32; i++) {
    if (byteline[i] != i)
      fail(0);
  }
  if (has_mmu) {
    for (i = 0; i < 32; i++) {
      if (loadb_bp((unsigned int)byteline + i) != i)
        fail(1);
    }
  }
  for (i = 0; i < 32; i++) {
    byteline[31 - i] = i;
  }
  if (has_mmu) {
    for (i = 0; i < 32; i++) {
      if (loadb_bp((unsigned int)byteline + i) != (31 - i))
        fail(2);
    }
  }
  report_subtest(2);
  for (i = 0; i < 16; i++) {
    hwordline[i] = i;
  }
  for (i = 0; i < 16; i++) {
    if (hwordline[i] != i)
      fail(3);
  }
  if (has_mmu) {
    for (i = 0; i < 16; i++) {
      if (loadhw_bp((unsigned int)hwordline + i * 2) != i)
        fail(4);
    }
  }
  for (i = 0; i < 16; i++) {
    hwordline[15 - i] = (i << 8);
  }
  if (has_mmu) {
    for (i = 0; i < 16; i++) {
      if (loadhw_bp((unsigned int)hwordline + i * 2) != ((15 - i) << 8))
        fail(5);
    }
  }
  report_subtest(3);
  for (i = 0; i < 8; i++) {
    wordline[i] = (i << 24) | (i << 16) | (i << 8) | i;
  }
  if (has_mmu) {
    for (i = 0; i < 8; i++) {
      if (loadw_bp((unsigned int)wordline + i * 4) !=
          ((i << 24) | (i << 16) | (i << 8) | i))
        fail(6);
    }
  }
  report_subtest(4);
  for (i = 0; i < 4; i++) {
    dwordline[i] = ((i << 56) | (i << 48) | (i << 40) | (i << 32) | (i << 24) |
                    (i << 16) | (i << 8) | i);
  }
  if (has_mmu) {
    for (i = 0; i < 4; i++) {
      if (loaddw_bp((unsigned int)dwordline + i * 8) !=
          (((i << 56) | (i << 48) | (i << 40) | (i << 32) | (i << 24) |
            (i << 16) | (i << 8) | i)))
        fail(7);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<mem_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    $0x0,%al
call   1030 <report_mem_test@plt>
movb   $0x1,-0x9(%rbp)
mov    $0x1,%edi
call   1040 <report_subtest@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    11c2 <mem_test+0x52>
mov    -0x8(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <mem_test+0x28>
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    1208 <mem_test+0x98>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%al
movsbq %al,%rax
cmp    -0x8(%rbp),%rax
je     11f2 <mem_test+0x82>
xor    %edi,%edi
call   1050 <fail@plt>
jmp    11f7 <mem_test+0x87>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11ca <mem_test+0x5a>
cmpb   $0x0,-0x9(%rbp)
je     1267 <mem_test+0xf7>
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    1262 <mem_test+0xf2>
lea    -0x30(%rbp),%rax
mov    %eax,%eax
add    -0x8(%rbp),%rax
mov    %eax,%edi
call   1090 <loadb_bp@plt>
cltq
cmp    -0x8(%rbp),%rax
je     124c <mem_test+0xdc>
mov    $0x1,%edi
call   1050 <fail@plt>
jmp    1251 <mem_test+0xe1>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    121a <mem_test+0xaa>
jmp    1267 <mem_test+0xf7>
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    129e <mem_test+0x12e>
mov    -0x8(%rbp),%rax
mov    %al,%cl
mov    $0x1f,%eax
sub    -0x8(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    126f <mem_test+0xff>
cmpb   $0x0,-0x9(%rbp)
je     1305 <mem_test+0x195>
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    1300 <mem_test+0x190>
lea    -0x30(%rbp),%rax
mov    %eax,%eax
add    -0x8(%rbp),%rax
mov    %eax,%edi
call   1090 <loadb_bp@plt>
cltq
mov    $0x1f,%ecx
sub    -0x8(%rbp),%rcx
cmp    %rcx,%rax
je     12ea <mem_test+0x17a>
mov    $0x2,%edi
call   1050 <fail@plt>
jmp    12ef <mem_test+0x17f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    12b0 <mem_test+0x140>
jmp    1305 <mem_test+0x195>
mov    $0x2,%edi
call   1040 <report_subtest@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    1343 <mem_test+0x1d3>
mov    -0x8(%rbp),%rax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,-0x50(%rbp,%rax,2)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1317 <mem_test+0x1a7>
movq   $0x0,-0x8(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    138c <mem_test+0x21c>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,2),%ax
movzwl %ax,%eax
cmp    -0x8(%rbp),%rax
je     1376 <mem_test+0x206>
mov    $0x3,%edi
call   1050 <fail@plt>
jmp    137b <mem_test+0x20b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    134b <mem_test+0x1db>
cmpb   $0x0,-0x9(%rbp)
je     13f2 <mem_test+0x282>
movq   $0x0,-0x8(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    13ed <mem_test+0x27d>
lea    -0x50(%rbp),%rax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %eax,%edi
call   1060 <loadhw_bp@plt>
cltq
cmp    -0x8(%rbp),%rax
je     13d7 <mem_test+0x267>
mov    $0x4,%edi
call   1050 <fail@plt>
jmp    13dc <mem_test+0x26c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    139e <mem_test+0x22e>
jmp    13f2 <mem_test+0x282>
movq   $0x0,-0x8(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    142f <mem_test+0x2bf>
mov    -0x8(%rbp),%rax
shl    $0x8,%rax
mov    %ax,%cx
mov    $0xf,%eax
sub    -0x8(%rbp),%rax
mov    %cx,-0x50(%rbp,%rax,2)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    13fa <mem_test+0x28a>
cmpb   $0x0,-0x9(%rbp)
je     14a1 <mem_test+0x331>
movq   $0x0,-0x8(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    149c <mem_test+0x32c>
lea    -0x50(%rbp),%rax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %eax,%edi
call   1060 <loadhw_bp@plt>
cltq
mov    $0xf,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x8,%rcx
cmp    %rcx,%rax
je     1486 <mem_test+0x316>
mov    $0x5,%edi
call   1050 <fail@plt>
jmp    148b <mem_test+0x31b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <mem_test+0x2d1>
jmp    14a1 <mem_test+0x331>
mov    $0x3,%edi
call   1040 <report_subtest@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x8,-0x8(%rbp)
jae    14fb <mem_test+0x38b>
mov    -0x8(%rbp),%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x8,%rcx
or     %rcx,%rax
or     -0x8(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    14b3 <mem_test+0x343>
cmpb   $0x0,-0x9(%rbp)
je     1580 <mem_test+0x410>
movq   $0x0,-0x8(%rbp)
cmpq   $0x8,-0x8(%rbp)
jae    157b <mem_test+0x40b>
lea    -0x70(%rbp),%rax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %eax,%edi
call   1070 <loadw_bp@plt>
mov    -0x8(%rbp),%rcx
shl    $0x18,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x10,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x8,%rdx
or     %rdx,%rcx
or     -0x8(%rbp),%rcx
cmp    %rcx,%rax
je     1565 <mem_test+0x3f5>
mov    $0x6,%edi
call   1050 <fail@plt>
jmp    156a <mem_test+0x3fa>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    150d <mem_test+0x39d>
jmp    1580 <mem_test+0x410>
mov    $0x4,%edi
call   1040 <report_subtest@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x4,-0x8(%rbp)
jae    1608 <mem_test+0x498>
mov    -0x8(%rbp),%rcx
shl    $0x38,%rcx
mov    -0x8(%rbp),%rax
shl    $0x30,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
shl    $0x28,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
shl    $0x20,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
shl    $0x18,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
shl    $0x10,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
shl    $0x8,%rax
or     %rax,%rcx
or     -0x8(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,-0x90(%rbp,%rax,8)
ff
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1592 <mem_test+0x422>
cmpb   $0x0,-0x9(%rbp)
je     16bc <mem_test+0x54c>
movq   $0x0,-0x8(%rbp)
cmpq   $0x4,-0x8(%rbp)
jae    16b7 <mem_test+0x547>
lea    -0x90(%rbp),%rax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %eax,%edi
call   1080 <loaddw_bp@plt>
mov    -0x8(%rbp),%rcx
shl    $0x38,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x30,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x28,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x20,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x18,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x10,%rdx
or     %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x8,%rdx
or     %rdx,%rcx
or     -0x8(%rbp),%rcx
cmp    %rcx,%rax
je     16a1 <mem_test+0x531>
mov    $0x7,%edi
call   1050 <fail@plt>
jmp    16a6 <mem_test+0x536>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    161a <mem_test+0x4aa>
jmp    16bc <mem_test+0x54c>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_test>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <report_mem_test@plt>
mov    $0x1,%edi
call   1040 <report_subtest@plt>
movb   $0x0,(%rsp)
movb   $0x1,0x1(%rsp)
movb   $0x2,0x2(%rsp)
movb   $0x3,0x3(%rsp)
movb   $0x4,0x4(%rsp)
movb   $0x5,0x5(%rsp)
movb   $0x6,0x6(%rsp)
movb   $0x7,0x7(%rsp)
movb   $0x8,0x8(%rsp)
movb   $0x9,0x9(%rsp)
movb   $0xa,0xa(%rsp)
movb   $0xb,0xb(%rsp)
movb   $0xc,0xc(%rsp)
movb   $0xd,0xd(%rsp)
movb   $0xe,0xe(%rsp)
movb   $0xf,0xf(%rsp)
movb   $0x10,0x10(%rsp)
movb   $0x11,0x11(%rsp)
movb   $0x12,0x12(%rsp)
movb   $0x13,0x13(%rsp)
movb   $0x14,0x14(%rsp)
movb   $0x15,0x15(%rsp)
movb   $0x16,0x16(%rsp)
movb   $0x17,0x17(%rsp)
movb   $0x18,0x18(%rsp)
movb   $0x19,0x19(%rsp)
movb   $0x1a,0x1a(%rsp)
movb   $0x1b,0x1b(%rsp)
movb   $0x1c,0x1c(%rsp)
movb   $0x1d,0x1d(%rsp)
movb   $0x1e,0x1e(%rsp)
movb   $0x1f,0x1f(%rsp)
jmp    123a <mem_test+0xca>
add    $0x1,%rbx
cmp    $0x20,%rbx
je     124d <mem_test+0xdd>
movsbq (%rsp,%rbx,1),%rax
cmp    %rax,%rbx
je     1230 <mem_test+0xc0>
xor    %edi,%edi
call   1050 <fail@plt>
jmp    1230 <mem_test+0xc0>
xor    %ebx,%ebx
mov    %rsp,%r14
jmp    126a <mem_test+0xfa>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
cmp    $0x20,%rbx
je     1286 <mem_test+0x116>
lea    (%r14,%rbx,1),%edi
call   1090 <loadb_bp@plt>
cltq
cmp    %rax,%rbx
je     1260 <mem_test+0xf0>
mov    $0x1,%edi
call   1050 <fail@plt>
jmp    1260 <mem_test+0xf0>
movb   $0x0,0x1f(%rsp)
movb   $0x1,0x1e(%rsp)
movb   $0x2,0x1d(%rsp)
movb   $0x3,0x1c(%rsp)
movb   $0x4,0x1b(%rsp)
movb   $0x5,0x1a(%rsp)
movb   $0x6,0x19(%rsp)
movb   $0x7,0x18(%rsp)
movb   $0x8,0x17(%rsp)
movb   $0x9,0x16(%rsp)
movb   $0xa,0x15(%rsp)
movb   $0xb,0x14(%rsp)
movb   $0xc,0x13(%rsp)
movb   $0xd,0x12(%rsp)
movb   $0xe,0x11(%rsp)
movb   $0xf,0x10(%rsp)
movb   $0x10,0xf(%rsp)
movb   $0x11,0xe(%rsp)
movb   $0x12,0xd(%rsp)
movb   $0x13,0xc(%rsp)
movb   $0x14,0xb(%rsp)
movb   $0x15,0xa(%rsp)
movb   $0x16,0x9(%rsp)
movb   $0x17,0x8(%rsp)
movb   $0x18,0x7(%rsp)
movb   $0x19,0x6(%rsp)
movb   $0x1a,0x5(%rsp)
movb   $0x1b,0x4(%rsp)
movb   $0x1c,0x3(%rsp)
movb   $0x1d,0x2(%rsp)
movb   $0x1e,0x1(%rsp)
movb   $0x1f,(%rsp)
mov    %rsp,%r14
mov    $0x1f,%ebx
jmp    133a <mem_test+0x1ca>
nop
add    $0x1,%r14d
add    $0xffffffffffffffff,%rbx
jae    1355 <mem_test+0x1e5>
mov    %r14d,%edi
call   1090 <loadb_bp@plt>
cltq
cmp    %rax,%rbx
je     1330 <mem_test+0x1c0>
mov    $0x2,%edi
call   1050 <fail@plt>
jmp    1330 <mem_test+0x1c0>
mov    $0x2,%edi
call   1040 <report_subtest@plt>
movw   $0x0,0x20(%rsp)
movw   $0x1,0x22(%rsp)
movw   $0x2,0x24(%rsp)
movw   $0x3,0x26(%rsp)
movw   $0x4,0x28(%rsp)
movw   $0x5,0x2a(%rsp)
movw   $0x6,0x2c(%rsp)
movw   $0x7,0x2e(%rsp)
movw   $0x8,0x30(%rsp)
movw   $0x9,0x32(%rsp)
movw   $0xa,0x34(%rsp)
movw   $0xb,0x36(%rsp)
movw   $0xc,0x38(%rsp)
movw   $0xd,0x3a(%rsp)
movw   $0xe,0x3c(%rsp)
movw   $0xf,0x3e(%rsp)
cmpw   $0x0,0x20(%rsp)
je     13e1 <mem_test+0x271>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x22(%rsp),%eax
cmp    $0x1,%ax
je     13f6 <mem_test+0x286>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x24(%rsp),%eax
cmp    $0x2,%ax
je     140b <mem_test+0x29b>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x26(%rsp),%eax
cmp    $0x3,%ax
je     1420 <mem_test+0x2b0>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x28(%rsp),%eax
cmp    $0x4,%ax
je     1435 <mem_test+0x2c5>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x2a(%rsp),%eax
cmp    $0x5,%ax
je     144a <mem_test+0x2da>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x2c(%rsp),%eax
cmp    $0x6,%ax
je     145f <mem_test+0x2ef>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x2e(%rsp),%eax
cmp    $0x7,%ax
je     1474 <mem_test+0x304>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x30(%rsp),%eax
cmp    $0x8,%ax
je     1489 <mem_test+0x319>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x32(%rsp),%eax
cmp    $0x9,%ax
je     149e <mem_test+0x32e>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x34(%rsp),%eax
cmp    $0xa,%ax
je     14b3 <mem_test+0x343>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x36(%rsp),%eax
cmp    $0xb,%ax
je     14c8 <mem_test+0x358>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x38(%rsp),%eax
cmp    $0xc,%ax
je     14dd <mem_test+0x36d>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x3a(%rsp),%eax
cmp    $0xd,%ax
je     14f2 <mem_test+0x382>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x3c(%rsp),%eax
cmp    $0xe,%ax
je     1507 <mem_test+0x397>
mov    $0x3,%edi
call   1050 <fail@plt>
movzwl 0x3e(%rsp),%eax
cmp    $0xf,%ax
je     151c <mem_test+0x3ac>
mov    $0x3,%edi
call   1050 <fail@plt>
lea    0x20(%rsp),%r14
xor    %ebx,%ebx
jmp    153e <mem_test+0x3ce>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
add    $0x2,%r14d
cmp    $0x10,%rbx
je     1559 <mem_test+0x3e9>
mov    %r14d,%edi
call   1060 <loadhw_bp@plt>
cltq
cmp    %rax,%rbx
je     1530 <mem_test+0x3c0>
mov    $0x4,%edi
call   1050 <fail@plt>
jmp    1530 <mem_test+0x3c0>
movw   $0x0,0x3e(%rsp)
movw   $0x100,0x3c(%rsp)
movw   $0x200,0x3a(%rsp)
movw   $0x300,0x38(%rsp)
movw   $0x400,0x36(%rsp)
movw   $0x500,0x34(%rsp)
movw   $0x600,0x32(%rsp)
movw   $0x700,0x30(%rsp)
movw   $0x800,0x2e(%rsp)
movw   $0x900,0x2c(%rsp)
movw   $0xa00,0x2a(%rsp)
movw   $0xb00,0x28(%rsp)
movw   $0xc00,0x26(%rsp)
movw   $0xd00,0x24(%rsp)
movw   $0xe00,0x22(%rsp)
movw   $0xf00,0x20(%rsp)
lea    0x20(%rsp),%r14
mov    $0xf00,%ebx
jmp    15f4 <mem_test+0x484>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x2,%r14d
add    $0xffffffffffffff00,%rbx
cmp    $0xffffffffffffff00,%rbx
je     160f <mem_test+0x49f>
mov    %r14d,%edi
call   1060 <loadhw_bp@plt>
cltq
cmp    %rax,%rbx
je     15e0 <mem_test+0x470>
mov    $0x5,%edi
call   1050 <fail@plt>
jmp    15e0 <mem_test+0x470>
mov    $0x3,%edi
call   1040 <report_subtest@plt>
movl   $0x0,0x40(%rsp)
movl   $0x1010101,0x44(%rsp)
01
movl   $0x2020202,0x48(%rsp)
02
movl   $0x3030303,0x4c(%rsp)
03
movl   $0x4040404,0x50(%rsp)
04
movl   $0x5050505,0x54(%rsp)
05
movl   $0x6060606,0x58(%rsp)
06
movl   $0x7070707,0x5c(%rsp)
07
lea    0x40(%rsp),%rdi
call   1070 <loadw_bp@plt>
test   %rax,%rax
je     1672 <mem_test+0x502>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
or     $0x4,%edi
call   1070 <loadw_bp@plt>
cmp    $0x1010101,%rax
je     1691 <mem_test+0x521>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
or     $0x8,%edi
call   1070 <loadw_bp@plt>
cmp    $0x2020202,%rax
je     16b0 <mem_test+0x540>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
or     $0xc,%edi
call   1070 <loadw_bp@plt>
cmp    $0x3030303,%rax
je     16cf <mem_test+0x55f>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
add    $0x10,%edi
call   1070 <loadw_bp@plt>
cmp    $0x4040404,%rax
je     16ee <mem_test+0x57e>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
add    $0x14,%edi
call   1070 <loadw_bp@plt>
cmp    $0x5050505,%rax
je     170d <mem_test+0x59d>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
add    $0x18,%edi
call   1070 <loadw_bp@plt>
cmp    $0x6060606,%rax
je     172c <mem_test+0x5bc>
mov    $0x6,%edi
call   1050 <fail@plt>
lea    0x40(%rsp),%rdi
add    $0x1c,%edi
call   1070 <loadw_bp@plt>
cmp    $0x7070707,%rax
je     174b <mem_test+0x5db>
mov    $0x6,%edi
call   1050 <fail@plt>
movabs $0x303030303030303,%r14
03 03 03
movabs $0x202020202020202,%r15
02 02 02
movabs $0x101010101010101,%rbx
01 01 01
mov    $0x4,%edi
call   1040 <report_subtest@plt>
movq   $0x0,0x60(%rsp)
mov    %rbx,0x68(%rsp)
mov    %r15,0x70(%rsp)
mov    %r14,0x78(%rsp)
lea    0x60(%rsp),%rdi
call   1080 <loaddw_bp@plt>
test   %rax,%rax
je     17a4 <mem_test+0x634>
mov    $0x7,%edi
call   1050 <fail@plt>
lea    0x60(%rsp),%rdi
or     $0x8,%edi
call   1080 <loaddw_bp@plt>
cmp    %rbx,%rax
je     17c0 <mem_test+0x650>
mov    $0x7,%edi
call   1050 <fail@plt>
lea    0x60(%rsp),%rdi
add    $0x10,%edi
call   1080 <loaddw_bp@plt>
cmp    %r15,%rax
je     17dc <mem_test+0x66c>
mov    $0x7,%edi
call   1050 <fail@plt>
lea    0x60(%rsp),%rdi
add    $0x18,%edi
call   1080 <loaddw_bp@plt>
cmp    %r14,%rax
je     17f8 <mem_test+0x688>
mov    $0x7,%edi
call   1050 <fail@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @mem_test() {
%1 = alloca i64
%2 = alloca i8
%3 = alloca [32 x i8]
%4 = alloca [16 x i16]
%5 = alloca [8 x i32]
%6 = alloca [4 x i64]
%7 = call i32 (...) @report_mem_test()
store i8 1, i8* %2
%8 = call i32 @report_subtest(i32 1)
store i64 0, i64* %1
br label %9
9: ; preds = %17, %0
%10 = load i64, i64* %1
%11 = icmp ult i64 %10, 32
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i64, i64* %1
%14 = trunc i64 %13 to i8
%15 = load i64, i64* %1
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %15
store volatile i8 %14, i8* %16
br label %17
17: ; preds = %12
%18 = load i64, i64* %1
%19 = add i64 %18, 1
store i64 %19, i64* %1
br label %9
20: ; preds = %9
store i64 0, i64* %1
br label %21
21: ; preds = %34, %20
%22 = load i64, i64* %1
%23 = icmp ult i64 %22, 32
br i1 %23, label %24, label %37
24: ; preds = %21
%25 = load i64, i64* %1
%26 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %25
%27 = load volatile i8, i8* %26
%28 = sext i8 %27 to i64
%29 = load i64, i64* %1
%30 = icmp ne i64 %28, %29
br i1 %30, label %31, label %33
31: ; preds = %24
%32 = call i32 @fail(i32 0)
br label %33
33: ; preds = %31, %24
br label %34
34: ; preds = %33
%35 = load i64, i64* %1
%36 = add i64 %35, 1
store i64 %36, i64* %1
br label %21
37: ; preds = %21
%38 = load i8, i8* %2
%39 = icmp ne i8 %38, 0
br i1 %39, label %40, label %62
40: ; preds = %37
store i64 0, i64* %1
br label %41
41: ; preds = %58, %40
%42 = load i64, i64* %1
%43 = icmp ult i64 %42, 32
br i1 %43, label %44, label %61
44: ; preds = %41
%45 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%46 = ptrtoint i8* %45 to i32
%47 = zext i32 %46 to i64
%48 = load i64, i64* %1
%49 = add i64 %47, %48
%50 = trunc i64 %49 to i32
%51 = call i32 @loadb_bp(i32 %50)
%52 = sext i32 %51 to i64
%53 = load i64, i64* %1
%54 = icmp ne i64 %52, %53
br i1 %54, label %55, label %57
55: ; preds = %44
%56 = call i32 @fail(i32 1)
br label %57
57: ; preds = %55, %44
br label %58
58: ; preds = %57
%59 = load i64, i64* %1
%60 = add i64 %59, 1
store i64 %60, i64* %1
br label %41
61: ; preds = %41
br label %62
62: ; preds = %61, %37
store i64 0, i64* %1
br label %63
63: ; preds = %72, %62
%64 = load i64, i64* %1
%65 = icmp ult i64 %64, 32
br i1 %65, label %66, label %75
66: ; preds = %63
%67 = load i64, i64* %1
%68 = trunc i64 %67 to i8
%69 = load i64, i64* %1
%70 = sub i64 31, %69
%71 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %70
store volatile i8 %68, i8* %71
br label %72
72: ; preds = %66
%73 = load i64, i64* %1
%74 = add i64 %73, 1
store i64 %74, i64* %1
br label %63
75: ; preds = %63
%76 = load i8, i8* %2
%77 = icmp ne i8 %76, 0
br i1 %77, label %78, label %101
78: ; preds = %75
store i64 0, i64* %1
br label %79
79: ; preds = %97, %78
%80 = load i64, i64* %1
%81 = icmp ult i64 %80, 32
br i1 %81, label %82, label %100
82: ; preds = %79
%83 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%84 = ptrtoint i8* %83 to i32
%85 = zext i32 %84 to i64
%86 = load i64, i64* %1
%87 = add i64 %85, %86
%88 = trunc i64 %87 to i32
%89 = call i32 @loadb_bp(i32 %88)
%90 = sext i32 %89 to i64
%91 = load i64, i64* %1
%92 = sub i64 31, %91
%93 = icmp ne i64 %90, %92
br i1 %93, label %94, label %96
94: ; preds = %82
%95 = call i32 @fail(i32 2)
br label %96
96: ; preds = %94, %82
br label %97
97: ; preds = %96
%98 = load i64, i64* %1
%99 = add i64 %98, 1
store i64 %99, i64* %1
br label %79
100: ; preds = %79
br label %101
101: ; preds = %100, %75
%102 = call i32 @report_subtest(i32 2)
store i64 0, i64* %1
br label %103
103: ; preds = %111, %101
%104 = load i64, i64* %1
%105 = icmp ult i64 %104, 16
br i1 %105, label %106, label %114
106: ; preds = %103
%107 = load i64, i64* %1
%108 = trunc i64 %107 to i16
%109 = load i64, i64* %1
%110 = getelementptr inbounds [16 x i16], [16 x i16]* %4, i64 0, i64 %109
store volatile i16 %108, i16* %110
br label %111
111: ; preds = %106
%112 = load i64, i64* %1
%113 = add i64 %112, 1
store i64 %113, i64* %1
br label %103
114: ; preds = %103
store i64 0, i64* %1
br label %115
115: ; preds = %128, %114
%116 = load i64, i64* %1
%117 = icmp ult i64 %116, 16
br i1 %117, label %118, label %131
118: ; preds = %115
%119 = load i64, i64* %1
%120 = getelementptr inbounds [16 x i16], [16 x i16]* %4, i64 0, i64 %119
%121 = load volatile i16, i16* %120
%122 = zext i16 %121 to i64
%123 = load i64, i64* %1
%124 = icmp ne i64 %122, %123
br i1 %124, label %125, label %127
125: ; preds = %118
%126 = call i32 @fail(i32 3)
br label %127
127: ; preds = %125, %118
br label %128
128: ; preds = %127
%129 = load i64, i64* %1
%130 = add i64 %129, 1
store i64 %130, i64* %1
br label %115
131: ; preds = %115
%132 = load i8, i8* %2
%133 = icmp ne i8 %132, 0
br i1 %133, label %134, label %157
134: ; preds = %131
store i64 0, i64* %1
br label %135
135: ; preds = %153, %134
%136 = load i64, i64* %1
%137 = icmp ult i64 %136, 16
br i1 %137, label %138, label %156
138: ; preds = %135
%139 = getelementptr inbounds [16 x i16], [16 x i16]* %4, i64 0, i64 0
%140 = ptrtoint i16* %139 to i32
%141 = zext i32 %140 to i64
%142 = load i64, i64* %1
%143 = mul i64 %142, 2
%144 = add i64 %141, %143
%145 = trunc i64 %144 to i32
%146 = call i32 @loadhw_bp(i32 %145)
%147 = sext i32 %146 to i64
%148 = load i64, i64* %1
%149 = icmp ne i64 %147, %148
br i1 %149, label %150, label %152
150: ; preds = %138
%151 = call i32 @fail(i32 4)
br label %152
152: ; preds = %150, %138
br label %153
153: ; preds = %152
%154 = load i64, i64* %1
%155 = add i64 %154, 1
store i64 %155, i64* %1
br label %135
156: ; preds = %135
br label %157
157: ; preds = %156, %131
store i64 0, i64* %1
br label %158
158: ; preds = %168, %157
%159 = load i64, i64* %1
%160 = icmp ult i64 %159, 16
br i1 %160, label %161, label %171
161: ; preds = %158
%162 = load i64, i64* %1
%163 = shl i64 %162, 8
%164 = trunc i64 %163 to i16
%165 = load i64, i64* %1
%166 = sub i64 15, %165
%167 = getelementptr inbounds [16 x i16], [16 x i16]* %4, i64 0, i64 %166
store volatile i16 %164, i16* %167
br label %168
168: ; preds = %161
%169 = load i64, i64* %1
%170 = add i64 %169, 1
store i64 %170, i64* %1
br label %158
171: ; preds = %158
%172 = load i8, i8* %2
%173 = icmp ne i8 %172, 0
br i1 %173, label %174, label %199
174: ; preds = %171
store i64 0, i64* %1
br label %175
175: ; preds = %195, %174
%176 = load i64, i64* %1
%177 = icmp ult i64 %176, 16
br i1 %177, label %178, label %198
178: ; preds = %175
%179 = getelementptr inbounds [16 x i16], [16 x i16]* %4, i64 0, i64 0
%180 = ptrtoint i16* %179 to i32
%181 = zext i32 %180 to i64
%182 = load i64, i64* %1
%183 = mul i64 %182, 2
%184 = add i64 %181, %183
%185 = trunc i64 %184 to i32
%186 = call i32 @loadhw_bp(i32 %185)
%187 = sext i32 %186 to i64
%188 = load i64, i64* %1
%189 = sub i64 15, %188
%190 = shl i64 %189, 8
%191 = icmp ne i64 %187, %190
br i1 %191, label %192, label %194
192: ; preds = %178
%193 = call i32 @fail(i32 5)
br label %194
194: ; preds = %192, %178
br label %195
195: ; preds = %194
%196 = load i64, i64* %1
%197 = add i64 %196, 1
store i64 %197, i64* %1
br label %175
198: ; preds = %175
br label %199
199: ; preds = %198, %171
%200 = call i32 @report_subtest(i32 3)
store i64 0, i64* %1
br label %201
201: ; preds = %218, %199
%202 = load i64, i64* %1
%203 = icmp ult i64 %202, 8
br i1 %203, label %204, label %221
204: ; preds = %201
%205 = load i64, i64* %1
%206 = shl i64 %205, 24
%207 = load i64, i64* %1
%208 = shl i64 %207, 16
%209 = or i64 %206, %208
%210 = load i64, i64* %1
%211 = shl i64 %210, 8
%212 = or i64 %209, %211
%213 = load i64, i64* %1
%214 = or i64 %212, %213
%215 = trunc i64 %214 to i32
%216 = load i64, i64* %1
%217 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 %216
store volatile i32 %215, i32* %217
br label %218
218: ; preds = %204
%219 = load i64, i64* %1
%220 = add i64 %219, 1
store i64 %220, i64* %1
br label %201
221: ; preds = %201
%222 = load i8, i8* %2
%223 = icmp ne i8 %222, 0
br i1 %223, label %224, label %255
224: ; preds = %221
store i64 0, i64* %1
br label %225
225: ; preds = %251, %224
%226 = load i64, i64* %1
%227 = icmp ult i64 %226, 8
br i1 %227, label %228, label %254
228: ; preds = %225
%229 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%230 = ptrtoint i32* %229 to i32
%231 = zext i32 %230 to i64
%232 = load i64, i64* %1
%233 = mul i64 %232, 4
%234 = add i64 %231, %233
%235 = trunc i64 %234 to i32
%236 = call i64 @loadw_bp(i32 %235)
%237 = load i64, i64* %1
%238 = shl i64 %237, 24
%239 = load i64, i64* %1
%240 = shl i64 %239, 16
%241 = or i64 %238, %240
%242 = load i64, i64* %1
%243 = shl i64 %242, 8
%244 = or i64 %241, %243
%245 = load i64, i64* %1
%246 = or i64 %244, %245
%247 = icmp ne i64 %236, %246
br i1 %247, label %248, label %250
248: ; preds = %228
%249 = call i32 @fail(i32 6)
br label %250
250: ; preds = %248, %228
br label %251
251: ; preds = %250
%252 = load i64, i64* %1
%253 = add i64 %252, 1
store i64 %253, i64* %1
br label %225
254: ; preds = %225
br label %255
255: ; preds = %254, %221
%256 = call i32 @report_subtest(i32 4)
store i64 0, i64* %1
br label %257
257: ; preds = %285, %255
%258 = load i64, i64* %1
%259 = icmp ult i64 %258, 4
br i1 %259, label %260, label %288
260: ; preds = %257
%261 = load i64, i64* %1
%262 = shl i64 %261, 56
%263 = load i64, i64* %1
%264 = shl i64 %263, 48
%265 = or i64 %262, %264
%266 = load i64, i64* %1
%267 = shl i64 %266, 40
%268 = or i64 %265, %267
%269 = load i64, i64* %1
%270 = shl i64 %269, 32
%271 = or i64 %268, %270
%272 = load i64, i64* %1
%273 = shl i64 %272, 24
%274 = or i64 %271, %273
%275 = load i64, i64* %1
%276 = shl i64 %275, 16
%277 = or i64 %274, %276
%278 = load i64, i64* %1
%279 = shl i64 %278, 8
%280 = or i64 %277, %279
%281 = load i64, i64* %1
%282 = or i64 %280, %281
%283 = load i64, i64* %1
%284 = getelementptr inbounds [4 x i64], [4 x i64]* %6, i64 0, i64 %283
store volatile i64 %282, i64* %284
br label %285
285: ; preds = %260
%286 = load i64, i64* %1
%287 = add i64 %286, 1
store i64 %287, i64* %1
br label %257
288: ; preds = %257
%289 = load i8, i8* %2
%290 = icmp ne i8 %289, 0
br i1 %290, label %291, label %334
291: ; preds = %288
store i64 0, i64* %1
br label %292
292: ; preds = %330, %291
%293 = load i64, i64* %1
%294 = icmp ult i64 %293, 4
br i1 %294, label %295, label %333
295: ; preds = %292
%296 = getelementptr inbounds [4 x i64], [4 x i64]* %6, i64 0, i64 0
%297 = ptrtoint i64* %296 to i32
%298 = zext i32 %297 to i64
%299 = load i64, i64* %1
%300 = mul i64 %299, 8
%301 = add i64 %298, %300
%302 = trunc i64 %301 to i32
%303 = call i64 @loaddw_bp(i32 %302)
%304 = load i64, i64* %1
%305 = shl i64 %304, 56
%306 = load i64, i64* %1
%307 = shl i64 %306, 48
%308 = or i64 %305, %307
%309 = load i64, i64* %1
%310 = shl i64 %309, 40
%311 = or i64 %308, %310
%312 = load i64, i64* %1
%313 = shl i64 %312, 32
%314 = or i64 %311, %313
%315 = load i64, i64* %1
%316 = shl i64 %315, 24
%317 = or i64 %314, %316
%318 = load i64, i64* %1
%319 = shl i64 %318, 16
%320 = or i64 %317, %319
%321 = load i64, i64* %1
%322 = shl i64 %321, 8
%323 = or i64 %320, %322
%324 = load i64, i64* %1
%325 = or i64 %323, %324
%326 = icmp ne i64 %303, %325
br i1 %326, label %327, label %329
327: ; preds = %295
%328 = call i32 @fail(i32 7)
br label %329
329: ; preds = %327, %295
br label %330
330: ; preds = %329
%331 = load i64, i64* %1
%332 = add i64 %331, 1
store i64 %332, i64* %1
br label %292
333: ; preds = %292
br label %334
334: ; preds = %333, %288
ret i32 0
}

LLVM IR (-O2):
define i32 @mem_test() {
%1 = alloca [32 x i8]
%2 = alloca [16 x i16]
%3 = alloca [8 x i32]
%4 = alloca [4 x i64]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%6 = bitcast [16 x i16]* %2 to i8*
%7 = bitcast [8 x i32]* %3 to i8*
%8 = bitcast [4 x i64]* %4 to i8*
%9 = tail call i32 (...) @report_mem_test()
%10 = tail call i32 @report_subtest(i32 1)
store volatile i8 0, i8* %5
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 1
store volatile i8 1, i8* %11
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 2
store volatile i8 2, i8* %12
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 3
store volatile i8 3, i8* %13
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
store volatile i8 4, i8* %14
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 5
store volatile i8 5, i8* %15
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 6
store volatile i8 6, i8* %16
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 7
store volatile i8 7, i8* %17
%18 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 8
store volatile i8 8, i8* %18
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 9
store volatile i8 9, i8* %19
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 10
store volatile i8 10, i8* %20
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 11
store volatile i8 11, i8* %21
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 12
store volatile i8 12, i8* %22
%23 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 13
store volatile i8 13, i8* %23
%24 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 14
store volatile i8 14, i8* %24
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 15
store volatile i8 15, i8* %25
%26 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 16
store volatile i8 16, i8* %26
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 17
store volatile i8 17, i8* %27
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 18
store volatile i8 18, i8* %28
%29 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 19
store volatile i8 19, i8* %29
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 20
store volatile i8 20, i8* %30
%31 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 21
store volatile i8 21, i8* %31
%32 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 22
store volatile i8 22, i8* %32
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 23
store volatile i8 23, i8* %33
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 24
store volatile i8 24, i8* %34
%35 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 25
store volatile i8 25, i8* %35
%36 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 26
store volatile i8 26, i8* %36
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 27
store volatile i8 27, i8* %37
%38 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 28
store volatile i8 28, i8* %38
%39 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 29
store volatile i8 29, i8* %39
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 30
store volatile i8 30, i8* %40
%41 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 31
store volatile i8 31, i8* %41
br label %44
42: ; preds = %52
%43 = ptrtoint [32 x i8]* %1 to i64
br label %55
44: ; preds = %0, %52
%45 = phi i64 [ %53, %52 ], [ 0, %0 ]
%46 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 %45
%47 = load volatile i8, i8* %46
%48 = sext i8 %47 to i64
%49 = icmp eq i64 %45, %48
br i1 %49, label %52, label %50
50: ; preds = %44
%51 = tail call i32 @fail(i32 0)
br label %52
52: ; preds = %44, %50
%53 = add nuw nsw i64 %45, 1
%54 = icmp eq i64 %53, 32
br i1 %54, label %42, label %44
55: ; preds = %42, %64
%56 = phi i64 [ 0, %42 ], [ %65, %64 ]
%57 = add i64 %56, %43
%58 = trunc i64 %57 to i32
%59 = call i32 @loadb_bp(i32 %58)
%60 = sext i32 %59 to i64
%61 = icmp eq i64 %56, %60
br i1 %61, label %64, label %62
62: ; preds = %55
%63 = call i32 @fail(i32 1)
br label %64
64: ; preds = %55, %62
%65 = add nuw nsw i64 %56, 1
%66 = icmp eq i64 %65, 32
br i1 %66, label %67, label %55
67: ; preds = %64
store volatile i8 0, i8* %41
store volatile i8 1, i8* %40
store volatile i8 2, i8* %39
store volatile i8 3, i8* %38
store volatile i8 4, i8* %37
store volatile i8 5, i8* %36
store volatile i8 6, i8* %35
store volatile i8 7, i8* %34
store volatile i8 8, i8* %33
store volatile i8 9, i8* %32
store volatile i8 10, i8* %31
store volatile i8 11, i8* %30
store volatile i8 12, i8* %29
store volatile i8 13, i8* %28
store volatile i8 14, i8* %27
store volatile i8 15, i8* %26
store volatile i8 16, i8* %25
store volatile i8 17, i8* %24
store volatile i8 18, i8* %23
store volatile i8 19, i8* %22
store volatile i8 20, i8* %21
store volatile i8 21, i8* %20
store volatile i8 22, i8* %19
store volatile i8 23, i8* %18
store volatile i8 24, i8* %17
store volatile i8 25, i8* %16
store volatile i8 26, i8* %15
store volatile i8 27, i8* %14
store volatile i8 28, i8* %13
store volatile i8 29, i8* %12
store volatile i8 30, i8* %11
store volatile i8 31, i8* %5
br label %68
68: ; preds = %67, %78
%69 = phi i64 [ 0, %67 ], [ %79, %78 ]
%70 = add i64 %69, %43
%71 = trunc i64 %70 to i32
%72 = call i32 @loadb_bp(i32 %71)
%73 = sext i32 %72 to i64
%74 = sub nuw nsw i64 31, %69
%75 = icmp eq i64 %74, %73
br i1 %75, label %78, label %76
76: ; preds = %68
%77 = call i32 @fail(i32 2)
br label %78
78: ; preds = %68, %76
%79 = add nuw nsw i64 %69, 1
%80 = icmp eq i64 %79, 32
br i1 %80, label %81, label %68
81: ; preds = %78
%82 = call i32 @report_subtest(i32 2)
%83 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 0
store volatile i16 0, i16* %83
%84 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 1
store volatile i16 1, i16* %84
%85 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 2
store volatile i16 2, i16* %85
%86 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 3
store volatile i16 3, i16* %86
%87 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 4
store volatile i16 4, i16* %87
%88 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 5
store volatile i16 5, i16* %88
%89 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 6
store volatile i16 6, i16* %89
%90 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 7
store volatile i16 7, i16* %90
%91 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 8
store volatile i16 8, i16* %91
%92 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 9
store volatile i16 9, i16* %92
%93 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 10
store volatile i16 10, i16* %93
%94 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 11
store volatile i16 11, i16* %94
%95 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 12
store volatile i16 12, i16* %95
%96 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 13
store volatile i16 13, i16* %96
%97 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 14
store volatile i16 14, i16* %97
%98 = getelementptr inbounds [16 x i16], [16 x i16]* %2, i64 0, i64 15
store volatile i16 15, i16* %98
%99 = load volatile i16, i16* %83
%100 = icmp eq i16 %99, 0
br i1 %100, label %103, label %101
101: ; preds = %81
%102 = call i32 @fail(i32 3)
br label %103
103: ; preds = %81, %101
%104 = load volatile i16, i16* %84
%105 = icmp eq i16 %104, 1
br i1 %105, label %108, label %106
106: ; preds = %103
%107 = call i32 @fail(i32 3)
br label %108
108: ; preds = %106, %103
%109 = load volatile i16, i16* %85
%110 = icmp eq i16 %109, 2
br i1 %110, label %113, label %111
111: ; preds = %108
%112 = call i32 @fail(i32 3)
br label %113
113: ; preds = %111, %108
%114 = load volatile i16, i16* %86
%115 = icmp eq i16 %114, 3
br i1 %115, label %118, label %116
116: ; preds = %113
%117 = call i32 @fail(i32 3)
br label %118
118: ; preds = %116, %113
%119 = load volatile i16, i16* %87
%120 = icmp eq i16 %119, 4
br i1 %120, label %123, label %121
121: ; preds = %118
%122 = call i32 @fail(i32 3)
br label %123
123: ; preds = %121, %118
%124 = load volatile i16, i16* %88
%125 = icmp eq i16 %124, 5
br i1 %125, label %128, label %126
126: ; preds = %123
%127 = call i32 @fail(i32 3)
br label %128
128: ; preds = %126, %123
%129 = load volatile i16, i16* %89
%130 = icmp eq i16 %129, 6
br i1 %130, label %133, label %131
131: ; preds = %128
%132 = call i32 @fail(i32 3)
br label %133
133: ; preds = %131, %128
%134 = load volatile i16, i16* %90
%135 = icmp eq i16 %134, 7
br i1 %135, label %138, label %136
136: ; preds = %133
%137 = call i32 @fail(i32 3)
br label %138
138: ; preds = %136, %133
%139 = load volatile i16, i16* %91
%140 = icmp eq i16 %139, 8
br i1 %140, label %143, label %141
141: ; preds = %138
%142 = call i32 @fail(i32 3)
br label %143
143: ; preds = %141, %138
%144 = load volatile i16, i16* %92
%145 = icmp eq i16 %144, 9
br i1 %145, label %148, label %146
146: ; preds = %143
%147 = call i32 @fail(i32 3)
br label %148
148: ; preds = %146, %143
%149 = load volatile i16, i16* %93
%150 = icmp eq i16 %149, 10
br i1 %150, label %153, label %151
151: ; preds = %148
%152 = call i32 @fail(i32 3)
br label %153
153: ; preds = %151, %148
%154 = load volatile i16, i16* %94
%155 = icmp eq i16 %154, 11
br i1 %155, label %158, label %156
156: ; preds = %153
%157 = call i32 @fail(i32 3)
br label %158
158: ; preds = %156, %153
%159 = load volatile i16, i16* %95
%160 = icmp eq i16 %159, 12
br i1 %160, label %163, label %161
161: ; preds = %158
%162 = call i32 @fail(i32 3)
br label %163
163: ; preds = %161, %158
%164 = load volatile i16, i16* %96
%165 = icmp eq i16 %164, 13
br i1 %165, label %168, label %166
166: ; preds = %163
%167 = call i32 @fail(i32 3)
br label %168
168: ; preds = %166, %163
%169 = load volatile i16, i16* %97
%170 = icmp eq i16 %169, 14
br i1 %170, label %173, label %171
171: ; preds = %168
%172 = call i32 @fail(i32 3)
br label %173
173: ; preds = %171, %168
%174 = load volatile i16, i16* %98
%175 = icmp eq i16 %174, 15
br i1 %175, label %178, label %176
176: ; preds = %173
%177 = call i32 @fail(i32 3)
br label %178
178: ; preds = %176, %173
%179 = ptrtoint [16 x i16]* %2 to i64
br label %180
180: ; preds = %178, %190
%181 = phi i64 [ 0, %178 ], [ %191, %190 ]
%182 = shl nuw nsw i64 %181, 1
%183 = add i64 %182, %179
%184 = trunc i64 %183 to i32
%185 = call i32 @loadhw_bp(i32 %184)
%186 = sext i32 %185 to i64
%187 = icmp eq i64 %181, %186
br i1 %187, label %190, label %188
188: ; preds = %180
%189 = call i32 @fail(i32 4)
br label %190
190: ; preds = %180, %188
%191 = add nuw nsw i64 %181, 1
%192 = icmp eq i64 %191, 16
br i1 %192, label %193, label %180
193: ; preds = %190
store volatile i16 0, i16* %98
store volatile i16 256, i16* %97
store volatile i16 512, i16* %96
store volatile i16 768, i16* %95
store volatile i16 1024, i16* %94
store volatile i16 1280, i16* %93
store volatile i16 1536, i16* %92
store volatile i16 1792, i16* %91
store volatile i16 2048, i16* %90
store volatile i16 2304, i16* %89
store volatile i16 2560, i16* %88
store volatile i16 2816, i16* %87
store volatile i16 3072, i16* %86
store volatile i16 3328, i16* %85
store volatile i16 3584, i16* %84
store volatile i16 3840, i16* %83
br label %194
194: ; preds = %193, %206
%195 = phi i64 [ 0, %193 ], [ %207, %206 ]
%196 = shl nuw nsw i64 %195, 1
%197 = add i64 %196, %179
%198 = trunc i64 %197 to i32
%199 = call i32 @loadhw_bp(i32 %198)
%200 = sext i32 %199 to i64
%201 = mul nsw i64 %195, -256
%202 = add nsw i64 %201, 3840
%203 = icmp eq i64 %202, %200
br i1 %203, label %206, label %204
204: ; preds = %194
%205 = call i32 @fail(i32 5)
br label %206
206: ; preds = %194, %204
%207 = add nuw nsw i64 %195, 1
%208 = icmp eq i64 %207, 16
br i1 %208, label %209, label %194
209: ; preds = %206
%210 = call i32 @report_subtest(i32 3)
%211 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
store volatile i32 0, i32* %211
%212 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 1
store volatile i32 16843009, i32* %212
%213 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 2
store volatile i32 33686018, i32* %213
%214 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 3
store volatile i32 50529027, i32* %214
%215 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 4
store volatile i32 67372036, i32* %215
%216 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 5
store volatile i32 84215045, i32* %216
%217 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 6
store volatile i32 101058054, i32* %217
%218 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 7
store volatile i32 117901063, i32* %218
%219 = ptrtoint [8 x i32]* %3 to i64
%220 = trunc i64 %219 to i32
%221 = call i64 @loadw_bp(i32 %220)
%222 = icmp eq i64 %221, 0
br i1 %222, label %225, label %223
223: ; preds = %209
%224 = call i32 @fail(i32 6)
br label %225
225: ; preds = %209, %223
%226 = trunc i64 %219 to i32
%227 = or i32 %226, 4
%228 = call i64 @loadw_bp(i32 %227)
%229 = icmp eq i64 %228, 16843009
br i1 %229, label %232, label %230
230: ; preds = %225
%231 = call i32 @fail(i32 6)
br label %232
232: ; preds = %230, %225
%233 = trunc i64 %219 to i32
%234 = or i32 %233, 8
%235 = call i64 @loadw_bp(i32 %234)
%236 = icmp eq i64 %235, 33686018
br i1 %236, label %239, label %237
237: ; preds = %232
%238 = call i32 @fail(i32 6)
br label %239
239: ; preds = %237, %232
%240 = trunc i64 %219 to i32
%241 = or i32 %240, 12
%242 = call i64 @loadw_bp(i32 %241)
%243 = icmp eq i64 %242, 50529027
br i1 %243, label %246, label %244
244: ; preds = %239
%245 = call i32 @fail(i32 6)
br label %246
246: ; preds = %244, %239
%247 = trunc i64 %219 to i32
%248 = add i32 %247, 16
%249 = call i64 @loadw_bp(i32 %248)
%250 = icmp eq i64 %249, 67372036
br i1 %250, label %253, label %251
251: ; preds = %246
%252 = call i32 @fail(i32 6)
br label %253
253: ; preds = %251, %246
%254 = trunc i64 %219 to i32
%255 = add i32 %254, 20
%256 = call i64 @loadw_bp(i32 %255)
%257 = icmp eq i64 %256, 84215045
br i1 %257, label %260, label %258
258: ; preds = %253
%259 = call i32 @fail(i32 6)
br label %260
260: ; preds = %258, %253
%261 = trunc i64 %219 to i32
%262 = add i32 %261, 24
%263 = call i64 @loadw_bp(i32 %262)
%264 = icmp eq i64 %263, 101058054
br i1 %264, label %267, label %265
265: ; preds = %260
%266 = call i32 @fail(i32 6)
br label %267
267: ; preds = %265, %260
%268 = trunc i64 %219 to i32
%269 = add i32 %268, 28
%270 = call i64 @loadw_bp(i32 %269)
%271 = icmp eq i64 %270, 117901063
br i1 %271, label %274, label %272
272: ; preds = %267
%273 = call i32 @fail(i32 6)
br label %274
274: ; preds = %272, %267
%275 = call i32 @report_subtest(i32 4)
%276 = getelementptr inbounds [4 x i64], [4 x i64]* %4, i64 0, i64 0
store volatile i64 0, i64* %276
%277 = getelementptr inbounds [4 x i64], [4 x i64]* %4, i64 0, i64 1
store volatile i64 72340172838076673, i64* %277
%278 = getelementptr inbounds [4 x i64], [4 x i64]* %4, i64 0, i64 2
store volatile i64 144680345676153346, i64* %278
%279 = getelementptr inbounds [4 x i64], [4 x i64]* %4, i64 0, i64 3
store volatile i64 217020518514230019, i64* %279
%280 = ptrtoint [4 x i64]* %4 to i64
%281 = trunc i64 %280 to i32
%282 = call i64 @loaddw_bp(i32 %281)
%283 = icmp eq i64 %282, 0
br i1 %283, label %286, label %284
284: ; preds = %274
%285 = call i32 @fail(i32 7)
br label %286
286: ; preds = %274, %284
%287 = trunc i64 %280 to i32
%288 = or i32 %287, 8
%289 = call i64 @loaddw_bp(i32 %288)
%290 = icmp eq i64 %289, 72340172838076673
br i1 %290, label %293, label %291
291: ; preds = %286
%292 = call i32 @fail(i32 7)
br label %293
293: ; preds = %291, %286
%294 = trunc i64 %280 to i32
%295 = add i32 %294, 16
%296 = call i64 @loaddw_bp(i32 %295)
%297 = icmp eq i64 %296, 144680345676153346
br i1 %297, label %300, label %298
298: ; preds = %293
%299 = call i32 @fail(i32 7)
br label %300
300: ; preds = %298, %293
%301 = trunc i64 %280 to i32
%302 = add i32 %301, 24
%303 = call i64 @loaddw_bp(i32 %302)
%304 = icmp eq i64 %303, 217020518514230019
br i1 %304, label %307, label %305
305: ; preds = %300
%306 = call i32 @fail(i32 7)
br label %307
307: ; preds = %305, %300
ret i32 0
}