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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     11a1 <main+0x81>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1180 <main+0x60>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    118c <main+0x6c>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2eb3(%rip),%r13
mov    0x0(%r13),%rbx
lea    0xec0(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
cmp    %rax,%rbx
je     11a9 <main+0x89>
lea    0xeaf(%rip),%r14
lea    0xe9e(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
nopl   0x0(%rax)
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rax
mov    %rsi,%rcx
sub    %rax,%rcx
neg    %rcx
sub    %rax,%rsi
cmovle %rcx,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x0(%r13),%rbp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    %rax,%rbp
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [10 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 = %20, %0
%5 = load i64, i64* @EOF
%6 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i64, i64* %2
%10 = load i64, i64* %3
%11 = icmp sgt i64 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i64, i64* %2
%14 = load i64, i64* %3
%15 = sub nsw i64 %13, %14
br label %20
16: ; preds = %8
%17 = load i64, i64* %3
%18 = load i64, i64* %2
%19 = sub nsw i64 %17, %18
br label %20
20: ; preds = %16, %12
%21 = phi i64 [ %15, %12 ], [ %19, %16 ]
%22 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %21)
br label %4
23: ; preds = %4
ret i32 0
}

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