// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jsfunction.c
// Function: Fp_toString
static void Fp_toString(js_State *J)
{
	js_Object *self = js_toobject(J, 0);
	js_Buffer *sb = NULL;
	int i;

	if (!js_iscallable(J, 0))
		js_typeerror(J, "not a function");

	if (self->type == JS_CFUNCTION || self->type == JS_CSCRIPT) {
		js_Function *F = self->u.f.function;

		if (js_try(J)) {
			js_free(J, sb);
			js_throw(J);
		}

		js_puts(J, &sb, "function ");
		js_puts(J, &sb, F->name);
		js_putc(J, &sb, '(');
		for (i = 0; i < F->numparams; ++i) {
			if (i > 0) js_putc(J, &sb, ',');
			js_puts(J, &sb, F->vartab[i]);
		}
		js_puts(J, &sb, ") { [byte code] }");
		js_putc(J, &sb, 0);

		js_pushstring(J, sb->s);
		js_endtry(J);
		js_free(J, sb);
	} else if (self->type == JS_CCFUNCTION) {
		if (js_try(J)) {
			js_free(J, sb);
			js_throw(J);
		}

		js_puts(J, &sb, "function ");
		js_puts(J, &sb, self->u.c.name);
		js_puts(J, &sb, "() { [native code] }");
		js_putc(J, &sb, 0);

		js_pushstring(J, sb->s);
		js_endtry(J);
		js_free(J, sb);
	} else {
		js_pushliteral(J, "function () { }");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x11760
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x15290
cmpl $0x0, %eax
jne 0xc485
movq -0x8(%rbp), %rdi
leaq 0x304b4(%rip), %rsi     # 0x3c932
movb $0x0, %al
callq 0xbfe0
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0xc49b
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xc5af
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x14270
movq %rax, %rdi
callq 0x30e0
cmpl $0x0, %eax
je 0xc4d3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd710
movq -0x8(%rbp), %rdi
callq 0x8cb0
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq 0x304d9(%rip), %rdx     # 0x3c9bb
callq 0xda70
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq -0x18(%rbp), %rsi
callq 0xda70
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x28, %edx
callq 0xd910
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0xc560
cmpl $0x0, -0x1c(%rbp)
jle 0xc538
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x2c, %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq -0x18(%rbp), %rsi
callq 0xda70
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc514
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq 0x30456(%rip), %rdx     # 0x3c9c5
callq 0xda70
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x13880
movq -0x8(%rbp), %rdi
callq 0x14a10
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd710
jmp 0xc66f
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
jne 0xc65d
movq -0x8(%rbp), %rdi
callq 0x14270
movq %rax, %rdi
callq 0x30e0
cmpl $0x0, %eax
je 0xc5e8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd710
movq -0x8(%rbp), %rdi
callq 0x8cb0
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq 0x303c4(%rip), %rdx     # 0x3c9bb
callq 0xda70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x18(%rbp), %rsi
callq 0xda70
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq 0x303b7(%rip), %rdx     # 0x3c9d7
callq 0xda70
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x13880
movq -0x8(%rbp), %rdi
callq 0x14a10
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd710
jmp 0xc66d
movq -0x8(%rbp), %rdi
leaq 0x30384(%rip), %rsi     # 0x3c9ec
callq 0x66d0
jmp 0xc66f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)