int main(void) {
  int arr[] = {1, 2, 3};
  double arr1[] = {1., 2., 3.};
  printf("%s",_Generic((arr), int: "int" "\n" , double: "double" "\n" , double*: "double*" "\n" , int*: "int*" "\n" , float*: "float*" "\n" , default: "default" "\n"));
  printf("%s",_Generic((arr1), int: "int" "\n" , double: "double" "\n" , double*: "double*" "\n" , int*: "int*" "\n" , float*: "float*" "\n" , default: "default" "\n"));
  printf("%s",_Generic((arr[0]), int: "int" "\n" , double: "double" "\n" , double*: "double*" "\n" , int*: "int*" "\n" , float*: "float*" "\n" , default: "default" "\n"));
  printf("%s",_Generic((arr1[0]), int: "int" "\n" , double: "double" "\n" , double*: "double*" "\n" , int*: "int*" "\n" , float*: "float*" "\n" , default: "default" "\n"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xecd(%rip),%rdi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.arr = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.arr1 = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"int*\0A\00"
@.str.2 = [9 x i8] c"double*\0A\00"
@.str.3 = [5 x i8] c"int\0A\00"
@.str.4 = [8 x i8] c"double\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [3 x double]
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
%5 = bitcast [3 x double]* %3 to i8*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"int*\00"
@str.5 = [8 x i8] c"double*\00"
@str.6 = [4 x i8] c"int\00"
@str.7 = [7 x i8] c"double\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
ret i32 0
}