#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() {
  long long a, b, result;
  while (scanf("%lld %lld", &a, &b) != EOF) {
    result = a - b;
    if (result < 0) {
      result = result - 2 * result;
    }
    printf("%lld\n", result);
  }
  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>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     1192 <main+0x72>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    117d <main+0x5d>
mov    -0x20(%rbp),%rax
mov    -0x20(%rbp),%rcx
shl    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe82(%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
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2ea0(%rip),%r13
cmp    0x0(%r13),%rax
je     119f <main+0x7f>
lea    0xeb5(%rip),%r14
lea    0xea4(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
sub    (%rsp),%rax
mov    %rax,%rsi
neg    %rsi
cmovs  %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
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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