#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);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float a, b, t;
  scanf("%f,%f", &a, &b);
  if (a > b) {
    t = a;
    a = b;
    b = t;
  }
  printf("%5.2f,%5.2f\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1170 <main+0x50>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm2
movss  (%rsp),%xmm0
ucomiss %xmm0,%xmm2
jbe    1155 <main+0x35>
movss  %xmm0,0x4(%rsp)
movss  %xmm2,(%rsp)
movaps %xmm2,%xmm1
jmp    115b <main+0x3b>
movaps %xmm0,%xmm1
movaps %xmm2,%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f,%f\00"
@.str.1 = [13 x i8] c"%5.2f,%5.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load float, float* %2
store float %10, float* %4
%11 = load float, float* %3
store float %11, float* %2
%12 = load float, float* %4
store float %12, float* %3
br label %13
13: ; preds = %9, %0
%14 = load float, float* %2
%15 = load float, float* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %14, float %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f,%f\00"
@.str.1 = [13 x i8] c"%5.2f,%5.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %10
9: ; preds = %0
store float %7, float* %1
store float %6, float* %2
br label %10
10: ; preds = %9, %0
%11 = phi float [ %6, %9 ], [ %7, %0 ]
%12 = phi float [ %7, %9 ], [ %6, %0 ]
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %12, float %11)
ret i32 0
}