#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, unsigned long);
scalar_t__ scanf(char *, unsigned long *, unsigned long *);
int main() {
  unsigned long int a, b, c;
  while (scanf("%lu %lu", &b, &a) != EOF) {
    if (b > a) {
      c = a;
      a = b;
      b = c;
    }
    printf("%lu\n", a - b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     1192 <main+0x72>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1179 <main+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
sub    -0x18(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2ea0(%rip),%r13
cmp    0x0(%r13),%rax
jne    115e <main+0x3e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xea3(%rip),%r14
lea    0xe94(%rip),%r15
mov    %rsp,%r12
lea    0x8(%rsp),%rbx
jmp    11ab <main+0x8b>
cs nopw 0x0(%rax,%rax,1)
mov    %rsi,0x8(%rsp)
mov    %rcx,(%rsp)
mov    %rcx,%rax
sub    %rax,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
je     114e <main+0x2e>
mov    (%rsp),%rsi
mov    0x8(%rsp),%rcx
cmp    %rcx,%rsi
ja     1180 <main+0x60>
mov    %rsi,%rax
mov    %rcx,%rsi
jmp    118c <main+0x6c>

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

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