// File: Eronana[P]strawberry/src/buildin.cpp
// Function: build_innew_(int, VirtualMachine&)
BUILD_FUNC_SIGN(new)
{
    // puts("--------[ BUILD_FUNC_SIGN(new) ]--------");
    // for(int i=0;i<ARGC;i++)puts(GET_ARGV(i).toString().c_str());
    auto &f=GET_ARGV(0);
    V_VALUE o;
    o.type=T_OBJECT;
    o.v_object=newObject();
    o[string("__proto__")].type=T_OBJECT;
    o[string("__proto__")].v_object=f.v_function.prototype;
    o[string("constructor")]=f;
    vm.push(f); // function
    vm.push(f); // callee
    vm.push(o); // this
    for(int i=0;i<ARGC-1;i++)vm.push(GET_ARGV(ARGC+2));
    vm.callReturn(ARGC);
    vm.reg_ret=o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
xorl %esi, %esi
callq 0xf6f0
movq %rax, -0x18(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x154b0
movl $0x6, -0x38(%rbp)
callq 0x216b0
movq %rax, -0x30(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x75f0
movq -0xe8(%rbp), %rdx
leaq 0x4324f(%rip), %rsi     # 0x5816b
leaq -0x58(%rbp), %rdi
callq 0xf990
jmp 0x14f27
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x163d0
movq %rax, -0xf0(%rbp)
jmp 0x14f3d
movq -0xf0(%rbp), %rax
movl $0x6, (%rax)
leaq -0x58(%rbp), %rdi
callq 0x71d0
leaq -0x59(%rbp), %rdi
callq 0x7310
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x100(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x75f0
movq -0xf8(%rbp), %rdx
leaq 0x431df(%rip), %rsi     # 0x5816b
leaq -0x90(%rbp), %rdi
callq 0xf990
jmp 0x14f9a
leaq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x163d0
movq %rax, -0x108(%rbp)
jmp 0x14fb3
movq -0x108(%rbp), %rax
movq -0x100(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x90(%rbp), %rdi
callq 0x71d0
leaq -0x91(%rbp), %rdi
callq 0x7310
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x75f0
movq -0x110(%rbp), %rdx
leaq 0x432ad(%rip), %rsi     # 0x582b6
leaq -0xb8(%rbp), %rdi
callq 0xf990
jmp 0x15017
leaq -0x38(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x163d0
movq %rax, -0x120(%rbp)
jmp 0x15030
movq -0x120(%rbp), %rax
movq -0x118(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
leaq -0xb8(%rbp), %rdi
callq 0x71d0
leaq -0xb9(%rbp), %rdi
callq 0x7310
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf230
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf230
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x15199
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x4(%rbp), %esi
subl $0x2, %esi
addl $0x2, %esi
callq 0xf6f0
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0xf230
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x150a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x15120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x71d0
leaq -0x59(%rbp), %rdi
callq 0x7310
jmp 0x151e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x15154
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x71d0
leaq -0x91(%rbp), %rdi
callq 0x7310
jmp 0x151e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1518b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x71d0
leaq -0xb9(%rbp), %rdi
callq 0x7310
jmp 0x151e8
movq -0x10(%rbp), %rsi
movl -0x4(%rbp), %edx
subl $0x2, %edx
leaq -0xe0(%rbp), %rdi
callq 0xf380
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x488(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x490(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x498(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x4a0(%rax)
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x75e0
nopw %cs:(%rax,%rax)