// File: /workspace/github_cpp_makefile_star2_O1/menhits[P]phplus/src/PhplusStdLib.cpp
// Function: int getValFromTuple<int>(void*, std::shared_ptr<TypeBase>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
inline T getValFromTuple(void* data, Type type, string name)
{
	while (type->getType()==TypeBase::PTR)
	{
		type=type->getSubType();
		data=*(void**)data;
	}
	
	OffsetAndType a=type->getSubType(name);
	
	if (!a.type)
		throw PhplusError("tried to get invalid property '"+name+"' from type "+type->getString(), INTERNAL_ERROR);
		
	return *((T*)((char*)data+a.offset));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x5, %eax
jne 0x4f9e6
movq %rsp, %r12
movq (%r14), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *0x48(%rax)
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x8(%r14), %rdi
movups %xmm0, (%r14)
testq %rdi, %rdi
je 0x4f9c6
callq 0xdcba
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4f9d5
callq 0xdcba
movq (%rbx), %rbx
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x5, %eax
je 0x4f99d
movq (%r14), %r12
leaq 0x68(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r13
movq %r13, %rdi
callq 0xdde2
movq (%r12), %rax
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x50(%rax)
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4fa2a
callq 0xa2b0
cmpq $0x0, 0x30(%rsp)
je 0x4fa5d
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rdi
movl (%rbx,%rax), %ebx
testq %rdi, %rdi
je 0x4fa49
callq 0xdcba
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x38, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0x2a35c(%rip), %rsi     # 0x79dcd
leaq 0x98(%rsp), %rdi
movq %r15, %rdx
callq 0xdbef
leaq 0x2a32a(%rip), %rsi     # 0x79db2
leaq 0x98(%rsp), %rdi
callq 0xa560
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4fab6
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x4fac2
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq (%rsi), %rax
leaq 0x78(%rsp), %rdi
callq *0x8(%rax)
leaq 0xb8(%rsp), %rdi
movq %rsp, %rsi
leaq 0x78(%rsp), %rdx
callq 0x1572b
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0xb8(%rsp), %rsi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x200e4
xorl %ebp, %ebp
leaq 0x46b0f(%rip), %rsi     # 0x96638
leaq -0x3b238(%rip), %rdx    # 0x148f8
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x4fb4a
callq 0xdcba
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4fb68
callq 0xa2b0
jmp 0x4fb68
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4fb86
callq 0xa2b0
jmp 0x4fb86
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4fb9c
callq 0xa2b0
jmp 0x4fb9c
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4fbba
callq 0xa2b0
jmp 0x4fbba
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4fbc7
movq %rbx, %rdi
callq 0xa240
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4fbea
callq 0xdcba
jmp 0x4fbea
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4fbea
callq 0xa2b0
movq %r14, %rdi
callq 0xa510