#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*/ chaz_ConfWriter_add_def(char *, char *);
int /*<<< orphan*/ chaz_ConfWriter_append_conf(char *);
int /*<<< orphan*/ chaz_ConfWriter_end_module();
int /*<<< orphan*/ chaz_ConfWriter_start_module(char *);
void chaz_Floats_run(void) {
  chaz_ConfWriter_start_module("Floats");
  chaz_ConfWriter_append_conf(
      "typedef union { unsigned char c[4]; float f; } chy_floatu32;\n"
      "typedef union { unsigned char c[8]; double d; } chy_floatu64;\n"
      "#ifdef CHY_BIG_END\n"
      "static const chy_floatu32 chy_f32inf\n"
      "    = { { 0x7F, 0x80, 0, 0 } };\n"
      "static const chy_floatu32 chy_f32neginf\n"
      "    = { { 0xFF, 0x80, 0, 0 } };\n"
      "static const chy_floatu32 chy_f32nan\n"
      "    = { { 0x7F, 0xC0, 0, 0 } };\n"
      "static const chy_floatu64 chy_f64inf\n"
      "    = { { 0x7F, 0xF0, 0, 0, 0, 0, 0, 0 } };\n"
      "static const chy_floatu64 chy_f64neginf\n"
      "    = { { 0xFF, 0xF0, 0, 0, 0, 0, 0, 0 } };\n"
      "static const chy_floatu64 chy_f64nan\n"
      "    = { { 0x7F, 0xF8, 0, 0, 0, 0, 0, 0 } };\n"
      "#else /* BIG_END */\n"
      "static const chy_floatu32 chy_f32inf\n"
      "    = { { 0, 0, 0x80, 0x7F } };\n"
      "static const chy_floatu32 chy_f32neginf\n"
      "    = { { 0, 0, 0x80, 0xFF } };\n"
      "static const chy_floatu32 chy_f32nan\n"
      "    = { { 0, 0, 0xC0, 0x7F } };\n"
      "static const chy_floatu64 chy_f64inf\n"
      "    = { { 0, 0, 0, 0, 0, 0, 0xF0, 0x7F } };\n"
      "static const chy_floatu64 chy_f64neginf\n"
      "    = { { 0, 0, 0, 0, 0, 0, 0xF0, 0xFF } };\n"
      "static const chy_floatu64 chy_f64nan\n"
      "    = { { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F } };\n"
      "#endif /* BIG_END */\n");
  chaz_ConfWriter_add_def("F32_INF", "(chy_f32inf.f)");
  chaz_ConfWriter_add_def("F32_NEGINF", "(chy_f32neginf.f)");
  chaz_ConfWriter_add_def("F32_NAN", "(chy_f32nan.f)");
  chaz_ConfWriter_add_def("F64_INF", "(chy_f64inf.d)");
  chaz_ConfWriter_add_def("F64_NEGINF", "(chy_f64neginf.d)");
  chaz_ConfWriter_add_def("F64_NAN", "(chy_f64nan.d)");
  chaz_ConfWriter_end_module();
}


x86 assembly (clang, -O0):
<chaz_Floats_run>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xeb0(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
lea    0x12ec(%rip),%rdi
lea    0x12ed(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x12f0(%rip),%rdi
lea    0x12f4(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x12fa(%rip),%rdi
lea    0x12fb(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x12fe(%rip),%rdi
lea    0x12ff(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x1302(%rip),%rdi
lea    0x1306(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x130c(%rip),%rdi
lea    0x130d(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
mov    $0x0,%al
call   1060 <chaz_ConfWriter_end_module@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Floats_run>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xeb3(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
lea    0x12ef(%rip),%rdi
lea    0x12f0(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x12f3(%rip),%rdi
lea    0x12f7(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x12fd(%rip),%rdi
lea    0x12fe(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x1301(%rip),%rdi
lea    0x1302(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x1305(%rip),%rdi
lea    0x1309(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
lea    0x130f(%rip),%rdi
lea    0x1310(%rip),%rsi
call   1050 <chaz_ConfWriter_add_def@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <chaz_ConfWriter_end_module@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Floats\00"
@.str.1 = [1096 x i8] c"typedef union { unsigned char c[4]; float f; } chy_floatu32;\0Atypedef union { unsigned char c[8]; double d; } chy_floatu64;\0A#ifdef CHY_BIG_END\0Astatic const chy_floatu32 chy_f32inf\0A = { { 0x7F, 0x80, 0, 0 } };\0Astatic const chy_floatu32 chy_f32neginf\0A = { { 0xFF, 0x80, 0, 0 } };\0Astatic const chy_floatu32 chy_f32nan\0A = { { 0x7F, 0xC0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64inf\0A = { { 0x7F, 0xF0, 0, 0, 0, 0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64neginf\0A = { { 0xFF, 0xF0, 0, 0, 0, 0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64nan\0A = { { 0x7F, 0xF8, 0, 0, 0, 0, 0, 0 } };\0A#else /* BIG_END */\0Astatic const chy_floatu32 chy_f32inf\0A = { { 0, 0, 0x80, 0x7F } };\0Astatic const chy_floatu32 chy_f32neginf\0A = { { 0, 0, 0x80, 0xFF } };\0Astatic const chy_floatu32 chy_f32nan\0A = { { 0, 0, 0xC0, 0x7F } };\0Astatic const chy_floatu64 chy_f64inf\0A = { { 0, 0, 0, 0, 0, 0, 0xF0, 0x7F } };\0Astatic const chy_floatu64 chy_f64neginf\0A = { { 0, 0, 0, 0, 0, 0, 0xF0, 0xFF } };\0Astatic const chy_floatu64 chy_f64nan\0A = { { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F } };\0A#endif /* BIG_END */\0A\00"
@.str.2 = [8 x i8] c"F32_INF\00"
@.str.3 = [15 x i8] c"(chy_f32inf.f)\00"
@.str.4 = [11 x i8] c"F32_NEGINF\00"
@.str.5 = [18 x i8] c"(chy_f32neginf.f)\00"
@.str.6 = [8 x i8] c"F32_NAN\00"
@.str.7 = [15 x i8] c"(chy_f32nan.f)\00"
@.str.8 = [8 x i8] c"F64_INF\00"
@.str.9 = [15 x i8] c"(chy_f64inf.d)\00"
@.str.10 = [11 x i8] c"F64_NEGINF\00"
@.str.11 = [18 x i8] c"(chy_f64neginf.d)\00"
@.str.12 = [8 x i8] c"F64_NAN\00"
@.str.13 = [15 x i8] c"(chy_f64nan.d)\00"
define void @chaz_Floats_run() {
%1 = call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([1096 x i8], [1096 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%6 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
%7 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%8 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%9 = call i32 (...) @chaz_ConfWriter_end_module()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Floats\00"
@.str.1 = [1096 x i8] c"typedef union { unsigned char c[4]; float f; } chy_floatu32;\0Atypedef union { unsigned char c[8]; double d; } chy_floatu64;\0A#ifdef CHY_BIG_END\0Astatic const chy_floatu32 chy_f32inf\0A = { { 0x7F, 0x80, 0, 0 } };\0Astatic const chy_floatu32 chy_f32neginf\0A = { { 0xFF, 0x80, 0, 0 } };\0Astatic const chy_floatu32 chy_f32nan\0A = { { 0x7F, 0xC0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64inf\0A = { { 0x7F, 0xF0, 0, 0, 0, 0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64neginf\0A = { { 0xFF, 0xF0, 0, 0, 0, 0, 0, 0 } };\0Astatic const chy_floatu64 chy_f64nan\0A = { { 0x7F, 0xF8, 0, 0, 0, 0, 0, 0 } };\0A#else /* BIG_END */\0Astatic const chy_floatu32 chy_f32inf\0A = { { 0, 0, 0x80, 0x7F } };\0Astatic const chy_floatu32 chy_f32neginf\0A = { { 0, 0, 0x80, 0xFF } };\0Astatic const chy_floatu32 chy_f32nan\0A = { { 0, 0, 0xC0, 0x7F } };\0Astatic const chy_floatu64 chy_f64inf\0A = { { 0, 0, 0, 0, 0, 0, 0xF0, 0x7F } };\0Astatic const chy_floatu64 chy_f64neginf\0A = { { 0, 0, 0, 0, 0, 0, 0xF0, 0xFF } };\0Astatic const chy_floatu64 chy_f64nan\0A = { { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F } };\0A#endif /* BIG_END */\0A\00"
@.str.2 = [8 x i8] c"F32_INF\00"
@.str.3 = [15 x i8] c"(chy_f32inf.f)\00"
@.str.4 = [11 x i8] c"F32_NEGINF\00"
@.str.5 = [18 x i8] c"(chy_f32neginf.f)\00"
@.str.6 = [8 x i8] c"F32_NAN\00"
@.str.7 = [15 x i8] c"(chy_f32nan.f)\00"
@.str.8 = [8 x i8] c"F64_INF\00"
@.str.9 = [15 x i8] c"(chy_f64inf.d)\00"
@.str.10 = [11 x i8] c"F64_NEGINF\00"
@.str.11 = [18 x i8] c"(chy_f64neginf.d)\00"
@.str.12 = [8 x i8] c"F64_NAN\00"
@.str.13 = [15 x i8] c"(chy_f64nan.d)\00"
define void @chaz_Floats_run() {
%1 = tail call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([1096 x i8], [1096 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%6 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
%7 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%8 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%9 = tail call i32 (...) @chaz_ConfWriter_end_module()
ret void
}