int main(void) {
  int q[1][3];
  f1(q);
  f2(q);
  f3(q);
  int(*r[2][3])[5];
  f1(r);
  f2(r);
  f3(r);
  int(*(**s[3])[])[][2];
  f1(s);
  f2(s);
  f3(s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0xc(%rbp),%rdi
mov    $0x0,%al
call   1050 <f1@plt>
lea    -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <f2@plt>
lea    -0xc(%rbp),%rdi
mov    $0x0,%al
call   1040 <f3@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <f1@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1030 <f2@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1040 <f3@plt>
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1050 <f1@plt>
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1030 <f2@plt>
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <f3@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <f1@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <f2@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <f3@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <f1@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <f2@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <f3@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <f1@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <f2@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <f3@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [1 x [3 x i32]]
%2 = alloca [2 x [3 x [5 x i32]*]]
%3 = alloca [3 x [0 x [0 x [2 x i32]]*]**]
%4 = getelementptr inbounds [1 x [3 x i32]], [1 x [3 x i32]]* %1, i64 0, i64 0
%5 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f1 to i32 ([3 x i32]*, ...)*)([3 x i32]* %4)
%6 = getelementptr inbounds [1 x [3 x i32]], [1 x [3 x i32]]* %1, i64 0, i64 0
%7 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f2 to i32 ([3 x i32]*, ...)*)([3 x i32]* %6)
%8 = getelementptr inbounds [1 x [3 x i32]], [1 x [3 x i32]]* %1, i64 0, i64 0
%9 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f3 to i32 ([3 x i32]*, ...)*)([3 x i32]* %8)
%10 = getelementptr inbounds [2 x [3 x [5 x i32]*]], [2 x [3 x [5 x i32]*]]* %2, i64 0, i64 0
%11 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f1 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %10)
%12 = getelementptr inbounds [2 x [3 x [5 x i32]*]], [2 x [3 x [5 x i32]*]]* %2, i64 0, i64 0
%13 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f2 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %12)
%14 = getelementptr inbounds [2 x [3 x [5 x i32]*]], [2 x [3 x [5 x i32]*]]* %2, i64 0, i64 0
%15 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f3 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %14)
%16 = getelementptr inbounds [3 x [0 x [0 x [2 x i32]]*]**], [3 x [0 x [0 x [2 x i32]]*]**]* %3, i64 0, i64 0
%17 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f1 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %16)
%18 = getelementptr inbounds [3 x [0 x [0 x [2 x i32]]*]**], [3 x [0 x [0 x [2 x i32]]*]**]* %3, i64 0, i64 0
%19 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f2 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %18)
%20 = getelementptr inbounds [3 x [0 x [0 x [2 x i32]]*]**], [3 x [0 x [0 x [2 x i32]]*]**]* %3, i64 0, i64 0
%21 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f3 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1 x [3 x i32]]
%2 = alloca [2 x [3 x [5 x i32]*]]
%3 = alloca [3 x [0 x [0 x [2 x i32]]*]**]
%4 = bitcast [1 x [3 x i32]]* %1 to i8*
%5 = getelementptr inbounds [1 x [3 x i32]], [1 x [3 x i32]]* %1, i64 0, i64 0
%6 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f1 to i32 ([3 x i32]*, ...)*)([3 x i32]* %5)
%7 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f2 to i32 ([3 x i32]*, ...)*)([3 x i32]* %5)
%8 = call i32 ([3 x i32]*, ...) bitcast (i32 (...)* @f3 to i32 ([3 x i32]*, ...)*)([3 x i32]* %5)
%9 = bitcast [2 x [3 x [5 x i32]*]]* %2 to i8*
%10 = getelementptr inbounds [2 x [3 x [5 x i32]*]], [2 x [3 x [5 x i32]*]]* %2, i64 0, i64 0
%11 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f1 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %10)
%12 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f2 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %10)
%13 = call i32 ([3 x [5 x i32]*]*, ...) bitcast (i32 (...)* @f3 to i32 ([3 x [5 x i32]*]*, ...)*)([3 x [5 x i32]*]* %10)
%14 = bitcast [3 x [0 x [0 x [2 x i32]]*]**]* %3 to i8*
%15 = getelementptr inbounds [3 x [0 x [0 x [2 x i32]]*]**], [3 x [0 x [0 x [2 x i32]]*]**]* %3, i64 0, i64 0
%16 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f1 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %15)
%17 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f2 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %15)
%18 = call i32 ([0 x [0 x [2 x i32]]*]***, ...) bitcast (i32 (...)* @f3 to i32 ([0 x [0 x [2 x i32]]*]***, ...)*)([0 x [0 x [2 x i32]]*]*** %15)
ret i32 0
}