void foo(void) {
  (void)vf();
  (void)if1();
  (void)cf();
  (const void)bf();
  (int)if1();
  (long)if2();
  (char)if3();
  (float)rf1();
  (long double)rf2();
  (_Complex float)cf();
  (enum f{F1}) ef();
  (_Bool) bf();
  (void *)pf1();
  (char *)pf2();
  (float)if1();
  (double)if2();
  (_Bool) if3();
  (int)rf1();
  (long)rf2();
  (double)cf();
  (int)ef();
  (int)bf();
  (long unsigned int)pf1();
  (long int)pf2();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <vf@plt>
mov    $0x0,%al
call   10d0 <if1@plt>
mov    $0x0,%al
call   1070 <cf@plt>
mov    $0x0,%al
call   10a0 <bf@plt>
mov    $0x0,%al
call   10d0 <if1@plt>
mov    $0x0,%al
call   1090 <if2@plt>
mov    $0x0,%al
call   1030 <if3@plt>
mov    $0x0,%al
call   10b0 <rf1@plt>
mov    $0x0,%al
call   1060 <rf2@plt>
mov    $0x0,%al
call   1070 <cf@plt>
mov    $0x0,%al
call   1080 <ef@plt>
mov    $0x0,%al
call   10a0 <bf@plt>
mov    $0x0,%al
call   1050 <pf1@plt>
mov    $0x0,%al
call   10c0 <pf2@plt>
mov    $0x0,%al
call   10d0 <if1@plt>
mov    $0x0,%al
call   1090 <if2@plt>
mov    $0x0,%al
call   1030 <if3@plt>
mov    $0x0,%al
call   10b0 <rf1@plt>
mov    $0x0,%al
call   1060 <rf2@plt>
mov    $0x0,%al
call   1070 <cf@plt>
mov    $0x0,%al
call   1080 <ef@plt>
mov    $0x0,%al
call   10a0 <bf@plt>
mov    $0x0,%al
call   1050 <pf1@plt>
mov    $0x0,%al
call   10c0 <pf2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1040 <vf@plt>
xor    %eax,%eax
call   10d0 <if1@plt>
xor    %eax,%eax
call   1070 <cf@plt>
xor    %eax,%eax
call   10a0 <bf@plt>
xor    %eax,%eax
call   10d0 <if1@plt>
xor    %eax,%eax
call   1090 <if2@plt>
xor    %eax,%eax
call   1030 <if3@plt>
xor    %eax,%eax
call   10b0 <rf1@plt>
xor    %eax,%eax
call   1060 <rf2@plt>
xor    %eax,%eax
call   1070 <cf@plt>
xor    %eax,%eax
call   1080 <ef@plt>
xor    %eax,%eax
call   10a0 <bf@plt>
xor    %eax,%eax
call   1050 <pf1@plt>
xor    %eax,%eax
call   10c0 <pf2@plt>
xor    %eax,%eax
call   10d0 <if1@plt>
xor    %eax,%eax
call   1090 <if2@plt>
xor    %eax,%eax
call   1030 <if3@plt>
xor    %eax,%eax
call   10b0 <rf1@plt>
xor    %eax,%eax
call   1060 <rf2@plt>
xor    %eax,%eax
call   1070 <cf@plt>
xor    %eax,%eax
call   1080 <ef@plt>
xor    %eax,%eax
call   10a0 <bf@plt>
xor    %eax,%eax
call   1050 <pf1@plt>
xor    %eax,%eax
pop    %rcx
jmp    10c0 <pf2@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 (...) @vf()
%2 = call i32 (...) @if1()
%3 = call i32 (...) @cf()
%4 = call i32 (...) @bf()
%5 = call i32 (...) @if1()
%6 = call i32 (...) @if2()
%7 = sext i32 %6 to i64
%8 = call i32 (...) @if3()
%9 = trunc i32 %8 to i8
%10 = call i32 (...) @rf1()
%11 = sitofp i32 %10 to float
%12 = call i32 (...) @rf2()
%13 = sitofp i32 %12 to x86_fp80
%14 = call i32 (...) @cf()
%15 = sitofp i32 %14 to float
%16 = call i32 (...) @ef()
%17 = call i32 (...) @bf()
%18 = icmp ne i32 %17, 0
%19 = call i32 (...) @pf1()
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
%22 = call i32 (...) @pf2()
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i8*
%25 = call i32 (...) @if1()
%26 = sitofp i32 %25 to float
%27 = call i32 (...) @if2()
%28 = sitofp i32 %27 to double
%29 = call i32 (...) @if3()
%30 = icmp ne i32 %29, 0
%31 = call i32 (...) @rf1()
%32 = call i32 (...) @rf2()
%33 = sext i32 %32 to i64
%34 = call i32 (...) @cf()
%35 = sitofp i32 %34 to double
%36 = call i32 (...) @ef()
%37 = call i32 (...) @bf()
%38 = call i32 (...) @pf1()
%39 = sext i32 %38 to i64
%40 = call i32 (...) @pf2()
%41 = sext i32 %40 to i64
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @vf()
%2 = tail call i32 (...) @if1()
%3 = tail call i32 (...) @cf()
%4 = tail call i32 (...) @bf()
%5 = tail call i32 (...) @if1()
%6 = tail call i32 (...) @if2()
%7 = tail call i32 (...) @if3()
%8 = tail call i32 (...) @rf1()
%9 = tail call i32 (...) @rf2()
%10 = tail call i32 (...) @cf()
%11 = tail call i32 (...) @ef()
%12 = tail call i32 (...) @bf()
%13 = tail call i32 (...) @pf1()
%14 = tail call i32 (...) @pf2()
%15 = tail call i32 (...) @if1()
%16 = tail call i32 (...) @if2()
%17 = tail call i32 (...) @if3()
%18 = tail call i32 (...) @rf1()
%19 = tail call i32 (...) @rf2()
%20 = tail call i32 (...) @cf()
%21 = tail call i32 (...) @ef()
%22 = tail call i32 (...) @bf()
%23 = tail call i32 (...) @pf1()
%24 = tail call i32 (...) @pf2()
ret void
}