#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*/ VecToso3(double *, double **);
void VecTose3(double V[6], double se3Mat[4][4]) {
  double so3Mat[3][3];
  double omg[3];
  int i;
  int j;
  omg[0] = V[0];
  omg[1] = V[1];
  omg[2] = V[2];
  VecToso3(omg, so3Mat);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      se3Mat[i][j] = so3Mat[i][j];
    }
  }
  se3Mat[0][3] = V[3];
  se3Mat[1][3] = V[4];
  se3Mat[2][3] = V[5];
  se3Mat[3][0] = 0.0;
  se3Mat[3][1] = 0.0;
  se3Mat[3][2] = 0.0;
  se3Mat[3][3] = 0.0;
  return;
}


x86 assembly (clang, -O0):
<VecTose3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <VecToso3@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    11f0 <VecTose3+0xe0>
movl   $0x0,-0x88(%rbp)
cmpl   $0x3,-0x88(%rbp)
jge    11d7 <VecTose3+0xc7>
movslq -0x84(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x88(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    117a <VecTose3+0x6a>
jmp    11dc <VecTose3+0xcc>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1163 <VecTose3+0x53>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x60(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x78(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecTose3>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movups (%rdi),%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
call   1030 <VecToso3@plt>
mov    0x30(%rsp),%rax
mov    %rax,0x10(%rbx)
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%rbx)
mov    0x48(%rsp),%rax
mov    %rax,0x30(%rbx)
movups 0x38(%rsp),%xmm0
movups %xmm0,0x20(%rbx)
movaps 0x50(%rsp),%xmm0
movups %xmm0,0x40(%rbx)
mov    0x60(%rsp),%rax
mov    %rax,0x50(%rbx)
movsd  0x18(%r14),%xmm0
movsd  %xmm0,0x18(%rbx)
movsd  0x20(%r14),%xmm0
movsd  %xmm0,0x38(%rbx)
movsd  0x28(%r14),%xmm0
movsd  %xmm0,0x58(%rbx)
xorps  %xmm0,%xmm0
movups %xmm0,0x70(%rbx)
movups %xmm0,0x60(%rbx)
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @VecTose3(double* %0, [4 x double]* %1) {
%3 = alloca double*
%4 = alloca [4 x double]*
%5 = alloca [3 x [3 x double]]
%6 = alloca [3 x double]
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %3
store [4 x double]* %1, [4 x double]** %4
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
store double %11, double* %12
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
store double %15, double* %16
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
store double %19, double* %20
%21 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%22 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%23 = bitcast [3 x double]* %22 to double**
%24 = call i32 @VecToso3(double* %21, double** %23)
store i32 0, i32* %7
br label %25
25: ; preds = %51, %2
%26 = load i32, i32* %7
%27 = icmp slt i32 %26, 3
br i1 %27, label %28, label %54
28: ; preds = %25
store i32 0, i32* %8
br label %29
29: ; preds = %47, %28
%30 = load i32, i32* %8
%31 = icmp slt i32 %30, 3
br i1 %31, label %32, label %50
32: ; preds = %29
%33 = load i32, i32* %7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 %34
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [3 x double], [3 x double]* %35, i64 0, i64 %37
%39 = load double, double* %38
%40 = load [4 x double]*, [4 x double]** %4
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [4 x double], [4 x double]* %40, i64 %42
%44 = load i32, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [4 x double], [4 x double]* %43, i64 0, i64 %45
store double %39, double* %46
br label %47
47: ; preds = %32
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %29
50: ; preds = %29
br label %51
51: ; preds = %50
%52 = load i32, i32* %7
%53 = add nsw i32 %52, 1
store i32 %53, i32* %7
br label %25
54: ; preds = %25
%55 = load double*, double** %3
%56 = getelementptr inbounds double, double* %55, i64 3
%57 = load double, double* %56
%58 = load [4 x double]*, [4 x double]** %4
%59 = getelementptr inbounds [4 x double], [4 x double]* %58, i64 0
%60 = getelementptr inbounds [4 x double], [4 x double]* %59, i64 0, i64 3
store double %57, double* %60
%61 = load double*, double** %3
%62 = getelementptr inbounds double, double* %61, i64 4
%63 = load double, double* %62
%64 = load [4 x double]*, [4 x double]** %4
%65 = getelementptr inbounds [4 x double], [4 x double]* %64, i64 1
%66 = getelementptr inbounds [4 x double], [4 x double]* %65, i64 0, i64 3
store double %63, double* %66
%67 = load double*, double** %3
%68 = getelementptr inbounds double, double* %67, i64 5
%69 = load double, double* %68
%70 = load [4 x double]*, [4 x double]** %4
%71 = getelementptr inbounds [4 x double], [4 x double]* %70, i64 2
%72 = getelementptr inbounds [4 x double], [4 x double]* %71, i64 0, i64 3
store double %69, double* %72
%73 = load [4 x double]*, [4 x double]** %4
%74 = getelementptr inbounds [4 x double], [4 x double]* %73, i64 3
%75 = getelementptr inbounds [4 x double], [4 x double]* %74, i64 0, i64 0
store double 0.000000e+00, double* %75
%76 = load [4 x double]*, [4 x double]** %4
%77 = getelementptr inbounds [4 x double], [4 x double]* %76, i64 3
%78 = getelementptr inbounds [4 x double], [4 x double]* %77, i64 0, i64 1
store double 0.000000e+00, double* %78
%79 = load [4 x double]*, [4 x double]** %4
%80 = getelementptr inbounds [4 x double], [4 x double]* %79, i64 3
%81 = getelementptr inbounds [4 x double], [4 x double]* %80, i64 0, i64 2
store double 0.000000e+00, double* %81
%82 = load [4 x double]*, [4 x double]** %4
%83 = getelementptr inbounds [4 x double], [4 x double]* %82, i64 3
%84 = getelementptr inbounds [4 x double], [4 x double]* %83, i64 0, i64 3
store double 0.000000e+00, double* %84
ret void
}

LLVM IR (-O2):
define void @VecTose3(double* nocapture %0, [4 x double]* nocapture writeonly %1) {
%3 = alloca [3 x [3 x double]]
%4 = alloca [3 x double]
%5 = bitcast [3 x [3 x double]]* %3 to i8*
%6 = bitcast [3 x double]* %4 to i8*
%7 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%8 = bitcast double* %0 to <2 x double>*
%9 = load <2 x double>, <2 x double>* %8
%10 = bitcast [3 x double]* %4 to <2 x double>*
store <2 x double> %9, <2 x double>* %10
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
store double %12, double* %13
%14 = bitcast [3 x [3 x double]]* %3 to double**
%15 = call i32 @VecToso3(double* %7, double** %14)
%16 = bitcast [4 x double]* %1 to i8*
%17 = bitcast [3 x [3 x double]]* %3 to i8*
%18 = getelementptr [4 x double], [4 x double]* %1, i64 1, i64 0
%19 = bitcast double* %18 to i8*
%20 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 0
%21 = bitcast double* %20 to i8*
%22 = getelementptr [4 x double], [4 x double]* %1, i64 2, i64 0
%23 = bitcast double* %22 to i8*
%24 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 0
%25 = bitcast double* %24 to i8*
%26 = getelementptr inbounds double, double* %0, i64 3
%27 = load double, double* %26
%28 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 3
store double %27, double* %28
%29 = getelementptr inbounds double, double* %0, i64 4
%30 = load double, double* %29
%31 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 3
store double %30, double* %31
%32 = getelementptr inbounds double, double* %0, i64 5
%33 = load double, double* %32
%34 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 3
store double %33, double* %34
%35 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 0
%36 = bitcast double* %35 to i8*
ret void
}