int MAIN() {
  int a, b;
  float c, d;
  write("input:");
  a = read();
  write("input:");
  b = read();
  write("input:");
  c = fread();
  write("input:");
  d = fread();
  write(a);
  write("\n");
  write(b);
  write("\n");
  write(c);
  write("\n");
  write(d);
  write("\n");
  return 0;
}


x86 assembly (clang, -O0):
<MAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x0,%al
call   1050 <read@plt>
mov    %eax,-0x4(%rbp)
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x0,%al
call   1050 <read@plt>
mov    %eax,-0x8(%rbp)
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <fread@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <fread@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <write@plt>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <write@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <write@plt>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <write@plt>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1040 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAIN>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
xor    %eax,%eax
call   1050 <read@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
xor    %eax,%eax
call   1050 <read@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <fread@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <fread@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%rsp)
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <write@plt>
lea    0xe58(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
mov    %r14d,%edi
xor    %eax,%eax
call   1040 <write@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <write@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <write@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"input:\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @MAIN() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @read()
store i32 %6, i32* %1
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @read()
store i32 %8, i32* %2
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @fread()
%11 = sitofp i32 %10 to float
store float %11, float* %3
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @fread()
%14 = sitofp i32 %13 to float
store float %14, float* %4
%15 = load i32, i32* %1
%16 = call i32 (i32, ...) bitcast (i32 (...)* @write to i32 (i32, ...)*)(i32 %15)
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* %2
%19 = call i32 (i32, ...) bitcast (i32 (...)* @write to i32 (i32, ...)*)(i32 %18)
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = call i32 (double, ...) bitcast (i32 (...)* @write to i32 (double, ...)*)(double %22)
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = load float, float* %4
%26 = fpext float %25 to double
%27 = call i32 (double, ...) bitcast (i32 (...)* @write to i32 (double, ...)*)(double %26)
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"input:\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @MAIN() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @read()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @read()
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @fread()
%7 = sitofp i32 %6 to float
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @fread()
%10 = sitofp i32 %9 to float
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @write to i32 (i32, ...)*)(i32 %2)
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @write to i32 (i32, ...)*)(i32 %4)
%14 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = fpext float %7 to double
%16 = tail call i32 (double, ...) bitcast (i32 (...)* @write to i32 (double, ...)*)(double %15)
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = fpext float %10 to double
%19 = tail call i32 (double, ...) bitcast (i32 (...)* @write to i32 (double, ...)*)(double %18)
%20 = tail call i32 (i8*, ...) bitcast (i32 (...)* @write to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}