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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x12(%rbp),%rdx
lea    0xeb6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <removeSeven@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <removeSeven@plt>
mov    %eax,-0xc(%rbp)
movsbl -0x12(%rbp),%eax
cmp    $0x2b,%eax
jne    118d <main+0x5d>
mov    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
call   1030 <removeSeven@plt>
mov    %eax,-0x10(%rbp)
jmp    119c <main+0x6c>
mov    -0x8(%rbp),%edi
imul   -0xc(%rbp),%edi
call   1030 <removeSeven@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x12(%rsp),%rdx
lea    0x14(%rsp),%rcx
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1030 <removeSeven@plt>
mov    %eax,0xc(%rsp)
mov    0x14(%rsp),%edi
call   1030 <removeSeven@plt>
mov    %eax,0x14(%rsp)
mov    0xc(%rsp),%edi
mov    %edi,%ecx
imul   %eax,%ecx
add    %eax,%edi
cmpb   $0x2b,0x12(%rsp)
cmovne %ecx,%edi
call   1030 <removeSeven@plt>
lea    0xe7f(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%s%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %6, i32* %2)
%8 = load i32, i32* %1
%9 = call i32 @removeSeven(i32 %8)
store i32 %9, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @removeSeven(i32 %10)
store i32 %11, i32* %2
%12 = load i8, i8* %6
%13 = icmp eq i8 %12, 43
%14 = load i32, i32* %1
%15 = mul nsw i32 %14, %11
%16 = add nsw i32 %14, %11
%17 = select i1 %13, i32 %16, i32 %15
%18 = call i32 @removeSeven(i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
}