#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*/ assert(int);
float dotted_value(int, int);
int /*<<< orphan*/ end_test();
int /*<<< orphan*/ start_test(char *);
void test_dotted_value() {
  start_test("dotted_value");
  assert(dotted_value(8, 0) == (float)(8.0));
  assert(dotted_value(8, 1) == (float)(8.0 / 1.5));
  assert(dotted_value(8, 2) == (float)(8.0 / 1.75));
  end_test();
}


x86 assembly (clang, -O0):
<test_dotted_value>:
push   %rbp
mov    %rsp,%rbp
lea    0xec1(%rip),%rdi
call   1040 <start_test@plt>
mov    $0x8,%edi
xor    %esi,%esi
call   1050 <dotted_value@plt>
movss  0xea4(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1050 <dotted_value@plt>
movss  0xe74(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1050 <dotted_value@plt>
movss  0xe44(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x0,%al
call   1030 <end_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dotted_value>:
push   %rax
lea    0xec4(%rip),%rdi
call   1040 <start_test@plt>
mov    $0x8,%edi
xor    %esi,%esi
call   1050 <dotted_value@plt>
cmpeqss 0xe9e(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1060 <assert@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1050 <dotted_value@plt>
cmpeqss 0xe7e(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1060 <assert@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1050 <dotted_value@plt>
cmpeqss 0xe5e(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1060 <assert@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <end_test@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"dotted_value\00"
define void @test_dotted_value() {
%1 = call i32 @start_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call float @dotted_value(i32 8, i32 0)
%3 = fcmp oeq float %2, 8.000000e+00
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call float @dotted_value(i32 8, i32 1)
%7 = fcmp oeq float %6, 0x4015555560000000
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call float @dotted_value(i32 8, i32 2)
%11 = fcmp oeq float %10, 0x40124924A0000000
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 (...) @end_test()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"dotted_value\00"
define void @test_dotted_value() {
%1 = tail call i32 @start_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call float @dotted_value(i32 8, i32 0)
%3 = fcmp oeq float %2, 8.000000e+00
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call float @dotted_value(i32 8, i32 1)
%7 = fcmp oeq float %6, 0x4015555560000000
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call float @dotted_value(i32 8, i32 2)
%11 = fcmp oeq float %10, 0x40124924A0000000
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 (...) @end_test()
ret void
}