Passing pointers to pointers to JIT

What is the proper way of passing multi-dimensional arrays from C/C++ code to
LLVM JIT? If someone could let me know what I'm doing wrong and how to get
this to work, that'd be great. Or alternatively does anyone have a function
that would convert arrays of the form float[n][4] into array of vectors of
[n x <4 x float>] format and back?

The question was answered at #llvm. There were two problems:

1. Usage of GEPs ([n x [4 x float]] is not float**)
2. Alignment issues for vector store (aka "stack realignment").

Working code is in http://pastebin.com/m5b341b2e