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


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
xor    %eax,%eax
call   1050 <f1@plt>
xor    %eax,%eax
call   1030 <f2@plt>
xor    %eax,%eax
call   1040 <f3@plt>
lea    0x8(%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>
lea    0x20(%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    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [5 x [2 x i32]]*
%2 = alloca [1 x [0 x i32]**]
%3 = alloca [2 x [0 x i32*]**]
%4 = alloca [5 x [0 x [0 x [2 x i32]]*]**]
%5 = load [5 x [2 x i32]]*, [5 x [2 x i32]]** %1
%6 = call i32 ([5 x [2 x i32]]*, ...) bitcast (i32 (...)* @f1 to i32 ([5 x [2 x i32]]*, ...)*)([5 x [2 x i32]]* %5)
%7 = load [5 x [2 x i32]]*, [5 x [2 x i32]]** %1
%8 = call i32 ([5 x [2 x i32]]*, ...) bitcast (i32 (...)* @f2 to i32 ([5 x [2 x i32]]*, ...)*)([5 x [2 x i32]]* %7)
%9 = load [5 x [2 x i32]]*, [5 x [2 x i32]]** %1
%10 = call i32 ([5 x [2 x i32]]*, ...) bitcast (i32 (...)* @f3 to i32 ([5 x [2 x i32]]*, ...)*)([5 x [2 x i32]]* %9)
%11 = getelementptr inbounds [1 x [0 x i32]**], [1 x [0 x i32]**]* %2, i64 0, i64 0
%12 = call i32 ([0 x i32]***, ...) bitcast (i32 (...)* @f1 to i32 ([0 x i32]***, ...)*)([0 x i32]*** %11)
%13 = getelementptr inbounds [1 x [0 x i32]**], [1 x [0 x i32]**]* %2, i64 0, i64 0
%14 = call i32 ([0 x i32]***, ...) bitcast (i32 (...)* @f2 to i32 ([0 x i32]***, ...)*)([0 x i32]*** %13)
%15 = getelementptr inbounds [1 x [0 x i32]**], [1 x [0 x i32]**]* %2, i64 0, i64 0
%16 = call i32 ([0 x i32]***, ...) bitcast (i32 (...)* @f3 to i32 ([0 x i32]***, ...)*)([0 x i32]*** %15)
%17 = getelementptr inbounds [2 x [0 x i32*]**], [2 x [0 x i32*]**]* %3, i64 0, i64 0
%18 = call i32 ([0 x i32*]***, ...) bitcast (i32 (...)* @f1 to i32 ([0 x i32*]***, ...)*)([0 x i32*]*** %17)
%19 = getelementptr inbounds [2 x [0 x i32*]**], [2 x [0 x i32*]**]* %3, i64 0, i64 0
%20 = call i32 ([0 x i32*]***, ...) bitcast (i32 (...)* @f2 to i32 ([0 x i32*]***, ...)*)([0 x i32*]*** %19)
%21 = getelementptr inbounds [2 x [0 x i32*]**], [2 x [0 x i32*]**]* %3, i64 0, i64 0
%22 = call i32 ([0 x i32*]***, ...) bitcast (i32 (...)* @f3 to i32 ([0 x i32*]***, ...)*)([0 x i32*]*** %21)
%23 = getelementptr inbounds [5 x [0 x [0 x [2 x i32]]*]**], [5 x [0 x [0 x [2 x i32]]*]**]* %4, i64 0, i64 0
%24 = 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]]*]*** %23)
%25 = getelementptr inbounds [5 x [0 x [0 x [2 x i32]]*]**], [5 x [0 x [0 x [2 x i32]]*]**]* %4, i64 0, i64 0
%26 = 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]]*]*** %25)
%27 = getelementptr inbounds [5 x [0 x [0 x [2 x i32]]*]**], [5 x [0 x [0 x [2 x i32]]*]**]* %4, i64 0, i64 0
%28 = 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]]*]*** %27)
ret i32 0
}

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