#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 main() {
  printf("5 + 8 = %d\n", 5 + 8);
  printf("9 - 2 = %d\n", 9 - 2);
  printf("10 / 2 = %d\n", 10 / 2);
  printf("7 * 8 = %d\n", 7 * 8);
  printf("9 % 3 = %d\n", 9 % 3);
  printf("10 % 3 = %d\n", 10 % 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x38,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x38,%esi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"5 + 8 = %d\0A\00"
@.str.1 = [12 x i8] c"9 - 2 = %d\0A\00"
@.str.2 = [13 x i8] c"10 / 2 = %d\0A\00"
@.str.3 = [12 x i8] c"7 * 8 = %d\0A\00"
@.str.4 = [12 x i8] c"9 % 3 = %d\0A\00"
@.str.5 = [13 x i8] c"10 % 3 = %d\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7)
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 56)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"5 + 8 = %d\0A\00"
@.str.1 = [12 x i8] c"9 - 2 = %d\0A\00"
@.str.2 = [13 x i8] c"10 / 2 = %d\0A\00"
@.str.3 = [12 x i8] c"7 * 8 = %d\0A\00"
@.str.4 = [12 x i8] c"9 % 3 = %d\0A\00"
@.str.5 = [13 x i8] c"10 % 3 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 56)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 1)
ret i32 0
}