#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float);
int /*<<< orphan*/ sort3(float *, float *, float *);
int main() {
  float a, b, c;
  a = 42.124;
  b = 100.23;
  c = 3.141;
  printf("A:%.3f, B:%.3f, C:%.3f\n", a, b, c);
  sort3(&a, &b, &c);
  printf("A:%.3f, B:%.3f, C:%.3f\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeaf(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <sort3@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x42287efa,0xc(%rsp)
42
movl   $0x42c875c3,0x8(%rsp)
42
movl   $0x40490625,0x4(%rsp)
40
lea    0xec8(%rip),%rbx
movss  0xeb4(%rip),%xmm0
movss  0xeb0(%rip),%xmm1
movss  0xeac(%rip),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sort3@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"A:%.3f, B:%.3f, C:%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0x40450FDF40000000, float* %2
store float 0x40590EB860000000, float* %3
store float 0x400920C4A0000000, float* %4
%5 = load float, float* %2
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %5, float %6, float %7)
%9 = call i32 @sort3(float* %2, float* %3, float* %4)
%10 = load float, float* %2
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %10, float %11, float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"A:%.3f, B:%.3f, C:%.3f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
store float 0x40450FDF40000000, float* %1
store float 0x40590EB860000000, float* %2
store float 0x400920C4A0000000, float* %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float 0x40450FDF40000000, float 0x40590EB860000000, float 0x400920C4A0000000)
%8 = call i32 @sort3(float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %9, float %10, float %11)
ret i32 0
}