#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 do_check_dbl(void *pv) {
  double *pd = (double *)pv;
  assertTrue("pd[0] == 41", pd[0] == 41);
  ;
  assertTrue("pd[1] == 42", pd[1] == 42);
  ;
  assertTrue("pd[2] == 43", pd[2] == 43);
  ;
}


x86 assembly (clang, -O0):
<do_check_dbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xedc(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xecc(%rip),%rdi
call   1030 <assertTrue@plt>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xea6(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xeaa(%rip),%rdi
call   1030 <assertTrue@plt>
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xe70(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe88(%rip),%rdi
call   1030 <assertTrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_check_dbl>:
push   %rbx
mov    %rdi,%rbx
movsd  0xee4(%rip),%xmm0
cmpeqsd (%rdi),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xee8(%rip),%rdi
call   1030 <assertTrue@plt>
movsd  0xecb(%rip),%xmm0
cmpeqsd 0x8(%rbx),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xed2(%rip),%rdi
call   1030 <assertTrue@plt>
movsd  0xeb1(%rip),%xmm0
cmpeqsd 0x10(%rbx),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xebc(%rip),%rdi
pop    %rbx
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"pd[0] == 41\00"
@.str.1 = [12 x i8] c"pd[1] == 42\00"
@.str.2 = [12 x i8] c"pd[2] == 43\00"
define void @do_check_dbl(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fcmp oeq double %8, 4.100000e+01
%10 = zext i1 %9 to i32
%11 = call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fcmp oeq double %14, 4.200000e+01
%16 = zext i1 %15 to i32
%17 = call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = load double*, double** %3
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = fcmp oeq double %20, 4.300000e+01
%22 = zext i1 %21 to i32
%23 = call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"pd[0] == 41\00"
@.str.1 = [12 x i8] c"pd[1] == 42\00"
@.str.2 = [12 x i8] c"pd[2] == 43\00"
define void @do_check_dbl(i8* nocapture %0) {
%2 = bitcast i8* %0 to double*
%3 = load double, double* %2
%4 = fcmp oeq double %3, 4.100000e+01
%5 = zext i1 %4 to i32
%6 = tail call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds i8, i8* %0, i64 8
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
%10 = fcmp oeq double %9, 4.200000e+01
%11 = zext i1 %10 to i32
%12 = tail call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds i8, i8* %0, i64 16
%14 = bitcast i8* %13 to double*
%15 = load double, double* %14
%16 = fcmp oeq double %15, 4.300000e+01
%17 = zext i1 %16 to i32
%18 = tail call i32 @assertTrue(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %17)
ret void
}