#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 *, float, ...);
void module1_section2_topic4() {
  int a = 6 - (-6);
  int b = 6 + 6;
  printf("a == 	%d\n", a);
  printf("b == %d\n", b);
  int c = 6 * 6;
  int alt_c = 6 + 6 + 6 + 6 + 6 + 6;
  printf("c == 	%d\n", c);
  printf("alt_c == %d\n", alt_c);
  int y_two = (3 + 3 - 6 - 9 * 10 - (-10)) / 7;
  printf("z == 	%d\n", y_two);
  printf("alt_z == %d\n", (3 + 3 - 6 - 9 * 10 - (-10)) / 7);
  float x_two = (3 + 3 - 6 - 9 * 10 - (-10)) / 7;
  printf("x_two == 	%f\n", x_two);
  printf("x_two no var == %f\n", (3 + 3 - 6 - 9 * 10 - (-10)) / 7);
  float w = 1 + 2;
  float x = 1 - 2;
  float y = 1 * 2;
  float z = 1 / 2;
  printf("%f, %f, %f, %f\n", w, x, y, z);
  w = 1 + 2.0;
  x = 1 - 2.0;
  y = 1 * 2.0;
  z = 1 / 2.0;
  printf("%f, %f, %f, %f\n", w, x, y, z);
  w = (float)1 + 2;
  x = (float)1 - 2;
  y = (float)1 * 2;
  z = (float)1 / 2;
  printf("%f, %f, %f, %f\n", w, x, y, z);
}


x86 assembly (clang, -O0):
<module1_section2_topic4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xc,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
lea    0xee2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
lea    0xed9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x24,-0xc(%rbp)
movl   $0x24,-0x10(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
lea    0xec1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0xfffffff5,-0x14(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
movss  0xe67(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xe58(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
movss  0xe31(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xe1e(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe0d(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xdfc(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe3b(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movss  0xdc1(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xdb0(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xd9f(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xd8e(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xdd9(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movss  0xd5f(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xd4e(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xd3d(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xd2c(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xd77(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module1_section2_topic4>:
push   %rbx
lea    0xf10(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
movss  0xeca(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
movss  0xeb8(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
movss  0xea2(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
movss  0xe90(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
movss  0xe7a(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
movss  0xe64(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
movss  0xe4e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rbx
movss  0xe3c(%rip),%xmm0
movsd  0xe38(%rip),%xmm1
movsd  0xe38(%rip),%xmm2
xorps  %xmm3,%xmm3
mov    %rbx,%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0xe2b(%rip),%xmm3
mov    %rbx,%rdi
movss  0xe0c(%rip),%xmm0
movsd  0xe08(%rip),%xmm1
movsd  0xe08(%rip),%xmm2
mov    $0x4,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0xdea(%rip),%xmm0
movsd  0xde6(%rip),%xmm1
movsd  0xde6(%rip),%xmm2
movsd  0xde6(%rip),%xmm3
mov    $0x4,%al
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"a == \09%d\0A\00"
@.str.1 = [9 x i8] c"b == %d\0A\00"
@.str.2 = [10 x i8] c"c == \09%d\0A\00"
@.str.3 = [13 x i8] c"alt_c == %d\0A\00"
@.str.4 = [10 x i8] c"z == \09%d\0A\00"
@.str.5 = [13 x i8] c"alt_z == %d\0A\00"
@.str.6 = [14 x i8] c"x_two == \09%f\0A\00"
@.str.7 = [20 x i8] c"x_two no var == %f\0A\00"
@.str.8 = [16 x i8] c"%f, %f, %f, %f\0A\00"
define void @module1_section2_topic4() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 12, i32* %1
store i32 12, i32* %2
%11 = load i32, i32* %1
%12 = sitofp i32 %11 to float
%13 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %12)
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to float
%16 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float %15)
store i32 36, i32* %3
store i32 36, i32* %4
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to float
%19 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), float %18)
%20 = load i32, i32* %4
%21 = sitofp i32 %20 to float
%22 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), float %21)
store i32 -11, i32* %5
%23 = load i32, i32* %5
%24 = sitofp i32 %23 to float
%25 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), float %24)
%26 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), float -1.100000e+01)
store float -1.100000e+01, float* %6
%27 = load float, float* %6
%28 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), float %27)
%29 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), float -1.100000e+01)
store float 3.000000e+00, float* %7
store float -1.000000e+00, float* %8
store float 2.000000e+00, float* %9
store float 0.000000e+00, float* %10
%30 = load float, float* %7
%31 = load float, float* %8
%32 = fpext float %31 to double
%33 = load float, float* %9
%34 = fpext float %33 to double
%35 = load float, float* %10
%36 = fpext float %35 to double
%37 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float %30, double %32, double %34, double %36)
store float 3.000000e+00, float* %7
store float -1.000000e+00, float* %8
store float 2.000000e+00, float* %9
store float 5.000000e-01, float* %10
%38 = load float, float* %7
%39 = load float, float* %8
%40 = fpext float %39 to double
%41 = load float, float* %9
%42 = fpext float %41 to double
%43 = load float, float* %10
%44 = fpext float %43 to double
%45 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float %38, double %40, double %42, double %44)
store float 3.000000e+00, float* %7
store float -1.000000e+00, float* %8
store float 2.000000e+00, float* %9
store float 5.000000e-01, float* %10
%46 = load float, float* %7
%47 = load float, float* %8
%48 = fpext float %47 to double
%49 = load float, float* %9
%50 = fpext float %49 to double
%51 = load float, float* %10
%52 = fpext float %51 to double
%53 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float %46, double %48, double %50, double %52)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"a == \09%d\0A\00"
@.str.1 = [9 x i8] c"b == %d\0A\00"
@.str.2 = [10 x i8] c"c == \09%d\0A\00"
@.str.3 = [13 x i8] c"alt_c == %d\0A\00"
@.str.4 = [10 x i8] c"z == \09%d\0A\00"
@.str.5 = [13 x i8] c"alt_z == %d\0A\00"
@.str.6 = [14 x i8] c"x_two == \09%f\0A\00"
@.str.7 = [20 x i8] c"x_two no var == %f\0A\00"
@.str.8 = [16 x i8] c"%f, %f, %f, %f\0A\00"
define void @module1_section2_topic4() {
%1 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float 1.200000e+01)
%2 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float 1.200000e+01)
%3 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), float 3.600000e+01)
%4 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), float 3.600000e+01)
%5 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), float -1.100000e+01)
%6 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), float -1.100000e+01)
%7 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), float -1.100000e+01)
%8 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), float -1.100000e+01)
%9 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float 3.000000e+00, double -1.000000e+00, double 2.000000e+00, double 0.000000e+00)
%10 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float 3.000000e+00, double -1.000000e+00, double 2.000000e+00, double 5.000000e-01)
%11 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), float 3.000000e+00, double -1.000000e+00, double 2.000000e+00, double 5.000000e-01)
ret void
}