#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 abs(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fscanf(int /*<<< orphan*/, char *, char *, int *, int *, int *, int *,
           int *, int *, int *, int *, int *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, char *, int, int, int, char);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
main() {
  char line[1000 + 1], line1[1000 + 1], line2[1000 + 1];
  int a, b;
  int t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13;
  while (!feof(stdin)) {
    if (fscanf(stdin, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d", line1, &t1,
               &t2, &t3, &t4, &t5, &t6, &a, &t8, &t9, &t10, &t11, &t12,
               &t13) != 14)
      exit(20);
    fscanf(stdin, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d", line2, &t1, &t2,
           &t3, &t4, &t5, &t6, &b, &t8, &t9, &t10, &t11, &t12, &t13);
    if (strcmp(line1, line2)) {
      fprintf(stderr, "different patterns\n");
      exit(20);
    }
    printf("%s %d %d %d %c\n", line1, abs(a - b), a, b,
           (a < 0) ^ (b < 0) ? '!' : ' ');
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xca8,%rsp
movl   $0x0,-0x2c(%rbp)
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
call   1080 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11ae <main+0x3e>
jmp    141e <main+0x2ae>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
lea    -0x810(%rbp),%rdx
lea    0xe3b(%rip),%rsi
lea    -0xc0c(%rbp),%rcx
lea    -0xc10(%rbp),%r8
lea    -0xc14(%rbp),%r9
lea    -0xc18(%rbp),%rax
mov    %rax,-0xc58(%rbp)
lea    -0xc1c(%rbp),%rax
mov    %rax,-0xc50(%rbp)
lea    -0xc20(%rbp),%r13
lea    -0xc04(%rbp),%r12
lea    -0xc28(%rbp),%r15
lea    -0xc2c(%rbp),%r14
lea    -0xc30(%rbp),%rbx
lea    -0xc34(%rbp),%r11
lea    -0xc38(%rbp),%r10
lea    -0xc3c(%rbp),%rax
mov    %rax,-0xc48(%rbp)
mov    -0xc58(%rbp),%rax
mov    %rax,(%rsp)
mov    -0xc50(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0xc48(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1050 <fscanf@plt>
cmp    $0xe,%eax
je     1293 <main+0x123>
mov    $0x14,%edi
call   1090 <exit@plt>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
lea    -0xc00(%rbp),%rdx
lea    0xd56(%rip),%rsi
lea    -0xc0c(%rbp),%rcx
lea    -0xc10(%rbp),%r8
lea    -0xc14(%rbp),%r9
lea    -0xc18(%rbp),%rax
mov    %rax,-0xc70(%rbp)
lea    -0xc1c(%rbp),%rax
mov    %rax,-0xc68(%rbp)
lea    -0xc20(%rbp),%r13
lea    -0xc08(%rbp),%r12
lea    -0xc28(%rbp),%r15
lea    -0xc2c(%rbp),%r14
lea    -0xc30(%rbp),%rbx
lea    -0xc34(%rbp),%r11
lea    -0xc38(%rbp),%r10
lea    -0xc3c(%rbp),%rax
mov    %rax,-0xc60(%rbp)
mov    -0xc70(%rbp),%rax
mov    %rax,(%rsp)
mov    -0xc68(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0xc60(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1050 <fscanf@plt>
lea    -0x810(%rbp),%rdi
lea    -0xc00(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     13a1 <main+0x231>
mov    0x2c4f(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x14,%edi
call   1090 <exit@plt>
lea    -0x810(%rbp),%rax
mov    %rax,-0xc78(%rbp)
mov    -0xc04(%rbp),%edi
sub    -0xc08(%rbp),%edi
call   1030 <abs@plt>
mov    -0xc78(%rbp),%rsi
mov    %eax,%edx
mov    -0xc04(%rbp),%ecx
mov    -0xc08(%rbp),%r8d
cmpl   $0x0,-0xc04(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%r9d
cmpl   $0x0,-0xc08(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
xor    %eax,%r9d
mov    $0x20,%eax
mov    $0x21,%edi
cmp    $0x0,%r9d
cmovne %edi,%eax
lea    0xc2e(%rip),%rdi
movsbl %al,%r9d
call   1040 <printf@plt>
jmp    118b <main+0x1b>
mov    -0x2c(%rbp),%eax
add    $0xca8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1070 <feof@plt>
test   %eax,%eax
jne    12fc <main+0x19c>
lea    0x18(%rsp),%r15
lea    0x1c(%rsp),%r13
lea    0x20(%rsp),%r14
lea    0x24(%rsp),%r12
lea    0x8(%rsp),%r11
lea    0x28(%rsp),%r10
lea    0xe54(%rip),%rdx
lea    0x14(%rsp),%rbx
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%rax
nopl   0x0(%rax,%rax,1)
mov    0x2e21(%rip),%rcx
mov    (%rcx),%edi
mov    %rdx,%rsi
lea    0x40(%rsp),%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
mov    %rax,%r9
push   %r15
push   %r13
push   %r14
lea    0x50(%rsp),%rbp
push   %rbp
push   %r12
lea    0x64(%rsp),%rax
push   %rax
lea    0x64(%rsp),%rbx
push   %rbx
push   %r11
push   %r10
lea    0x74(%rsp),%rbx
push   %rbx
mov    %rax,%rbx
call   1040 <fscanf@plt>
add    $0x50,%rsp
cmp    $0xe,%eax
jne    1325 <main+0x1c5>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
lea    0xddd(%rip),%rsi
lea    0x430(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
push   %r15
push   %r13
mov    %rax,%r15
push   %r14
push   %rbp
push   %r12
push   %rbx
lea    0x60(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
lea    0x68(%rsp),%rax
mov    %rax,%rbx
push   %rax
lea    0x74(%rsp),%rax
push   %rax
call   1040 <fscanf@plt>
add    $0x50,%rsp
lea    0x40(%rsp),%rdi
lea    0x430(%rsp),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1310 <main+0x1b0>
mov    0x34(%rsp),%ecx
mov    0x30(%rsp),%r8d
mov    %ecx,%eax
sub    %r8d,%eax
mov    %eax,%edx
neg    %edx
cmovs  %eax,%edx
mov    %r8d,%r9d
xor    %ecx,%r9d
shr    $0x1f,%r9d
or     $0x20,%r9d
lea    0xd8e(%rip),%rdi
lea    0x40(%rsp),%rsi
call   1030 <printf@plt>
mov    (%r15),%edi
call   1070 <feof@plt>
test   %eax,%eax
lea    0x18(%rsp),%r15
lea    0x1c(%rsp),%r13
lea    0x20(%rsp),%r14
lea    0x24(%rsp),%r12
lea    0x8(%rsp),%r11
mov    %rbx,%r10
lea    0xd19(%rip),%rdx
lea    0x14(%rsp),%rbx
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%rax
je     11c0 <main+0x60>
xor    %eax,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
lea    0xd0a(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x14,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [42 x i8] c"%s %d %d %d %d %d %d %d %d %d %d %d %d %d\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"different patterns\0A\00"
@.str.2 = [16 x i8] c"%s %d %d %d %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x i8]
%3 = alloca [1001 x i8]
%4 = alloca [1001 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %1
br label %20
20: ; preds = %44, %0
%21 = load i32, i32* @stdin
%22 = call i32 @feof(i32 %21)
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
br i1 %24, label %25, label %64
25: ; preds = %20
%26 = load i32, i32* @stdin
%27 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%28 = call i32 @fscanf(i32 %26, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %27, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %5, i32* %14, i32* %15, i32* %16, i32* %17, i32* %18, i32* %19)
%29 = icmp ne i32 %28, 14
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 @exit(i32 20)
unreachable
32: ; preds = %25
%33 = load i32, i32* @stdin
%34 = getelementptr inbounds [1001 x i8], [1001 x i8]* %4, i64 0, i64 0
%35 = call i32 @fscanf(i32 %33, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %34, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %6, i32* %14, i32* %15, i32* %16, i32* %17, i32* %18, i32* %19)
%36 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%37 = getelementptr inbounds [1001 x i8], [1001 x i8]* %4, i64 0, i64 0
%38 = call i64 @strcmp(i8* %36, i8* %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %32
%41 = load i32, i32* @stderr
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%43 = call i32 @exit(i32 20)
unreachable
44: ; preds = %32
%45 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%46 = load i32, i32* %5
%47 = load i32, i32* %6
%48 = sub nsw i32 %46, %47
%49 = call i32 @abs(i32 %48)
%50 = load i32, i32* %5
%51 = load i32, i32* %6
%52 = load i32, i32* %5
%53 = icmp slt i32 %52, 0
%54 = zext i1 %53 to i32
%55 = load i32, i32* %6
%56 = icmp slt i32 %55, 0
%57 = zext i1 %56 to i32
%58 = xor i32 %54, %57
%59 = icmp ne i32 %58, 0
%60 = zext i1 %59 to i64
%61 = select i1 %59, i32 33, i32 32
%62 = trunc i32 %61 to i8
%63 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %45, i32 %49, i32 %50, i32 %51, i8 signext %62)
br label %20
64: ; preds = %20
%65 = load i32, i32* %1
ret i32 %65
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [42 x i8] c"%s %d %d %d %d %d %d %d %d %d %d %d %d %d\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"different patterns\0A\00"
@.str.2 = [16 x i8] c"%s %d %d %d %c\0A\00"
define i32 @main() {
%1 = alloca [1001 x i8]
%2 = alloca [1001 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = getelementptr inbounds [1001 x i8], [1001 x i8]* %1, i64 0, i64 0
%18 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 0
%19 = bitcast i32* %3 to i8*
%20 = bitcast i32* %4 to i8*
%21 = bitcast i32* %5 to i8*
%22 = bitcast i32* %6 to i8*
%23 = bitcast i32* %7 to i8*
%24 = bitcast i32* %8 to i8*
%25 = bitcast i32* %9 to i8*
%26 = bitcast i32* %10 to i8*
%27 = bitcast i32* %11 to i8*
%28 = bitcast i32* %12 to i8*
%29 = bitcast i32* %13 to i8*
%30 = bitcast i32* %14 to i8*
%31 = bitcast i32* %15 to i8*
%32 = bitcast i32* %16 to i8*
%33 = load i32, i32* @stdin
%34 = call i32 @feof(i32 %33)
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %63
36: ; preds = %0, %51
%37 = load i32, i32* @stdin
%38 = call i32 @fscanf(i32 %37, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %17, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %3, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%39 = icmp eq i32 %38, 14
br i1 %39, label %42, label %40
40: ; preds = %36
%41 = call i32 @exit(i32 20)
unreachable
42: ; preds = %36
%43 = load i32, i32* @stdin
%44 = call i32 @fscanf(i32 %43, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %18, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %4, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%45 = call i64 @strcmp(i8* %17, i8* %18)
%46 = icmp eq i64 %45, 0
br i1 %46, label %51, label %47
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%50 = call i32 @exit(i32 20)
unreachable
51: ; preds = %42
%52 = load i32, i32* %3
%53 = load i32, i32* %4
%54 = sub nsw i32 %52, %53
%55 = call i32 @llvm.abs.i32(i32 %54, i1 true)
%56 = xor i32 %53, %52
%57 = icmp sgt i32 %56, -1
%58 = select i1 %57, i8 32, i8 33
%59 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %17, i32 %55, i32 %52, i32 %53, i8 signext %58)
%60 = load i32, i32* @stdin
%61 = call i32 @feof(i32 %60)
%62 = icmp eq i32 %61, 0
br i1 %62, label %36, label %63
63: ; preds = %51, %0
ret i32 0
}