#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 /*<<< orphan*/ test_conversions();
int /*<<< orphan*/ test_exposure_by_phase();
int /*<<< orphan*/ test_exposures_by_counts();
int /*<<< orphan*/ test_exposures_with_skipped_phases(int, int, int, int, int,
                                                      double);
int main(int argc, char **argv) {
  test_conversions();
  printf("test_exposures by phase\n");
  test_exposure_by_phase();
  printf("test_exposures_by_counts\n");
  test_exposures_by_counts();
  printf("test_exposures_with_skipped_phases\n");
  test_exposures_with_skipped_phases(4, 1, 10000, 1000, 0, 5.5);
  test_exposures_with_skipped_phases(4, 1, 10000, 1000, 559, 5.5);
  test_exposures_with_skipped_phases(4, 2, 10000, 950, 559, 11.5);
  test_exposures_with_skipped_phases(4, 2, 10000, 1000, 559, 11.5);
  test_exposures_with_skipped_phases(4, 2, 10000, 1100, 559, 11.5);
  test_exposures_with_skipped_phases(4, 3, 10000, 1000, 559, 15.5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <test_conversions@plt>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <test_exposure_by_phase@plt>
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_exposures_by_counts@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
xor    %r8d,%r8d
movsd  0xe52(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
movsd  0xe2b(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x3b6,%ecx
mov    $0x22f,%r8d
movsd  0xdfc(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
movsd  0xdd5(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x44c,%ecx
mov    $0x22f,%r8d
movsd  0xdae(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
movsd  0xd7f(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_conversions@plt>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <test_exposure_by_phase@plt>
lea    0xebe(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <test_exposures_by_counts@plt>
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
movsd  0xe6e(%rip),%xmm0
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
xor    %r8d,%r8d
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
movsd  0xe30(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
movsd  0xe2b(%rip),%xmm0
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x3b6,%ecx
mov    $0x22f,%r8d
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
movsd  0xdea(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2710,%edx
mov    $0x44c,%ecx
mov    $0x22f,%r8d
movsd  0xdc3(%rip),%xmm0
call   1070 <test_exposures_with_skipped_phases@plt>
movsd  0xdbe(%rip),%xmm0
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x2710,%edx
mov    $0x3e8,%ecx
mov    $0x22f,%r8d
call   1070 <test_exposures_with_skipped_phases@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"test_exposures by phase\0A\00"
@.str.1 = [26 x i8] c"test_exposures_by_counts\0A\00"
@.str.2 = [36 x i8] c"test_exposures_with_skipped_phases\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_conversions()
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @test_exposure_by_phase()
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (...) @test_exposures_by_counts()
%11 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 1, i32 10000, i32 1000, i32 0, double 5.500000e+00)
%13 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 1, i32 10000, i32 1000, i32 559, double 5.500000e+00)
%14 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 950, i32 559, double 1.150000e+01)
%15 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 1000, i32 559, double 1.150000e+01)
%16 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 1100, i32 559, double 1.150000e+01)
%17 = call i32 @test_exposures_with_skipped_phases(i32 4, i32 3, i32 10000, i32 1000, i32 559, double 1.550000e+01)
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"test_exposures by phase\00"
@str.3 = [25 x i8] c"test_exposures_by_counts\00"
@str.4 = [35 x i8] c"test_exposures_with_skipped_phases\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_conversions()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @test_exposure_by_phase()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.3, i64 0, i64 0))
%7 = tail call i32 (...) @test_exposures_by_counts()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.4, i64 0, i64 0))
%9 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 1, i32 10000, i32 1000, i32 0, double 5.500000e+00)
%10 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 1, i32 10000, i32 1000, i32 559, double 5.500000e+00)
%11 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 950, i32 559, double 1.150000e+01)
%12 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 1000, i32 559, double 1.150000e+01)
%13 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 2, i32 10000, i32 1100, i32 559, double 1.150000e+01)
%14 = tail call i32 @test_exposures_with_skipped_phases(i32 4, i32 3, i32 10000, i32 1000, i32 559, double 1.550000e+01)
ret i32 0
}