#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 *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
void main() {
  int i, j, k, t;
  scanf("%d,%d,%d", &i, &j, &k);
  if (i > j) {
    t = i;
    i = j;
    j = t;
  }
  if (i > k) {
    t = i;
    i = k;
    k = t;
  }
  if (j > k) {
    t = j;
    j = k;
    k = t;
  }
  printf("%d,%d,%d\n", i, j, k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    115e <main+0x3e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117c <main+0x5c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    119a <main+0x7a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%edx
cmp    %edx,%ecx
jle    1157 <main+0x37>
mov    %edx,0x14(%rsp)
mov    %ecx,0x10(%rsp)
mov    %ecx,%eax
jmp    115b <main+0x3b>
mov    %edx,%eax
mov    %ecx,%edx
mov    0xc(%rsp),%ecx
cmp    %ecx,%edx
jle    1177 <main+0x57>
mov    %ecx,0x14(%rsp)
mov    %edx,0xc(%rsp)
mov    %ecx,%esi
cmp    %edx,%eax
jg     117f <main+0x5f>
mov    %edx,%ecx
mov    %eax,%edx
jmp    1189 <main+0x69>
mov    %edx,%esi
mov    %ecx,%edx
cmp    %edx,%eax
jle    1171 <main+0x51>
mov    %edx,0x10(%rsp)
mov    %eax,0xc(%rsp)
mov    %eax,%ecx
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d,%d,%d\00"
@.str.1 = [10 x i8] c"%d,%d,%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load i32, i32* %1
store i32 %10, i32* %4
%11 = load i32, i32* %2
store i32 %11, i32* %1
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %0
%14 = load i32, i32* %1
%15 = load i32, i32* %3
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i32, i32* %1
store i32 %18, i32* %4
%19 = load i32, i32* %3
store i32 %19, i32* %1
%20 = load i32, i32* %4
store i32 %20, i32* %3
br label %21
21: ; preds = %17, %13
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i32, i32* %2
store i32 %26, i32* %4
%27 = load i32, i32* %3
store i32 %27, i32* %2
%28 = load i32, i32* %4
store i32 %28, i32* %3
br label %29
29: ; preds = %25, %21
%30 = load i32, i32* %1
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d,%d,%d\00"
@.str.1 = [10 x i8] c"%d,%d,%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 %9, i32* %1
store i32 %8, i32* %2
br label %12
12: ; preds = %11, %0
%13 = phi i32 [ %8, %11 ], [ %9, %0 ]
%14 = phi i32 [ %9, %11 ], [ %8, %0 ]
%15 = load i32, i32* %3
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 %15, i32* %1
store i32 %14, i32* %3
br label %18
18: ; preds = %17, %12
%19 = phi i32 [ %15, %17 ], [ %14, %12 ]
%20 = phi i32 [ %14, %17 ], [ %15, %12 ]
%21 = icmp sgt i32 %13, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 %20, i32* %2
store i32 %13, i32* %3
br label %23
23: ; preds = %22, %18
%24 = phi i32 [ %13, %22 ], [ %20, %18 ]
%25 = phi i32 [ %20, %22 ], [ %13, %18 ]
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %25, i32 %24)
ret void
}