#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(void) {
  int a = 25;
  int b = 2;
  float c = 25.0;
  float d = 2.0;
  printf("6 + a / 5 * b = %i\n", 6 + a / 5 * b);
  printf("a / b * b = %i\n", a / b * b);
  printf("c / d * d = %f\n", c / d * d);
  printf("-a = %i\n", -a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x19,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xec5(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
imul   -0x8(%rbp),%esi
add    $0x6,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%esi
imul   -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
sub    -0x4(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x19,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0xffffffe7,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"6 + a / 5 * b = %i\0A\00"
@.str.1 = [16 x i8] c"a / b * b = %i\0A\00"
@.str.2 = [16 x i8] c"c / d * d = %f\0A\00"
@.str.3 = [9 x i8] c"-a = %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 25, i32* %1
store i32 2, i32* %2
store float 2.500000e+01, float* %3
store float 2.000000e+00, float* %4
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 5
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
%9 = add nsw i32 6, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = sdiv i32 %11, %12
%14 = load i32, i32* %2
%15 = mul nsw i32 %13, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fdiv float %17, %18
%20 = load float, float* %4
%21 = fmul float %19, %20
%22 = fptosi float %21 to i32
%23 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %1
%25 = sub nsw i32 0, %24
%26 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"6 + a / 5 * b = %i\0A\00"
@.str.1 = [16 x i8] c"a / b * b = %i\0A\00"
@.str.2 = [16 x i8] c"c / d * d = %f\0A\00"
@.str.3 = [9 x i8] c"-a = %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 16)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 24)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 25)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 -25)
ret i32 0
}