// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/parse/use.c
// Function: writeuse
void
writeuse(FILE *f)
{
	Stab *st;
	void **k;
	Trait *tr;
	Node *s, *u;
	size_t i, n;

	st = file.globls;

	/* usefile name */
	wrbyte(f, 'U');
	wrint(f, Abiversion); /* use version */
	if (st->name)
		wrstr(f, st->name);
	else
		wrstr(f, NULL);

	/* library deps */
	for (i = 0; i < file.nuses; i++) {
		u = file.uses[i];
		if (!u->use.islocal) {
			wrbyte(f, 'L');
			wrstr(f, u->use.name);
		}
	}
	for (i = 0; i < file.nlibdeps; i++) {
		wrbyte(f, 'L');
		wrstr(f, file.libdeps[i]);
	}
	for (i = 0; i < file.nextlibs; i++) {
		wrbyte(f, 'X');
		wrstr(f, file.extlibs[i]);
	}

	/* source file name */
	wrbyte(f, 'F');
	wrstr(f, file.files[0]);

	for (i = 0; i < ntypes; i++) {
		if (types[i]->vis == Visexport || types[i]->vis == Vishidden) {
			wrbyte(f, 'T');
			wrint(f, types[i]->tid);
			typickle(f, types[i]);
		}
	}

	for (i = 0; i < ntraittab; i++) {
		tr = traittab[i];
		if (tr->uid < Ntraits)
			continue;
		if (tr->vis == Visexport || tr->vis == Vishidden) {
			wrbyte(f, 'R');
			traitpickle(f, tr);
		}
	}

	for (i = 0; i < nimpltab; i++) {
		/* merging during inference should remove all protos */
		s = impltab[i];
		assert(!s->impl.isproto);
		if (s->impl.vis == Visexport || s->impl.vis == Vishidden) {
			wrbyte(f, 'I');
			pickle(f, s);
		}
	}

	k = htkeys(st->dcl, &n);
	for (i = 0; i < n; i++) {
		s = getdcl(st, k[i]);
		assert(s != NULL);
		if (s->decl.vis == Visintern || s->decl.vis == Visbuiltin)
			continue;
		/* trait functions get written out with their traits */
		if (s->decl.trait || s->decl.isinit || s->decl.isfini)
			continue;
		else if (s->decl.isgeneric)
			wrbyte(f, 'G');
		else
			wrbyte(f, 'D');
		wrsym(f, s);
	}
	for (i = 0; i < file.ninit; i++) {
		wrbyte(f, 'S');
		pickle(f, file.init[i]);
	}
	if (file.localinit) {
		wrbyte(f, 'S');
		pickle(f, file.localinit->decl.name);
	}
	for (i = 0; i < file.nfini; i++) {
		wrbyte(f, 'E');
		pickle(f, file.fini[i]);
	}
	if (file.localfini) {
		wrbyte(f, 'E');
		pickle(f, file.localfini->decl.name);
	}
	free(k);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x3e835(%rip), %rax     # 0x7cd98
movq 0x90(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x55, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movl $0x17, %esi
callq 0x49fb0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3e5a8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x4a020
jmp 0x3e5b5
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4a020
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3e7d0(%rip), %rcx     # 0x7cd98
cmpq 0x18(%rcx), %rax
jae 0x3e61e
leaq 0x3e7c3(%rip), %rax     # 0x7cd98
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x3e60e
movq -0x8(%rbp), %rdi
movl $0x4c, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x4a020
jmp 0x3e610
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e5bd
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3e767(%rip), %rcx     # 0x7cd98
cmpq 0x28(%rcx), %rax
jae 0x3e66f
movq -0x8(%rbp), %rdi
movl $0x4c, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e748(%rip), %rax     # 0x7cd98
movq 0x20(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4a020
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e626
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3e716(%rip), %rcx     # 0x7cd98
cmpq 0x38(%rcx), %rax
jae 0x3e6c0
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e6f7(%rip), %rax     # 0x7cd98
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4a020
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e677
movq -0x8(%rbp), %rdi
movl $0x46, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e6bf(%rip), %rax     # 0x7cd98
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0x4a020
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3f608(%rip), %rcx     # 0x7dd00
cmpq (%rcx), %rax
jae 0x3e78d
leaq 0x3f5e8(%rip), %rax     # 0x7dcf0
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1, 0x10(%rax)
je 0x3e731
leaq 0x3f5d0(%rip), %rax     # 0x7dcf0
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x2, 0x10(%rax)
jne 0x3e77a
movq -0x8(%rbp), %rdi
movl $0x54, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3f5a6(%rip), %rax     # 0x7dcf0
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
callq 0x49fb0
movq -0x8(%rbp), %rdi
leaq 0x3f586(%rip), %rax     # 0x7dcf0
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3eac0
jmp 0x3e77c
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e6ed
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3f568(%rip), %rcx     # 0x7dd08
cmpq (%rcx), %rax
jae 0x3e805
leaq 0x3f564(%rip), %rax     # 0x7dd10
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x8, (%rax)
jge 0x3e7c6
jmp 0x3e7f7
movq -0x20(%rbp), %rax
cmpl $0x1, 0xc(%rax)
je 0x3e7da
movq -0x20(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x3e7f5
movq -0x8(%rbp), %rdi
movl $0x52, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3efb0
jmp 0x3e7f7
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e795
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3f510(%rip), %rcx     # 0x7dd28
cmpq (%rcx), %rax
jae 0x3e8a4
leaq 0x3f4f8(%rip), %rax     # 0x7dd20
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, 0x5c(%rax)
jne 0x3e843
jmp 0x3e862
leaq 0x15ce4(%rip), %rdi     # 0x5452e
leaq 0x15cee(%rip), %rsi     # 0x5453f
movl $0x4ee, %edx            # imm = 0x4EE
leaq 0x15ce8(%rip), %rcx     # 0x54545
callq 0x6160
movq -0x28(%rbp), %rax
cmpl $0x1, 0x58(%rax)
je 0x3e876
movq -0x28(%rbp), %rax
cmpl $0x2, 0x58(%rax)
jne 0x3e891
movq -0x8(%rbp), %rdi
movl $0x49, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3f0b0
jmp 0x3e893
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e80d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x49720
movq %rax, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x3e99b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x334b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3e8f1
jmp 0x3e910
leaq 0x15c63(%rip), %rdi     # 0x5455b
leaq 0x15c40(%rip), %rsi     # 0x5453f
movl $0x4f8, %edx            # imm = 0x4F8
leaq 0x15c3a(%rip), %rcx     # 0x54545
callq 0x6160
movq -0x28(%rbp), %rax
movsbl 0x70(%rax), %eax
cmpl $0x0, %eax
je 0x3e92a
movq -0x28(%rbp), %rax
movsbl 0x70(%rax), %eax
cmpl $0x3, %eax
jne 0x3e92c
jmp 0x3e98a
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x3e951
movq -0x28(%rbp), %rax
movsbl 0x7a(%rax), %eax
cmpl $0x0, %eax
jne 0x3e951
movq -0x28(%rbp), %rax
movsbl 0x7b(%rax), %eax
cmpl $0x0, %eax
je 0x3e953
jmp 0x3e98a
movq -0x28(%rbp), %rax
cmpb $0x0, 0x73(%rax)
je 0x3e96d
movq -0x8(%rbp), %rdi
movl $0x47, %esi
callq 0x49f30
jmp 0x3e97b
movq -0x8(%rbp), %rdi
movl $0x44, %esi
callq 0x49f30
jmp 0x3e97d
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3f700
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e8c1
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3e3ea(%rip), %rcx     # 0x7cd98
cmpq 0x58(%rcx), %rax
jae 0x3e9ec
movq -0x8(%rbp), %rdi
movl $0x53, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e3cb(%rip), %rax     # 0x7cd98
movq 0x50(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3f0b0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3e9a3
leaq 0x3e3a5(%rip), %rax     # 0x7cd98
cmpq $0x0, 0x80(%rax)
je 0x3ea26
movq -0x8(%rbp), %rdi
movl $0x53, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e382(%rip), %rax     # 0x7cd98
movq 0x80(%rax), %rax
movq 0x20(%rax), %rsi
callq 0x3f0b0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq 0x3e35f(%rip), %rcx     # 0x7cd98
cmpq 0x68(%rcx), %rax
jae 0x3ea77
movq -0x8(%rbp), %rdi
movl $0x45, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e340(%rip), %rax     # 0x7cd98
movq 0x60(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3f0b0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3ea2e
leaq 0x3e31a(%rip), %rax     # 0x7cd98
cmpq $0x0, 0x88(%rax)
je 0x3eab1
movq -0x8(%rbp), %rdi
movl $0x45, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
leaq 0x3e2f7(%rip), %rax     # 0x7cd98
movq 0x88(%rax), %rax
movq 0x20(%rax), %rsi
callq 0x3f0b0
movq -0x18(%rbp), %rdi
callq 0x6040
addq $0x40, %rsp
popq %rbp
retq