#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 *, long long);
int scanf(char *, long long *, long long *);
int main() {
  long long a, b;
  while (scanf("%lld%lld", &a, &b) == 2)
    printf("%lld\n", b < a ? a - b : b - a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    118c <main+0x6c>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    116b <main+0x4b>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1177 <main+0x57>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe87(%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   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1195 <main+0x75>
lea    0xebc(%rip),%r14
lea    0xeac(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rax
mov    %rsi,%rcx
sub    %rax,%rcx
neg    %rcx
sub    %rax,%rsi
cmovl  %rcx,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%lld%lld\00"
@.str.1 = [6 x i8] c"%lld\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 i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %17
7: ; preds = %0, %7
%8 = load i64, i64* %2
%9 = load i64, i64* %1
%10 = icmp slt i64 %8, %9
%11 = sub nsw i64 %9, %8
%12 = sub nsw i64 %8, %9
%13 = select i1 %10, i64 %11, i64 %12
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %13)
%15 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%16 = icmp eq i32 %15, 2
br i1 %16, label %7, label %17
17: ; preds = %7, %0
ret i32 0
}