#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 */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_pd(double *);
int /*<<< orphan*/ _mm_load_sd(double *);
int /*<<< orphan*/ _mm_loadh_pd(int /*<<< orphan*/, double *);
int /*<<< orphan*/ _mm_store_pd(double *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_store_sd(double *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpackhi_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_pd(int /*<<< orphan*/, int /*<<< orphan*/);
void corner_dtrtr_l_3_lib4(int kna, double *A, int sda, double *C) {
  const int bs = 4;
  __m128d u0, u1, u2, u3, u4, u5;
  if (kna == 0) {
    u0 = _mm_load_sd(&A[0 + bs * 0]);
    _mm_store_sd(&C[0 + bs * 0], u0);
    u1 = _mm_load_sd(&A[1 + bs * 0]);
    u1 = _mm_loadh_pd(u1, &A[1 + bs * 1]);
    _mm_store_pd(&C[0 + bs * 1], u1);
    u2 = _mm_load_sd(&A[2 + bs * 0]);
    u2 = _mm_loadh_pd(u2, &A[2 + bs * 1]);
    _mm_store_pd(&C[0 + bs * 2], u2);
    u3 = _mm_load_sd(&A[2 + bs * 2]);
    _mm_store_sd(&C[2 + bs * 2], u3);
  } else if (kna == 1) {
    u0 = _mm_load_sd(&A[0 + bs * 0]);
    _mm_store_sd(&C[0 + bs * 0], u0);
    A += 1 + bs * (sda - 1);
    C += bs;
    u0 = _mm_load_pd(&A[0 + bs * 0]);
    u1 = _mm_load_pd(&A[0 + bs * 1]);
    u4 = _mm_unpacklo_pd(u0, u1);
    u5 = _mm_unpackhi_pd(u0, u1);
    _mm_store_pd(&C[0 + bs * 0], u4);
    _mm_store_pd(&C[0 + bs * 1], u5);
    u0 = _mm_load_sd(&A[1 + bs * 2]);
    _mm_store_sd(&C[2 + bs * 1], u0);
  } else if (kna == 2) {
    u0 = _mm_load_sd(&A[0 + bs * 0]);
    _mm_store_sd(&C[0 + bs * 0], u0);
    u1 = _mm_load_sd(&A[1 + bs * 0]);
    u1 = _mm_loadh_pd(u1, &A[1 + bs * 1]);
    _mm_store_pd(&C[0 + bs * 1], u1);
    A += 2 + bs * (sda - 1);
    C += 2 * bs;
    u2 = _mm_load_sd(&A[0 + bs * 0]);
    u2 = _mm_loadh_pd(u2, &A[0 + bs * 1]);
    _mm_store_pd(&C[0 + bs * 0], u2);
    u3 = _mm_load_sd(&A[0 + bs * 2]);
    _mm_store_sd(&C[2 + bs * 0], u3);
  } else {
    u0 = _mm_load_sd(&A[0 + bs * 0]);
    _mm_store_sd(&C[0 + bs * 0], u0);
    u0 = _mm_load_pd(&A[1 + bs * 0]);
    u1 = _mm_load_pd(&A[1 + bs * 1]);
    u4 = _mm_unpacklo_pd(u0, u1);
    u5 = _mm_unpackhi_pd(u0, u1);
    _mm_store_pd(&C[0 + bs * 1], u4);
    _mm_store_pd(&C[0 + bs * 2], u5);
    u0 = _mm_load_sd(&A[2 + bs * 2]);
    _mm_store_sd(&C[2 + bs * 2], u0);
  }
}


x86 assembly (clang, -O0):
<corner_dtrtr_l_3_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    123a <corner_dtrtr_l_3_lib4+0xca>
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x28,%rsi
call   1080 <_mm_loadh_pd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x20,%rdi
mov    -0x2c(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x30,%rsi
call   1080 <_mm_loadh_pd@plt>
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x40,%rdi
mov    -0x30(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x10(%rbp),%rdi
add    $0x50,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x50,%rdi
mov    -0x34(%rbp),%esi
call   1090 <_mm_store_sd@plt>
jmp    146c <corner_dtrtr_l_3_lib4+0x2fc>
cmpl   $0x1,-0x4(%rbp)
jne    12ff <corner_dtrtr_l_3_lib4+0x18f>
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x20,%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <_mm_unpacklo_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1060 <_mm_unpackhi_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x20(%rbp),%rdi
add    $0x20,%rdi
mov    -0x3c(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x10(%rbp),%rdi
add    $0x48,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x30,%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
jmp    1467 <corner_dtrtr_l_3_lib4+0x2f7>
cmpl   $0x2,-0x4(%rbp)
jne    13ce <corner_dtrtr_l_3_lib4+0x25e>
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x28,%rsi
call   1080 <_mm_loadh_pd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x20,%rdi
mov    -0x2c(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x20,%rsi
call   1080 <_mm_loadh_pd@plt>
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x10,%rdi
mov    -0x34(%rbp),%esi
call   1090 <_mm_store_sd@plt>
jmp    1462 <corner_dtrtr_l_3_lib4+0x2f2>
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x28,%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <_mm_unpacklo_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1060 <_mm_unpackhi_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x20,%rdi
mov    -0x38(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x20(%rbp),%rdi
add    $0x40,%rdi
mov    -0x3c(%rbp),%esi
call   1030 <_mm_store_pd@plt>
mov    -0x10(%rbp),%rdi
add    $0x50,%rdi
call   1050 <_mm_load_sd@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x50,%rdi
mov    -0x28(%rbp),%esi
call   1090 <_mm_store_sd@plt>
jmp    1467 <corner_dtrtr_l_3_lib4+0x2f7>
jmp    146c <corner_dtrtr_l_3_lib4+0x2fc>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dtrtr_l_3_lib4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
cmp    $0x2,%edi
je     11ea <corner_dtrtr_l_3_lib4+0x7a>
cmp    $0x1,%edi
je     1259 <corner_dtrtr_l_3_lib4+0xe9>
test   %edi,%edi
jne    12d3 <corner_dtrtr_l_3_lib4+0x163>
mov    %rbx,%rdi
call   1050 <_mm_load_sd@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1090 <_mm_store_sd@plt>
lea    0x8(%rbx),%rdi
call   1050 <_mm_load_sd@plt>
lea    0x28(%rbx),%rsi
mov    %eax,%edi
call   1080 <_mm_loadh_pd@plt>
lea    0x20(%r14),%rdi
mov    %eax,%esi
call   1030 <_mm_store_pd@plt>
lea    0x10(%rbx),%rdi
call   1050 <_mm_load_sd@plt>
lea    0x30(%rbx),%rsi
mov    %eax,%edi
call   1080 <_mm_loadh_pd@plt>
lea    0x40(%r14),%rdi
mov    %eax,%esi
jmp    1327 <corner_dtrtr_l_3_lib4+0x1b7>
mov    %rbx,%rdi
call   1050 <_mm_load_sd@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1090 <_mm_store_sd@plt>
lea    0x8(%rbx),%rdi
call   1050 <_mm_load_sd@plt>
lea    0x28(%rbx),%rsi
mov    %eax,%edi
call   1080 <_mm_loadh_pd@plt>
lea    0x20(%r14),%rdi
mov    %eax,%esi
call   1030 <_mm_store_pd@plt>
lea    -0x2(,%r15,4),%eax
ff
movslq %eax,%rbp
lea    (%rbx,%rbp,8),%rdi
lea    0x40(%r14),%r15
call   1050 <_mm_load_sd@plt>
lea    (%rbx,%rbp,8),%rsi
add    $0x20,%rsi
mov    %eax,%edi
call   1080 <_mm_loadh_pd@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1030 <_mm_store_pd@plt>
lea    (%rbx,%rbp,8),%rbx
add    $0x40,%rbx
jmp    1330 <corner_dtrtr_l_3_lib4+0x1c0>
mov    %rbx,%rdi
call   1050 <_mm_load_sd@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1090 <_mm_store_sd@plt>
lea    -0x3(,%r15,4),%eax
ff
movslq %eax,%r15
lea    (%rbx,%r15,8),%rdi
lea    0x20(%r14),%rax
mov    %rax,(%rsp)
call   1070 <_mm_load_pd@plt>
mov    %eax,%r12d
lea    (%rbx,%r15,8),%rdi
add    $0x20,%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %eax,%esi
call   1040 <_mm_unpacklo_pd@plt>
mov    %eax,%r13d
mov    %r12d,%edi
mov    %ebp,%esi
call   1060 <_mm_unpackhi_pd@plt>
mov    %eax,%ebp
mov    (%rsp),%rdi
mov    %r13d,%esi
call   1030 <_mm_store_pd@plt>
lea    0x40(%r14),%rdi
mov    %ebp,%esi
call   1030 <_mm_store_pd@plt>
lea    (%rbx,%r15,8),%rbx
add    $0x48,%rbx
jmp    1330 <corner_dtrtr_l_3_lib4+0x1c0>
mov    %rbx,%rdi
call   1050 <_mm_load_sd@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1090 <_mm_store_sd@plt>
lea    0x8(%rbx),%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,%r15d
lea    0x28(%rbx),%rdi
call   1070 <_mm_load_pd@plt>
mov    %eax,%ebp
mov    %r15d,%edi
mov    %eax,%esi
call   1040 <_mm_unpacklo_pd@plt>
mov    %eax,%r12d
mov    %r15d,%edi
mov    %ebp,%esi
call   1060 <_mm_unpackhi_pd@plt>
mov    %eax,%ebp
lea    0x20(%r14),%rdi
mov    %r12d,%esi
call   1030 <_mm_store_pd@plt>
lea    0x40(%r14),%rdi
mov    %ebp,%esi
call   1030 <_mm_store_pd@plt>
add    $0x50,%rbx
mov    %rbx,%rdi
call   1050 <_mm_load_sd@plt>
add    $0x50,%r14
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <_mm_store_sd@plt>

LLVM IR (-O0):
define void @corner_dtrtr_l_3_lib4(i32 %0, double* %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
store i32 4, i32* %9
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %55
18: ; preds = %4
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 0
%21 = call i32 @_mm_load_sd(double* %20)
store i32 %21, i32* %10
%22 = load double*, double** %8
%23 = getelementptr inbounds double, double* %22, i64 0
%24 = load i32, i32* %10
%25 = call i32 @_mm_store_sd(double* %23, i32 %24)
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = call i32 @_mm_load_sd(double* %27)
store i32 %28, i32* %11
%29 = load i32, i32* %11
%30 = load double*, double** %6
%31 = getelementptr inbounds double, double* %30, i64 5
%32 = call i32 @_mm_loadh_pd(i32 %29, double* %31)
store i32 %32, i32* %11
%33 = load double*, double** %8
%34 = getelementptr inbounds double, double* %33, i64 4
%35 = load i32, i32* %11
%36 = call i32 @_mm_store_pd(double* %34, i32 %35)
%37 = load double*, double** %6
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = call i32 @_mm_load_sd(double* %38)
store i32 %39, i32* %12
%40 = load i32, i32* %12
%41 = load double*, double** %6
%42 = getelementptr inbounds double, double* %41, i64 6
%43 = call i32 @_mm_loadh_pd(i32 %40, double* %42)
store i32 %43, i32* %12
%44 = load double*, double** %8
%45 = getelementptr inbounds double, double* %44, i64 8
%46 = load i32, i32* %12
%47 = call i32 @_mm_store_pd(double* %45, i32 %46)
%48 = load double*, double** %6
%49 = getelementptr inbounds double, double* %48, i64 10
%50 = call i32 @_mm_load_sd(double* %49)
store i32 %50, i32* %13
%51 = load double*, double** %8
%52 = getelementptr inbounds double, double* %51, i64 10
%53 = load i32, i32* %13
%54 = call i32 @_mm_store_sd(double* %52, i32 %53)
br label %188
55: ; preds = %4
%56 = load i32, i32* %5
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %102
58: ; preds = %55
%59 = load double*, double** %6
%60 = getelementptr inbounds double, double* %59, i64 0
%61 = call i32 @_mm_load_sd(double* %60)
store i32 %61, i32* %10
%62 = load double*, double** %8
%63 = getelementptr inbounds double, double* %62, i64 0
%64 = load i32, i32* %10
%65 = call i32 @_mm_store_sd(double* %63, i32 %64)
%66 = load i32, i32* %7
%67 = sub nsw i32 %66, 1
%68 = mul nsw i32 4, %67
%69 = add nsw i32 1, %68
%70 = load double*, double** %6
%71 = sext i32 %69 to i64
%72 = getelementptr inbounds double, double* %70, i64 %71
store double* %72, double** %6
%73 = load double*, double** %8
%74 = getelementptr inbounds double, double* %73, i64 4
store double* %74, double** %8
%75 = load double*, double** %6
%76 = getelementptr inbounds double, double* %75, i64 0
%77 = call i32 @_mm_load_pd(double* %76)
store i32 %77, i32* %10
%78 = load double*, double** %6
%79 = getelementptr inbounds double, double* %78, i64 4
%80 = call i32 @_mm_load_pd(double* %79)
store i32 %80, i32* %11
%81 = load i32, i32* %10
%82 = load i32, i32* %11
%83 = call i32 @_mm_unpacklo_pd(i32 %81, i32 %82)
store i32 %83, i32* %14
%84 = load i32, i32* %10
%85 = load i32, i32* %11
%86 = call i32 @_mm_unpackhi_pd(i32 %84, i32 %85)
store i32 %86, i32* %15
%87 = load double*, double** %8
%88 = getelementptr inbounds double, double* %87, i64 0
%89 = load i32, i32* %14
%90 = call i32 @_mm_store_pd(double* %88, i32 %89)
%91 = load double*, double** %8
%92 = getelementptr inbounds double, double* %91, i64 4
%93 = load i32, i32* %15
%94 = call i32 @_mm_store_pd(double* %92, i32 %93)
%95 = load double*, double** %6
%96 = getelementptr inbounds double, double* %95, i64 9
%97 = call i32 @_mm_load_sd(double* %96)
store i32 %97, i32* %10
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i64 6
%100 = load i32, i32* %10
%101 = call i32 @_mm_store_sd(double* %99, i32 %100)
br label %187
102: ; preds = %55
%103 = load i32, i32* %5
%104 = icmp eq i32 %103, 2
br i1 %104, label %105, label %151
105: ; preds = %102
%106 = load double*, double** %6
%107 = getelementptr inbounds double, double* %106, i64 0
%108 = call i32 @_mm_load_sd(double* %107)
store i32 %108, i32* %10
%109 = load double*, double** %8
%110 = getelementptr inbounds double, double* %109, i64 0
%111 = load i32, i32* %10
%112 = call i32 @_mm_store_sd(double* %110, i32 %111)
%113 = load double*, double** %6
%114 = getelementptr inbounds double, double* %113, i64 1
%115 = call i32 @_mm_load_sd(double* %114)
store i32 %115, i32* %11
%116 = load i32, i32* %11
%117 = load double*, double** %6
%118 = getelementptr inbounds double, double* %117, i64 5
%119 = call i32 @_mm_loadh_pd(i32 %116, double* %118)
store i32 %119, i32* %11
%120 = load double*, double** %8
%121 = getelementptr inbounds double, double* %120, i64 4
%122 = load i32, i32* %11
%123 = call i32 @_mm_store_pd(double* %121, i32 %122)
%124 = load i32, i32* %7
%125 = sub nsw i32 %124, 1
%126 = mul nsw i32 4, %125
%127 = add nsw i32 2, %126
%128 = load double*, double** %6
%129 = sext i32 %127 to i64
%130 = getelementptr inbounds double, double* %128, i64 %129
store double* %130, double** %6
%131 = load double*, double** %8
%132 = getelementptr inbounds double, double* %131, i64 8
store double* %132, double** %8
%133 = load double*, double** %6
%134 = getelementptr inbounds double, double* %133, i64 0
%135 = call i32 @_mm_load_sd(double* %134)
store i32 %135, i32* %12
%136 = load i32, i32* %12
%137 = load double*, double** %6
%138 = getelementptr inbounds double, double* %137, i64 4
%139 = call i32 @_mm_loadh_pd(i32 %136, double* %138)
store i32 %139, i32* %12
%140 = load double*, double** %8
%141 = getelementptr inbounds double, double* %140, i64 0
%142 = load i32, i32* %12
%143 = call i32 @_mm_store_pd(double* %141, i32 %142)
%144 = load double*, double** %6
%145 = getelementptr inbounds double, double* %144, i64 8
%146 = call i32 @_mm_load_sd(double* %145)
store i32 %146, i32* %13
%147 = load double*, double** %8
%148 = getelementptr inbounds double, double* %147, i64 2
%149 = load i32, i32* %13
%150 = call i32 @_mm_store_sd(double* %148, i32 %149)
br label %186
151: ; preds = %102
%152 = load double*, double** %6
%153 = getelementptr inbounds double, double* %152, i64 0
%154 = call i32 @_mm_load_sd(double* %153)
store i32 %154, i32* %10
%155 = load double*, double** %8
%156 = getelementptr inbounds double, double* %155, i64 0
%157 = load i32, i32* %10
%158 = call i32 @_mm_store_sd(double* %156, i32 %157)
%159 = load double*, double** %6
%160 = getelementptr inbounds double, double* %159, i64 1
%161 = call i32 @_mm_load_pd(double* %160)
store i32 %161, i32* %10
%162 = load double*, double** %6
%163 = getelementptr inbounds double, double* %162, i64 5
%164 = call i32 @_mm_load_pd(double* %163)
store i32 %164, i32* %11
%165 = load i32, i32* %10
%166 = load i32, i32* %11
%167 = call i32 @_mm_unpacklo_pd(i32 %165, i32 %166)
store i32 %167, i32* %14
%168 = load i32, i32* %10
%169 = load i32, i32* %11
%170 = call i32 @_mm_unpackhi_pd(i32 %168, i32 %169)
store i32 %170, i32* %15
%171 = load double*, double** %8
%172 = getelementptr inbounds double, double* %171, i64 4
%173 = load i32, i32* %14
%174 = call i32 @_mm_store_pd(double* %172, i32 %173)
%175 = load double*, double** %8
%176 = getelementptr inbounds double, double* %175, i64 8
%177 = load i32, i32* %15
%178 = call i32 @_mm_store_pd(double* %176, i32 %177)
%179 = load double*, double** %6
%180 = getelementptr inbounds double, double* %179, i64 10
%181 = call i32 @_mm_load_sd(double* %180)
store i32 %181, i32* %10
%182 = load double*, double** %8
%183 = getelementptr inbounds double, double* %182, i64 10
%184 = load i32, i32* %10
%185 = call i32 @_mm_store_sd(double* %183, i32 %184)
br label %186
186: ; preds = %151, %105
br label %187
187: ; preds = %186, %58
br label %188
188: ; preds = %187, %18
ret void
}

LLVM IR (-O2):
define void @corner_dtrtr_l_3_lib4(i32 %0, double* %1, i32 %2, double* %3) {
switch i32 %0, label %57 [
i32 0, label %5
i32 1, label %21
i32 2, label %38
]
5: ; preds = %4
%6 = tail call i32 @_mm_load_sd(double* %1)
%7 = tail call i32 @_mm_store_sd(double* %3, i32 %6)
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = tail call i32 @_mm_load_sd(double* %8)
%10 = getelementptr inbounds double, double* %1, i64 5
%11 = tail call i32 @_mm_loadh_pd(i32 %9, double* %10)
%12 = getelementptr inbounds double, double* %3, i64 4
%13 = tail call i32 @_mm_store_pd(double* %12, i32 %11)
%14 = getelementptr inbounds double, double* %1, i64 2
%15 = tail call i32 @_mm_load_sd(double* %14)
%16 = getelementptr inbounds double, double* %1, i64 6
%17 = tail call i32 @_mm_loadh_pd(i32 %15, double* %16)
%18 = getelementptr inbounds double, double* %3, i64 8
%19 = tail call i32 @_mm_store_pd(double* %18, i32 %17)
%20 = getelementptr inbounds double, double* %1, i64 10
br label %71
21: ; preds = %4
%22 = tail call i32 @_mm_load_sd(double* %1)
%23 = tail call i32 @_mm_store_sd(double* %3, i32 %22)
%24 = shl i32 %2, 2
%25 = add i32 %24, -3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = getelementptr inbounds double, double* %3, i64 4
%29 = tail call i32 @_mm_load_pd(double* %27)
%30 = getelementptr inbounds double, double* %27, i64 4
%31 = tail call i32 @_mm_load_pd(double* %30)
%32 = tail call i32 @_mm_unpacklo_pd(i32 %29, i32 %31)
%33 = tail call i32 @_mm_unpackhi_pd(i32 %29, i32 %31)
%34 = tail call i32 @_mm_store_pd(double* %28, i32 %32)
%35 = getelementptr inbounds double, double* %3, i64 8
%36 = tail call i32 @_mm_store_pd(double* %35, i32 %33)
%37 = getelementptr inbounds double, double* %27, i64 9
br label %71
38: ; preds = %4
%39 = tail call i32 @_mm_load_sd(double* %1)
%40 = tail call i32 @_mm_store_sd(double* %3, i32 %39)
%41 = getelementptr inbounds double, double* %1, i64 1
%42 = tail call i32 @_mm_load_sd(double* %41)
%43 = getelementptr inbounds double, double* %1, i64 5
%44 = tail call i32 @_mm_loadh_pd(i32 %42, double* %43)
%45 = getelementptr inbounds double, double* %3, i64 4
%46 = tail call i32 @_mm_store_pd(double* %45, i32 %44)
%47 = shl i32 %2, 2
%48 = add i32 %47, -2
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %1, i64 %49
%51 = getelementptr inbounds double, double* %3, i64 8
%52 = tail call i32 @_mm_load_sd(double* %50)
%53 = getelementptr inbounds double, double* %50, i64 4
%54 = tail call i32 @_mm_loadh_pd(i32 %52, double* %53)
%55 = tail call i32 @_mm_store_pd(double* %51, i32 %54)
%56 = getelementptr inbounds double, double* %50, i64 8
br label %71
57: ; preds = %4
%58 = tail call i32 @_mm_load_sd(double* %1)
%59 = tail call i32 @_mm_store_sd(double* %3, i32 %58)
%60 = getelementptr inbounds double, double* %1, i64 1
%61 = tail call i32 @_mm_load_pd(double* %60)
%62 = getelementptr inbounds double, double* %1, i64 5
%63 = tail call i32 @_mm_load_pd(double* %62)
%64 = tail call i32 @_mm_unpacklo_pd(i32 %61, i32 %63)
%65 = tail call i32 @_mm_unpackhi_pd(i32 %61, i32 %63)
%66 = getelementptr inbounds double, double* %3, i64 4
%67 = tail call i32 @_mm_store_pd(double* %66, i32 %64)
%68 = getelementptr inbounds double, double* %3, i64 8
%69 = tail call i32 @_mm_store_pd(double* %68, i32 %65)
%70 = getelementptr inbounds double, double* %1, i64 10
br label %71
71: ; preds = %21, %57, %38, %5
%72 = phi double* [ %37, %21 ], [ %70, %57 ], [ %56, %38 ], [ %20, %5 ]
%73 = tail call i32 @_mm_load_sd(double* %72)
%74 = getelementptr inbounds double, double* %3, i64 10
%75 = tail call i32 @_mm_store_sd(double* %74, i32 %73)
ret void
}