// File: pranavmodx[P]modlang/src/../header/builtins.hpp
// Function: Push(std::vector<Object*, std::allocator<Object*>>&)
Object *Push(std::vector<Object *> &objs)
{
	if (objs.size() != 2)
		return new Error("error: argument length (" + std::to_string(objs.size()) + ") not equal to parameter length (2)\n");

	Object *obj = objs[0];
	const ObjectType type = obj->type();

	if (type == ERROR_OBJ)
		return obj;

	if (objs[1]->type() == ERROR_OBJ)
		return objs[1];

	else if (type == STRING_OBJ)
	{
		if (objs[1]->type() != STRING_OBJ)
			return new Error("error: expected " + STRING_OBJ + " got " + objs[1]->type());

		((String *)obj)->value += ((String *)objs[1])->value;
		return __NULL;
	}

	else if (type == ARRAY_OBJ)
	{
		((Array *)obj)->elements.push_back(objs[1]);
		return __NULL;
	}

	else if (type == STACK_OBJ)
	{
		((Stack *)obj)->elements.push(objs[1]);
		return __NULL;
	}

	else if (type == QUEUE_OBJ)
	{
		((Queue *)obj)->elements.push(objs[1]);
		return __NULL;
	}

	else if (type == MAXHEAP_OBJ)
	{
		if (objs[1]->type() != ((MaxHeap *)obj)->tokenType)
			return new Error("error: expected " + ((MaxHeap *)obj)->tokenType + " got " + objs[1]->type());

		((MaxHeap *)obj)->elements.push(objs[1]);
		return __NULL;
	}

	else if (type == MINHEAP_OBJ)
	{
		((MinHeap *)obj)->elements.push(objs[1]);
		return __NULL;
	}

	return new Error("error: unsupported object for push()");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x373f0
cmpq $0x2, %rax
je 0x2d9ea
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x250(%rbp)
movb $0x1, -0x7d(%rbp)
movq -0x10(%rbp), %rdi
callq 0x373f0
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0x37410
jmp 0x2d90e
leaq 0x18004(%rip), %rsi     # 0x45919
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x1bde0
jmp 0x2d924
leaq 0x1804f(%rip), %rdx     # 0x4597a
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1bb10
jmp 0x2d93a
movq -0x250(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2b980
jmp 0x2d94c
movq -0x250(%rbp), %rax
movb $0x0, -0x7d(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5518
leaq -0x50(%rbp), %rdi
callq 0x5518
leaq -0x70(%rbp), %rdi
callq 0x5518
jmp 0x2e20b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2d9cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2d9c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2d9ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5518
leaq -0x50(%rbp), %rdi
callq 0x5518
leaq -0x70(%rbp), %rdi
callq 0x5518
testb $0x1, -0x7d(%rbp)
jne 0x2d9d4
jmp 0x2d9e5
movq -0x250(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x2e218
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x374f0
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rsi
movq (%rsi), %rax
leaq -0xa8(%rbp), %rdi
callq *(%rax)
leaq -0xa8(%rbp), %rdi
leaq 0x399de(%rip), %rsi     # 0x67400
callq 0x16920
testb $0x1, %al
jne 0x2da2d
jmp 0x2da47
movq -0x88(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0xd0(%rbp), %rdi
callq *%rax
jmp 0x2da69
leaq -0xd0(%rbp), %rdi
leaq 0x39989(%rip), %rsi     # 0x67400
callq 0x16920
movb %al, -0x251(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5518
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x2da9a
jmp 0x2dacf
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e1fd
leaq -0xa8(%rbp), %rdi
leaq 0x39783(%rip), %rsi     # 0x67260
callq 0x16920
testb $0x1, %al
jne 0x2daeb
jmp 0x2dd10
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0xf0(%rbp), %rdi
callq *%rax
jmp 0x2db0d
leaq -0xf0(%rbp), %rdi
leaq 0x39745(%rip), %rsi     # 0x67260
callq 0x22d80
movb %al, -0x252(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x5518
movb -0x252(%rbp), %al
testb $0x1, %al
jne 0x2db41
jmp 0x2dccc
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x260(%rbp)
jmp 0x2db54
movb $0x1, -0x171(%rbp)
leaq 0x17e3d(%rip), %rsi     # 0x4599f
leaq 0x396f7(%rip), %rdx     # 0x67260
leaq -0x150(%rbp), %rdi
callq 0x1bc80
jmp 0x2db77
leaq 0x17bc0(%rip), %rdx     # 0x4573e
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x1bb10
jmp 0x2db93
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x170(%rbp), %rdi
callq *%rax
jmp 0x2dbb5
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x1bb80
jmp 0x2dbd1
movq -0x260(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2b980
jmp 0x2dbe6
movq -0x260(%rbp), %rax
movb $0x0, -0x171(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5518
leaq -0x170(%rbp), %rdi
callq 0x5518
leaq -0x130(%rbp), %rdi
callq 0x5518
leaq -0x150(%rbp), %rdi
callq 0x5518
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2dcab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2dc9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2dc93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2dc87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5518
leaq -0x170(%rbp), %rdi
callq 0x5518
leaq -0x130(%rbp), %rdi
callq 0x5518
leaq -0x150(%rbp), %rdi
callq 0x5518
testb $0x1, -0x171(%rbp)
jne 0x2dcb6
jmp 0x2dcc7
movq -0x260(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x2e1fd
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
addq $0x8, %rsi
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x5370
jmp 0x2dcf3
leaq 0x388c6(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
leaq -0xa8(%rbp), %rdi
leaq 0x39582(%rip), %rsi     # 0x672a0
callq 0x16920
testb $0x1, %al
jne 0x2dd29
jmp 0x2dd77
movq -0x88(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x268(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq -0x268(%rbp), %rdi
movq %rax, %rsi
callq 0x37650
jmp 0x2dd5a
leaq 0x3885f(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
leaq -0xa8(%rbp), %rdi
leaq 0x3957b(%rip), %rsi     # 0x67300
callq 0x16920
testb $0x1, %al
jne 0x2dd90
jmp 0x2ddde
movq -0x88(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x270(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq -0x270(%rbp), %rdi
movq %rax, %rsi
callq 0x376c0
jmp 0x2ddc1
leaq 0x387f8(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
leaq -0xa8(%rbp), %rdi
leaq 0x39534(%rip), %rsi     # 0x67320
callq 0x16920
testb $0x1, %al
jne 0x2ddf7
jmp 0x2de45
movq -0x88(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x278(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq -0x278(%rbp), %rdi
movq %rax, %rsi
callq 0x376f0
jmp 0x2de28
leaq 0x38791(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
leaq -0xa8(%rbp), %rdi
leaq 0x3950d(%rip), %rsi     # 0x67360
callq 0x16920
testb $0x1, %al
jne 0x2de61
jmp 0x2e098
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x198(%rbp), %rdi
callq *%rax
jmp 0x2de83
movq -0x88(%rbp), %rsi
addq $0x8, %rsi
leaq -0x198(%rbp), %rdi
callq 0x22d80
movb %al, -0x279(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x5518
movb -0x279(%rbp), %al
testb $0x1, %al
jne 0x2debb
jmp 0x2e04a
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x288(%rbp)
jmp 0x2dece
movb $0x1, -0x219(%rbp)
movq -0x88(%rbp), %rdx
addq $0x8, %rdx
leaq 0x17ab8(%rip), %rsi     # 0x4599f
leaq -0x1f8(%rbp), %rdi
callq 0x1bc80
jmp 0x2def5
leaq 0x17842(%rip), %rdx     # 0x4573e
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x1bb10
jmp 0x2df11
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq (%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x218(%rbp), %rdi
callq *%rax
jmp 0x2df33
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
leaq -0x218(%rbp), %rdx
callq 0x1bb80
jmp 0x2df4f
movq -0x288(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x2b980
jmp 0x2df64
movq -0x288(%rbp), %rax
movb $0x0, -0x219(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x5518
leaq -0x218(%rbp), %rdi
callq 0x5518
leaq -0x1d8(%rbp), %rdi
callq 0x5518
leaq -0x1f8(%rbp), %rdi
callq 0x5518
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e029
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e01d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e011
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e005
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x5518
leaq -0x218(%rbp), %rdi
callq 0x5518
leaq -0x1d8(%rbp), %rdi
callq 0x5518
leaq -0x1f8(%rbp), %rdi
callq 0x5518
testb $0x1, -0x219(%rbp)
jne 0x2e034
jmp 0x2e045
movq -0x288(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x2e1fd
movq -0x88(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x290(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq -0x290(%rbp), %rdi
movq %rax, %rsi
callq 0x37720
jmp 0x2e07b
leaq 0x3853e(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
leaq -0xa8(%rbp), %rdi
leaq 0x392da(%rip), %rsi     # 0x67380
callq 0x16920
testb $0x1, %al
jne 0x2e0b1
jmp 0x2e0ff
movq -0x88(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x298(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x374f0
movq -0x298(%rbp), %rdi
movq %rax, %rsi
callq 0x37770
jmp 0x2e0e2
leaq 0x384d7(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
jmp 0x2e101
jmp 0x2e103
jmp 0x2e105
jmp 0x2e107
jmp 0x2e109
jmp 0x2e10b
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x2a0(%rbp)
jmp 0x2e11e
movb $0x1, -0x242(%rbp)
leaq -0x241(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x54a0
movq -0x2a8(%rbp), %rdx
leaq 0x1786a(%rip), %rsi     # 0x459b0
leaq -0x240(%rbp), %rdi
callq 0x134c0
jmp 0x2e154
movq -0x2a0(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x2b980
jmp 0x2e169
movq -0x2a0(%rbp), %rax
movb $0x0, -0x242(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x5518
leaq -0x241(%rbp), %rdi
callq 0x52f0
movl $0x1, -0xac(%rbp)
jmp 0x2e1ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2e1c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x5518
leaq -0x241(%rbp), %rdi
callq 0x52f0
testb $0x1, -0x242(%rbp)
jne 0x2e1dc
jmp 0x2e1ed
movq -0x2a0(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x2e1fd
leaq -0xa8(%rbp), %rdi
callq 0x5518
jmp 0x2e20b
leaq -0xa8(%rbp), %rdi
callq 0x5518
jmp 0x2e218
movq -0x8(%rbp), %rax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x5490
nopw %cs:(%rax,%rax)