// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %rbx
cmpb $0x0, 0x3332e(%rip)     # 0x381f0
jne 0x4edd
leaq 0x1a9fc(%rip), %rdi     # 0x1f8c7
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa00(%rip), %rdi     # 0x1f8e4
movl $0x1f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa07(%rip), %rdi     # 0x1f904
movl $0x13, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa02(%rip), %rdi     # 0x1f918
movl $0x20, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa0a(%rip), %rdi     # 0x1f939
movl $0x23, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa15(%rip), %rdi     # 0x1f95d
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
cmpb $0x0, 0x33293(%rip)     # 0x381f4
jne 0x4ffd
leaq 0x1aa0c(%rip), %rdi     # 0x1f97a
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa04(%rip), %rdi     # 0x1f98b
movl $0x16, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1aa02(%rip), %rdi     # 0x1f9a2
movl $0xe, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1a9f8(%rip), %rdi     # 0x1f9b1
movl $0x19, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1a9f9(%rip), %rdi     # 0x1f9cb
movl $0xe, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1a9ef(%rip), %rdi     # 0x1f9da
movl $0x12, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1a9e9(%rip), %rdi     # 0x1f9ed
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
leaq 0x1a9dd(%rip), %rdi     # 0x1f9fa
movl $0x49, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
movq 0x33142(%rip), %rdi     # 0x38178
leaq 0x2a912(%rip), %rsi     # 0x2f94f
callq 0x3210
testq %rax, %rax
je 0x5111
movq %rax, %r15
movq %r14, 0x8(%rsp)
movq 0x3311e(%rip), %rdx     # 0x38178
leaq 0x1a9e3(%rip), %rsi     # 0x1fa44
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3190
leaq 0x10(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x3170
testq %rax, %rax
je 0x50eb
movl $0x546f6e55, %r14d      # imm = 0x546F6E55
movl $0x65707954, %r12d      # imm = 0x65707954
leaq 0x1a9c6(%rip), %r13     # 0x1fa5b
leaq 0x10(%rsp), %rbp
cmpb $0x1, 0x3314f(%rip)     # 0x381f0
jne 0x50b5
movl 0x10(%rsp), %eax
xorl %r14d, %eax
movl 0x13(%rsp), %ecx
xorl %r12d, %ecx
orl %eax, %ecx
je 0x50d7
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x3140
movq %rbp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x3170
testq %rax, %rax
jne 0x509a
jmp 0x50eb
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x3190
jmp 0x50c0
movq %r15, %rdi
callq 0x30c0
leaq 0x1a970(%rip), %rdi     # 0x1fa6a
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3260
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x5140
movq 0x330db(%rip), %rdx     # 0x381f8
leaq 0x1a951(%rip), %rsi     # 0x1fa75
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3190
cmpq $0x0, 0x330b2(%rip)     # 0x381e8
je 0x5140
movq %rbx, %rdi
callq 0x4a17
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq