#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  printf("\nEnter two integers with one space in between: ");
  scanf("%d %d", &a, &b);
  if ((a + b) > 1000 || (a * b) > 4000) {
    printf("The sum of the two numbers is %d. The product of the two is %d. \n",
           a + b, a * b);
  }
  if ((a + b) > 200 && (a % b) == 0) {
    printf("The sum of the two numbers is %d. The mod of the two is %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    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x3e8,%eax
jg     1174 <main+0x54>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    $0xfa0,%eax
jle    118f <main+0x6f>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
imul   -0xc(%rbp),%edx
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0xc8,%eax
jle    11cb <main+0xab>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    11cb <main+0xab>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
lea    (%rcx,%rax,1),%esi
mov    %ecx,%edx
imul   %eax,%edx
cmp    $0x3e8,%esi
jg     116c <main+0x4c>
cmp    $0xfa1,%edx
jge    116c <main+0x4c>
cmp    $0xc9,%esi
jge    118c <main+0x6c>
jmp    11a3 <main+0x83>
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
lea    (%rcx,%rax,1),%esi
cmp    $0xc9,%esi
jl     11a3 <main+0x83>
cltd
idiv   %ecx
test   %edx,%edx
jne    11a3 <main+0x83>
lea    0xede(%rip),%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"\0AEnter two integers with one space in between: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [66 x i8] c"The sum of the two numbers is %d. The product of the two is %d. \0A\00"
@.str.3 = [62 x i8] c"The sum of the two numbers is %d. The mod of the two is %d. \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = icmp sgt i32 %8, 1000
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = mul nsw i32 %11, %12
%14 = icmp sgt i32 %13, 4000
br i1 %14, label %15, label %23
15: ; preds = %10, %0
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = mul nsw i32 %19, %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %21)
br label %23
23: ; preds = %15, %10
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = add nsw i32 %24, %25
%27 = icmp sgt i32 %26, 200
br i1 %27, label %28, label %41
28: ; preds = %23
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = srem i32 %29, %30
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %41
33: ; preds = %28
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %2
%38 = load i32, i32* %3
%39 = srem i32 %37, %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i32 %36, i32 %39)
br label %41
41: ; preds = %33, %28, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"\0AEnter two integers with one space in between: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [66 x i8] c"The sum of the two numbers is %d. The product of the two is %d. \0A\00"
@.str.3 = [62 x i8] c"The sum of the two numbers is %d. The mod of the two is %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 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = icmp sgt i32 %9, 1000
%11 = mul nsw i32 %8, %7
%12 = icmp sgt i32 %11, 4000
%13 = select i1 %10, i1 true, i1 %12
br i1 %13, label %14, label %19
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %11)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %17, %16
br label %19
19: ; preds = %0, %14
%20 = phi i32 [ %9, %0 ], [ %18, %14 ]
%21 = phi i32 [ %8, %0 ], [ %17, %14 ]
%22 = phi i32 [ %7, %0 ], [ %16, %14 ]
%23 = icmp sgt i32 %20, 200
br i1 %23, label %24, label %29
24: ; preds = %19
%25 = srem i32 %22, %21
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i32 %20, i32 0)
br label %29
29: ; preds = %27, %24, %19
ret i32 0
}