#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*/ assertTrue(char *, int);
void test_real96_pointers() {
  long double a[6];
  a[0] = 100;
  a[1] = 101;
  a[2] = 102;
  a[3] = 103;
  a[4] = 104;
  a[5] = 105;
  long double *pa = &a[0];
  long double *pb = &a[3];
  assertTrue("*pa == 100", *pa == 100);
  ;
  assertTrue("*pb == 103", *pb == 103);
  ;
  assertTrue("pb[2] == 105", pb[2] == 105);
  ;
}


x86 assembly (clang, -O0):
<test_real96_pointers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
flds   0xedf(%rip)
fld    %st(0)
fstpt  -0x60(%rbp)
flds   0xed8(%rip)
fstpt  -0x50(%rbp)
flds   0xed3(%rip)
fstpt  -0x40(%rbp)
lea    -0x30(%rbp),%rax
flds   0xeca(%rip)
fld    %st(0)
fstpt  -0x88(%rbp)
fstpt  -0x30(%rbp)
flds   0xebd(%rip)
fstpt  -0x20(%rbp)
flds   0xeb8(%rip)
fld    %st(0)
fstpt  -0x7c(%rbp)
fstpt  -0x10(%rbp)
lea    -0x60(%rbp),%rcx
mov    %rcx,-0x68(%rbp)
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
movzbl %al,%esi
lea    0xe8a(%rip),%rdi
call   1030 <assertTrue@plt>
fldt   -0x88(%rbp)
mov    -0x70(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
movzbl %al,%esi
lea    0xe6c(%rip),%rdi
call   1030 <assertTrue@plt>
fldt   -0x7c(%rbp)
mov    -0x70(%rbp),%rax
fldt   0x20(%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe4e(%rip),%rdi
call   1030 <assertTrue@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_real96_pointers>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xedc(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"*pa == 100\00"
@.str.1 = [11 x i8] c"*pb == 103\00"
@.str.2 = [13 x i8] c"pb[2] == 105\00"
define void @test_real96_pointers() {
%1 = alloca [6 x x86_fp80]
%2 = alloca x86_fp80*
%3 = alloca x86_fp80*
%4 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 0
store x86_fp80 0xK4005C800000000000000, x86_fp80* %4
%5 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 1
store x86_fp80 0xK4005CA00000000000000, x86_fp80* %5
%6 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 2
store x86_fp80 0xK4005CC00000000000000, x86_fp80* %6
%7 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 3
store x86_fp80 0xK4005CE00000000000000, x86_fp80* %7
%8 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 4
store x86_fp80 0xK4005D000000000000000, x86_fp80* %8
%9 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 5
store x86_fp80 0xK4005D200000000000000, x86_fp80* %9
%10 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 0
store x86_fp80* %10, x86_fp80** %2
%11 = getelementptr inbounds [6 x x86_fp80], [6 x x86_fp80]* %1, i64 0, i64 3
store x86_fp80* %11, x86_fp80** %3
%12 = load x86_fp80*, x86_fp80** %2
%13 = load x86_fp80, x86_fp80* %12
%14 = fcmp oeq x86_fp80 %13, 0xK4005C800000000000000
%15 = zext i1 %14 to i32
%16 = call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load x86_fp80*, x86_fp80** %3
%18 = load x86_fp80, x86_fp80* %17
%19 = fcmp oeq x86_fp80 %18, 0xK4005CE00000000000000
%20 = zext i1 %19 to i32
%21 = call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = load x86_fp80*, x86_fp80** %3
%23 = getelementptr inbounds x86_fp80, x86_fp80* %22, i64 2
%24 = load x86_fp80, x86_fp80* %23
%25 = fcmp oeq x86_fp80 %24, 0xK4005D200000000000000
%26 = zext i1 %25 to i32
%27 = call i32 @assertTrue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %26)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"*pa == 100\00"
@.str.1 = [11 x i8] c"*pb == 103\00"
@.str.2 = [13 x i8] c"pb[2] == 105\00"
define void @test_real96_pointers() {
%1 = tail call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @assertTrue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}