#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 0xA121;
  int y = 0xA121;
  int a = 0x51A;
  int b = 0x51A;
  int c = 0x52A;
  int d = 0x52A;
  int e = 0x53A;
  int f = 0x54A;
  int g = 0x53A;
  int h = 0x54A;
  printf("Hex.Checker.V1 RESULTS\n");
  printf("===========================\nAddition (+) of \nx=%x\ny=%x\nis "
         "%x\n===========================\n",
         x, y, x + y);
  printf("Multiplication (*) of \na=%x \nb=%x\nis "
         "%x\n===========================\n",
         a, b, a * b);
  printf("Division (/) of \nc=%x \nd=%x\nis %x\n===========================\n",
         c, d, c / d);
  printf(
      "Subtraction (-) of \ne=%x \nf=%x\nis %x\n===========================\n",
      e, f, e - f);
  printf("Modulus of \ng=%x \nh=%x\nis %x\n===========================\n", g, h,
         g % h);
  return 0;
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa121,-0x8(%rbp)
movl   $0xa121,-0xc(%rbp)
movl   $0x51a,-0x10(%rbp)
movl   $0x51a,-0x14(%rbp)
movl   $0x52a,-0x18(%rbp)
movl   $0x52a,-0x1c(%rbp)
movl   $0x53a,-0x20(%rbp)
movl   $0x54a,-0x24(%rbp)
movl   $0x53a,-0x28(%rbp)
movl   $0x54a,-0x2c(%rbp)
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
imul   -0x14(%rbp),%ecx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    -0x34(%rbp),%edx
mov    %eax,%ecx
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
sub    -0x24(%rbp),%ecx
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
mov    %edx,%ecx
mov    -0x30(%rbp),%edx
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x1032(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0xa121,%esi
mov    $0xa121,%edx
mov    $0x14242,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
mov    $0x51a,%esi
mov    $0x51a,%edx
mov    $0x1a06a4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x52a,%esi
mov    $0x52a,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0x53a,%esi
mov    $0x54a,%edx
mov    $0xfffffff0,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf78(%rip),%rdi
mov    $0x53a,%esi
mov    $0x54a,%edx
mov    $0x53a,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Hex.Checker.V1 RESULTS\0A\00"
@.str.1 = [90 x i8] c"===========================\0AAddition (+) of \0Ax=%x\0Ay=%x\0Ais %x\0A===========================\0A\00"
@.str.2 = [69 x i8] c"Multiplication (*) of \0Aa=%x \0Ab=%x\0Ais %x\0A===========================\0A\00"
@.str.3 = [63 x i8] c"Division (/) of \0Ac=%x \0Ad=%x\0Ais %x\0A===========================\0A\00"
@.str.4 = [66 x i8] c"Subtraction (-) of \0Ae=%x \0Af=%x\0Ais %x\0A===========================\0A\00"
@.str.5 = [58 x i8] c"Modulus of \0Ag=%x \0Ah=%x\0Ais %x\0A===========================\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%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
store i32 0, i32* %1
store i32 41249, i32* %2
store i32 41249, i32* %3
store i32 1306, i32* %4
store i32 1306, i32* %5
store i32 1322, i32* %6
store i32 1322, i32* %7
store i32 1338, i32* %8
store i32 1354, i32* %9
store i32 1338, i32* %10
store i32 1354, i32* %11
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14, i32 %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = mul nsw i32 %21, %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %19, i32 %20, i32 %23)
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = sdiv i32 %27, %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 %25, i32 %26, i32 %29)
%31 = load i32, i32* %8
%32 = load i32, i32* %9
%33 = load i32, i32* %8
%34 = load i32, i32* %9
%35 = sub nsw i32 %33, %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %31, i32 %32, i32 %35)
%37 = load i32, i32* %10
%38 = load i32, i32* %11
%39 = load i32, i32* %10
%40 = load i32, i32* %11
%41 = srem i32 %39, %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0), i32 %37, i32 %38, i32 %41)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [90 x i8] c"===========================\0AAddition (+) of \0Ax=%x\0Ay=%x\0Ais %x\0A===========================\0A\00"
@.str.2 = [69 x i8] c"Multiplication (*) of \0Aa=%x \0Ab=%x\0Ais %x\0A===========================\0A\00"
@.str.3 = [63 x i8] c"Division (/) of \0Ac=%x \0Ad=%x\0Ais %x\0A===========================\0A\00"
@.str.4 = [66 x i8] c"Subtraction (-) of \0Ae=%x \0Af=%x\0Ais %x\0A===========================\0A\00"
@.str.5 = [58 x i8] c"Modulus of \0Ag=%x \0Ah=%x\0Ais %x\0A===========================\0A\00"
@str = [23 x i8] c"Hex.Checker.V1 RESULTS\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0), i32 41249, i32 41249, i32 82498)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 1306, i32 1306, i32 1705636)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 1322, i32 1322, i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 1338, i32 1354, i32 -16)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0), i32 1338, i32 1354, i32 1338)
ret i32 0
}