#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  while (1) {
    scanf("%d%d", &x, &y);
    if (x == 0 && y == 0)
      break;
    if (x > y)
      printf("%d %d\n", y, x);
    else
      printf("%d %d\n", x, y);
  }
  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>
cmpl   $0x0,-0x8(%rbp)
jne    115c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
jne    115c <main+0x3c>
jmp    1196 <main+0x76>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117f <main+0x5f>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1191 <main+0x71>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%eax
mov    %edx,%ecx
or     %eax,%ecx
jne    1157 <main+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xea7(%rip),%r14
lea    0xe9b(%rip),%r15
lea    0x4(%rsp),%r12
mov    %rsp,%rbx
jmp    1194 <main+0x74>
nop
mov    %edx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%eax
mov    %edx,%ecx
or     %eax,%ecx
je     1149 <main+0x29>
mov    %r14,%rdi
cmp    %eax,%edx
jle    1170 <main+0x50>
mov    %eax,%esi
jmp    1174 <main+0x54>

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

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