#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  while (1) {
    scanf("%d%d", &a, &b);
    if (a == -1 && b == -1)
      exit(0);
    if (a == 1 || b == 1)
      printf("%d+%d=%d\n", a, b, (a + b));
    else
      printf("%d+%d!=%d\n", a, b, (a + b));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0xffffffff,-0x8(%rbp)
jne    116e <main+0x3e>
cmpl   $0xffffffff,-0xc(%rbp)
jne    116e <main+0x3e>
xor    %edi,%edi
call   1050 <exit@plt>
cmpl   $0x1,-0x8(%rbp)
je     1182 <main+0x52>
cmpl   $0x1,-0xc(%rbp)
jne    119f <main+0x6f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <main+0x87>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
jmp    114c <main+0x1c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x1,%esi
cmove  %rax,%rdi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
cmp    $0xffffffff,%esi
jne    1171 <main+0x41>
cmp    $0xffffffff,%edx
je     118c <main+0x5c>
lea    (%rdx,%rsi,1),%ecx
lea    0xe8a(%rip),%rax
mov    %rax,%rdi
cmp    $0x1,%edx
je     1140 <main+0x10>
lea    0xe85(%rip),%rdi
jmp    1140 <main+0x10>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [10 x i8] c"%d+%d=%d\0A\00"
@.str.2 = [11 x i8] c"%d+%d!=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %0, %33
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %8, %4
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 1
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %26
19: ; preds = %16, %13
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = add nsw i32 %22, %23
%25 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %21, i32 %24)
br label %33
26: ; preds = %16
%27 = load i32, i32* %2
%28 = load i32, i32* %3
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
%32 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %27, i32 %28, i32 %31)
br label %33
33: ; preds = %26, %19
br label %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [10 x i8] c"%d+%d=%d\0A\00"
@.str.2 = [11 x i8] c"%d+%d!=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, -1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, -1
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %11, label %13
11: ; preds = %13, %0
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %0, %13
%14 = phi i32 [ %25, %13 ], [ %8, %0 ]
%15 = phi i32 [ %23, %13 ], [ %6, %0 ]
%16 = icmp eq i32 %15, 1
%17 = icmp eq i32 %14, 1
%18 = or i1 %16, %17
%19 = add nsw i32 %14, %15
%20 = select i1 %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%21 = call i32 @printf(i8* %20, i32 %15, i32 %14, i32 %19)
%22 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%23 = load i32, i32* %1
%24 = icmp eq i32 %23, -1
%25 = load i32, i32* %2
%26 = icmp eq i32 %25, -1
%27 = select i1 %24, i1 %26, i1 false
br i1 %27, label %11, label %13
}