#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);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x19,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movss  0xecf(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xebe(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
imul   -0xc(%rbp),%esi
add    $0x6,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
imul   -0xc(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
sub    -0x8(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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 i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store i32 25, i32* %2
store i32 2, i32* %3
store float 2.500000e+01, float* %4
store float 2.000000e+00, float* %5
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 5
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = add nsw i32 6, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = sdiv i32 %12, %13
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fdiv float %18, %19
%21 = load float, float* %5
%22 = fmul float %20, %21
%23 = fptosi float %22 to i32
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %2
%26 = sub nsw i32 0, %25
%27 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %26)
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
}