int main(void) {
  int q[10][30];
  f1(q);
  f2(q);
  f3(q);
  int(*r[20][3])[50];
  f1(r);
  f2(r);
  f3(r);
  int(*(**s[30])[])[][20];
  f1(s);
  f2(s);
  f3(s);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x780,%rsp
lea    0x2d0(%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    0xf0(%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>
mov    %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    $0x780,%rsp
pop    %rbx
ret

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

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