#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(void) {
  int num1 = 0;
  int num2 = 0;
  printf("Digite dois numeros inteiros: ");
  scanf("%d%d", &num1, &num2);
  printf("Lidos: %d e %d\n", num1, num2);
  printf("Soma = %d\n", num1 + num2);
  printf("Diferença = %d\n", num1 - num2);
  printf("Produto = %d\n", num1 * num2);
  printf("Quociente = %d\n", num1 / num2);
  printf("Módulo = %d\n", num1 % num2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
lea    0xe97(%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
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
sub    (%rsp),%esi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
imul   0x4(%rsp),%esi
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xea8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xea0(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [16 x i8] c"Lidos: %d e %d\0A\00"
@.str.3 = [11 x i8] c"Soma = %d\0A\00"
@.str.4 = [17 x i8] c"Diferen\C3\A7a = %d\0A\00"
@.str.5 = [14 x i8] c"Produto = %d\0A\00"
@.str.6 = [16 x i8] c"Quociente = %d\0A\00"
@.str.7 = [14 x i8] c"M\C3\B3dulo = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = mul nsw i32 %17, %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = sdiv i32 %21, %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = srem i32 %25, %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [16 x i8] c"Lidos: %d e %d\0A\00"
@.str.3 = [11 x i8] c"Soma = %d\0A\00"
@.str.4 = [17 x i8] c"Diferen\C3\A7a = %d\0A\00"
@.str.5 = [14 x i8] c"Produto = %d\0A\00"
@.str.6 = [16 x i8] c"Quociente = %d\0A\00"
@.str.7 = [14 x i8] c"M\C3\B3dulo = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = sub nsw i32 %14, %15
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = mul nsw i32 %19, %18
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = sdiv i32 %22, %23
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %1
%27 = load i32, i32* %2
%28 = srem i32 %26, %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %28)
ret i32 0
}