// test_text.c
// Generated by decompiling test
// using Reko decompiler version 0.11.6.0.

#include "test.h"

// 0000000000400440: void _start(Register (ptr64 Eq_n) rdx, Stack word32 dwArg00, Stack (ptr64 char) ptrArg08)
void _start(void (* rdx)(), word32 dwArg00, char * ptrArg08)
{
	__align_stack<word64>(&ptrArg08);
	word64 qwArg00;
	void * fp;
	__libc_start_main(&g_t40053D, (int32) qwArg00, &ptrArg08, &g_t400550, &g_t4005C0, rdx, fp);
	__halt();
}

// 0000000000400470: void deregister_tm_clones()
// Called from:
//      __do_global_dtors_aux
void deregister_tm_clones()
{
	if (false || true)
		return;
	null();
}

// 00000000004004A0: void register_tm_clones()
// Called from:
//      frame_dummy
void register_tm_clones()
{
	if (true || true)
		return;
	null();
}

// 00000000004004E0: void __do_global_dtors_aux()
void __do_global_dtors_aux()
{
	if (g_b601040 == 0x00)
	{
		deregister_tm_clones();
		g_b601040 = 0x01;
	}
}

// 0000000000400500: void frame_dummy()
void frame_dummy()
{
	if (g_qw600E20 == 0x00 || true)
		register_tm_clones();
	else
	{
		fn0000000000000000(0x00600E20, 0x00600E20);
		register_tm_clones();
	}
}

// 000000000040052D: Register int32 f()
// Called from:
//      main
int32 f()
{
	return putchar(0x0078);
}

// 000000000040053D: void main()
void main()
{
	f();
}

// 0000000000400550: void __libc_csu_init(Register word32 edi, Register word64 rsi, Register word64 rdx)
void __libc_csu_init(word32 edi, word64 rsi, word64 rdx)
{
	word64 rdi;
	edi = (word32) rdi;
	_init();
	int64 rbp_n = 0x00600E18 - g_a600E10;
	Eq_n rbx_n;
	rbx_n.u1 = 0x00;
	if (rbp_n >> 0x03 != 0x00)
	{
		do
		{
			(*((char *) g_a600E10 + rbx_n * 0x08))();
			rbx_n = (word64) rbx_n.u1 + 1;
		} while (rbx_n != rbp_n >> 0x03);
	}
}

// 00000000004005C0: void __libc_csu_fini()
void __libc_csu_fini()
{
}

