#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_append_conf(char *);
int /*<<< orphan*/ chaz_ConfWriter_end_module();
int /*<<< orphan*/ chaz_ConfWriter_end_short_names();
int /*<<< orphan*/ chaz_ConfWriter_shorten_macro(char *);
int /*<<< orphan*/ chaz_ConfWriter_shorten_typedef(char *);
int /*<<< orphan*/ chaz_ConfWriter_start_module(char *);
int /*<<< orphan*/ chaz_ConfWriter_start_short_names();
void chaz_Floats_run(void) {
  chaz_ConfWriter_start_module("Floats");
  chaz_ConfWriter_append_conf("typedef float chy_f32_t;\n"
                              "typedef double chy_f64_t;\n"
                              "#define CHY_HAS_F32_T\n"
                              "#define CHY_HAS_F64_T\n");
  chaz_ConfWriter_append_conf(
      "typedef union { chy_u32_t i; float f; } chy_floatu32;\n"
      "static const chy_floatu32 chy_f32inf    = {CHY_U32_C(0x7f800000)};\n"
      "static const chy_floatu32 chy_f32neginf = {CHY_U32_C(0xff800000)};\n"
      "static const chy_floatu32 chy_f32nan    = {CHY_U32_C(0x7fc00000)};\n"
      "#define CHY_F32_INF (chy_f32inf.f)\n"
      "#define CHY_F32_NEGINF (chy_f32neginf.f)\n"
      "#define CHY_F32_NAN (chy_f32nan.f)\n");
  chaz_ConfWriter_start_short_names();
  chaz_ConfWriter_shorten_typedef("f32_t");
  chaz_ConfWriter_shorten_typedef("f64_t");
  chaz_ConfWriter_shorten_macro("HAS_F32_T");
  chaz_ConfWriter_shorten_macro("HAS_F64_T");
  chaz_ConfWriter_shorten_macro("F32_INF");
  chaz_ConfWriter_shorten_macro("F32_NEGINF");
  chaz_ConfWriter_shorten_macro("F32_NAN");
  chaz_ConfWriter_end_short_names();
  chaz_ConfWriter_end_module();
}


x86 assembly (clang, -O0):
<chaz_Floats_run>:
push   %rbp
mov    %rsp,%rbp
lea    0xe85(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xe80(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
lea    0xed4(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
mov    $0x0,%al
call   1080 <chaz_ConfWriter_start_short_names@plt>
lea    0x1030(%rip),%rdi
call   1090 <chaz_ConfWriter_shorten_typedef@plt>
lea    0x102a(%rip),%rdi
call   1090 <chaz_ConfWriter_shorten_typedef@plt>
lea    0x1024(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x1022(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x1020(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x101c(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x101b(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
mov    $0x0,%al
call   1060 <chaz_ConfWriter_end_short_names@plt>
mov    $0x0,%al
call   1070 <chaz_ConfWriter_end_module@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Floats_run>:
push   %rax
lea    0xe88(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xe83(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
lea    0xed7(%rip),%rdi
call   1040 <chaz_ConfWriter_append_conf@plt>
xor    %eax,%eax
call   1080 <chaz_ConfWriter_start_short_names@plt>
lea    0x1033(%rip),%rdi
call   1090 <chaz_ConfWriter_shorten_typedef@plt>
lea    0x102d(%rip),%rdi
call   1090 <chaz_ConfWriter_shorten_typedef@plt>
lea    0x1027(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x1025(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x1023(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x101f(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
lea    0x101e(%rip),%rdi
call   1050 <chaz_ConfWriter_shorten_macro@plt>
xor    %eax,%eax
call   1060 <chaz_ConfWriter_end_short_names@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <chaz_ConfWriter_end_module@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Floats\00"
@.str.1 = [96 x i8] c"typedef float chy_f32_t;\0Atypedef double chy_f64_t;\0A#define CHY_HAS_F32_T\0A#define CHY_HAS_F64_T\0A\00"
@.str.2 = [367 x i8] c"typedef union { chy_u32_t i; float f; } chy_floatu32;\0Astatic const chy_floatu32 chy_f32inf = {CHY_U32_C(0x7f800000)};\0Astatic const chy_floatu32 chy_f32neginf = {CHY_U32_C(0xff800000)};\0Astatic const chy_floatu32 chy_f32nan = {CHY_U32_C(0x7fc00000)};\0A#define CHY_F32_INF (chy_f32inf.f)\0A#define CHY_F32_NEGINF (chy_f32neginf.f)\0A#define CHY_F32_NAN (chy_f32nan.f)\0A\00"
@.str.3 = [6 x i8] c"f32_t\00"
@.str.4 = [6 x i8] c"f64_t\00"
@.str.5 = [10 x i8] c"HAS_F32_T\00"
@.str.6 = [10 x i8] c"HAS_F64_T\00"
@.str.7 = [8 x i8] c"F32_INF\00"
@.str.8 = [11 x i8] c"F32_NEGINF\00"
@.str.9 = [8 x i8] c"F32_NAN\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 ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([367 x i8], [367 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @chaz_ConfWriter_start_short_names()
%5 = call i32 @chaz_ConfWriter_shorten_typedef(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @chaz_ConfWriter_shorten_typedef(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 (...) @chaz_ConfWriter_end_short_names()
%13 = call i32 (...) @chaz_ConfWriter_end_module()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Floats\00"
@.str.1 = [96 x i8] c"typedef float chy_f32_t;\0Atypedef double chy_f64_t;\0A#define CHY_HAS_F32_T\0A#define CHY_HAS_F64_T\0A\00"
@.str.2 = [367 x i8] c"typedef union { chy_u32_t i; float f; } chy_floatu32;\0Astatic const chy_floatu32 chy_f32inf = {CHY_U32_C(0x7f800000)};\0Astatic const chy_floatu32 chy_f32neginf = {CHY_U32_C(0xff800000)};\0Astatic const chy_floatu32 chy_f32nan = {CHY_U32_C(0x7fc00000)};\0A#define CHY_F32_INF (chy_f32inf.f)\0A#define CHY_F32_NEGINF (chy_f32neginf.f)\0A#define CHY_F32_NAN (chy_f32nan.f)\0A\00"
@.str.3 = [6 x i8] c"f32_t\00"
@.str.4 = [6 x i8] c"f64_t\00"
@.str.5 = [10 x i8] c"HAS_F32_T\00"
@.str.6 = [10 x i8] c"HAS_F64_T\00"
@.str.7 = [8 x i8] c"F32_INF\00"
@.str.8 = [11 x i8] c"F32_NEGINF\00"
@.str.9 = [8 x i8] c"F32_NAN\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 ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @chaz_ConfWriter_append_conf(i8* getelementptr inbounds ([367 x i8], [367 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @chaz_ConfWriter_start_short_names()
%5 = tail call i32 @chaz_ConfWriter_shorten_typedef(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @chaz_ConfWriter_shorten_typedef(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @chaz_ConfWriter_shorten_macro(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 (...) @chaz_ConfWriter_end_short_names()
%13 = tail call i32 (...) @chaz_ConfWriter_end_module()
ret void
}