// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Uno/Src/uno_local.c
// Function: add_pieces
void
add_pieces(FILE *fp, char *f)
{	FILE *x;
	char buf[1024];

	if (!nopre) fprintf(fp, "#define UnoType typedef int\n");

	fprintf(fp, "typedef int __builtin_va_list;\n"); /* gcc-ism */
	fprintf(fp, "typedef int __w64;\n"); /* cl-ism */
	fprintf(fp, "#define __builtin_va_start(v,l)\n");
	fprintf(fp, "#define __builtin_va_arg(v,l)	(l)0\n");
	fprintf(fp, "#define __builtin_va_end(v)\n");

	if (no_va)
	{	fprintf(fp, "#undef va_start\n");
		fprintf(fp, "#define va_start(v,l)\n");
		fprintf(fp, "#undef va_arg\n");
		fprintf(fp, "#define va_arg(v,l)\t(l)0\n");
		fprintf(fp, "#undef va_end\n");
		fprintf(fp, "#define va_end(v)\n");
	}
	fprintf(fp, "#define UNO\n");
	fprintf(fp, "#define __builtin_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)\n");

	if ((x = fopen(master_dfn, "r")) != NULL)
	{	fprintf(fp, "/* from %s */\n", master_dfn);
		while (fgets(buf, sizeof(buf), x))
		{
			if (nopre
			&&  strncmp(buf, "UnoType", strlen("UnoType")) == 0)
				fprintf(fp, "typedef int %s", &buf[strlen("UnoType")+1]);
			else
				fprintf(fp, "%s", buf);
		}
		fclose(x);
		fprintf(fp, "/* end */\n");
	}

	if (!f) return;
#if 1
	fprintf(fp, "#include \"%s\"\n", cur_file);
#else
	/* fails to find the file, at least in cygwin */
	fprintf(fp, "#include \"%s/%s\"\n", cur_dir, cur_file);
#endif

	if (never) add_never(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %r12
movq %rdi, %rbx
cmpb $0x0, 0x336c4(%rip)     # 0x37200
jne 0x3b53
leaq 0x19d82(%rip), %rdi     # 0x1d8c7
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d8a(%rip), %rdi     # 0x1d8e4
pushq $0x1f
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d91(%rip), %rdi     # 0x1d904
pushq $0x13
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d90(%rip), %rdi     # 0x1d918
pushq $0x20
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d9c(%rip), %rdi     # 0x1d939
pushq $0x23
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19dab(%rip), %rdi     # 0x1d95d
pushq $0x1c
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
cmpb $0x0, 0x3363d(%rip)     # 0x37204
jne 0x3c53
leaq 0x19da6(%rip), %rdi     # 0x1d97a
pushq $0x10
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d9e(%rip), %rdi     # 0x1d98b
pushq $0x16
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19da0(%rip), %rdi     # 0x1d9a2
pushq $0xe
popq %r14
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d96(%rip), %rdi     # 0x1d9b1
pushq $0x19
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d9b(%rip), %rdi     # 0x1d9cb
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d95(%rip), %rdi     # 0x1d9da
pushq $0x12
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d93(%rip), %rdi     # 0x1d9ed
pushq $0xc
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
leaq 0x19d87(%rip), %rdi     # 0x1d9fa
pushq $0x49
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3280
movq 0x33500(%rip), %rdi     # 0x37188
leaq 0x29cac(%rip), %rsi     # 0x2d93b
callq 0x3230
testq %rax, %rax
je 0x3d47
movq %rax, %r15
movq %r12, 0x8(%rsp)
movq 0x334dc(%rip), %rdx     # 0x37188
leaq 0x19d91(%rip), %rsi     # 0x1da44
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31a0
leaq 0x10(%rsp), %r13
leaq 0x19d8a(%rip), %rbp     # 0x1da53
pushq $0x7
popq %r14
leaq 0x19d87(%rip), %r12     # 0x1da5b
movq %r13, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x3170
testq %rax, %rax
je 0x3d25
cmpb $0x1, 0x33510(%rip)     # 0x37200
jne 0x3d04
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x3210
testl %eax, %eax
je 0x3d11
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3140
jmp 0x3cd4
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x31a0
jmp 0x3cd4
movq %r15, %rdi
callq 0x30c0
leaq 0x19d36(%rip), %rdi     # 0x1da6a
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3280
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x3d76
movq 0x334b5(%rip), %rdx     # 0x37208
leaq 0x19d1b(%rip), %rsi     # 0x1da75
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31a0
cmpq $0x0, 0x3348c(%rip)     # 0x371f8
je 0x3d76
movq %rbx, %rdi
callq 0x36bc
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq