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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1170 <main+0x50>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1245 <main+0x125>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    119b <main+0x7b>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    1240 <main+0x120>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    11c6 <main+0xa6>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    123b <main+0x11b>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11f0 <main+0xd0>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
jmp    1236 <main+0x116>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    121c <main+0xfc>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    1231 <main+0x111>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
jmp    1236 <main+0x116>
jmp    123b <main+0x11b>
jmp    1240 <main+0x120>
jmp    1245 <main+0x125>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
lea    (%rdx,%rsi,1),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
jne    115d <main+0x3d>
lea    0xeb0(%rip),%rdi
mov    %eax,%ecx
jmp    11a9 <main+0x89>
lea    (%rcx,%rdx,1),%eax
cmp    %eax,%esi
jne    116d <main+0x4d>
lea    0xea8(%rip),%rdi
jmp    11a9 <main+0x89>
mov    %edx,%eax
sub    %ecx,%eax
cmp    %eax,%esi
jne    117e <main+0x5e>
lea    0xea1(%rip),%rdi
jmp    11a9 <main+0x89>
mov    %edx,%eax
imul   %esi,%eax
cmp    %ecx,%eax
jne    1190 <main+0x70>
lea    0xe99(%rip),%rdi
jmp    11a9 <main+0x89>
mov    %ecx,%eax
imul   %edx,%eax
cmp    %eax,%esi
jne    11a2 <main+0x82>
lea    0xe91(%rip),%rdi
jmp    11a9 <main+0x89>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [10 x i8] c"%d+%d=%d\0A\00"
@.str.2 = [10 x i8] c"%d=%d+%d\0A\00"
@.str.3 = [10 x i8] c"%d=%d-%d\0A\00"
@.str.4 = [10 x i8] c"%d*%d=%d\0A\00"
@.str.5 = [10 x i8] c"%d=%d*%d\0A\00"
@.str.6 = [10 x i8] c"%d=%d/%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
br label %69
16: ; preds = %0
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = add nsw i32 %18, %19
%21 = icmp eq i32 %17, %20
br i1 %21, label %22, label %27
22: ; preds = %16
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %24, i32 %25)
br label %68
27: ; preds = %16
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = sub nsw i32 %29, %30
%32 = icmp eq i32 %28, %31
br i1 %32, label %33, label %38
33: ; preds = %27
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %34, i32 %35, i32 %36)
br label %67
38: ; preds = %27
%39 = load i32, i32* %2
%40 = load i32, i32* %3
%41 = mul nsw i32 %39, %40
%42 = load i32, i32* %4
%43 = icmp eq i32 %41, %42
br i1 %43, label %44, label %49
44: ; preds = %38
%45 = load i32, i32* %2
%46 = load i32, i32* %3
%47 = load i32, i32* %4
%48 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %45, i32 %46, i32 %47)
br label %66
49: ; preds = %38
%50 = load i32, i32* %2
%51 = load i32, i32* %3
%52 = load i32, i32* %4
%53 = mul nsw i32 %51, %52
%54 = icmp eq i32 %50, %53
br i1 %54, label %55, label %60
55: ; preds = %49
%56 = load i32, i32* %2
%57 = load i32, i32* %3
%58 = load i32, i32* %4
%59 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %56, i32 %57, i32 %58)
br label %65
60: ; preds = %49
%61 = load i32, i32* %2
%62 = load i32, i32* %3
%63 = load i32, i32* %4
%64 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %61, i32 %62, i32 %63)
br label %65
65: ; preds = %60, %55
br label %66
66: ; preds = %65, %44
br label %67
67: ; preds = %66, %33
br label %68
68: ; preds = %67, %22
br label %69
69: ; preds = %68, %11
ret i32 0
}

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