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

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movl %ecx, 0x12c(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x5, %eax
jne 0x96907
movq 0x28(%rsp), %rdi
callq 0x1a660
movq %rax, %rsi
movq (%rsi), %rax
leaq 0x118(%rsp), %rdi
callq *0x48(%rax)
movq 0x28(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x1bae0
leaq 0x118(%rsp), %rdi
callq 0x1a950
movq 0x140(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x140(%rsp)
jmp 0x968a0
movq 0x28(%rsp), %rdi
callq 0x1a660
movq 0x30(%rsp), %rsi
movq %rax, 0x18(%rsp)
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb1a0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq (%rsi), %rax
movq 0x50(%rax), %rax
leaq 0x100(%rsp), %rdi
callq *%rax
jmp 0x9694a
leaq 0xe0(%rsp), %rdi
callq 0xb6e8
leaq 0x100(%rsp), %rdi
addq $0x8, %rdi
callq 0x1d820
testb $0x1, %al
jne 0x96b32
movb $0x1, 0x3f(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x30(%rsp), %rdx
movq %rax, 0x10(%rsp)
leaq 0x3ecef(%rip), %rsi     # 0xd567f
leaq 0x70(%rsp), %rdi
callq 0xfab0
jmp 0x9699c
leaq 0x3ecfc(%rip), %rdx     # 0xd569f
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfa60
jmp 0x969b7
movq 0x28(%rsp), %rdi
callq 0x1a660
movq %rax, %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq 0x50(%rsp), %rdi
callq *%rax
jmp 0x969d4
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x1bf20
jmp 0x969f0
xorl %eax, %eax
movl %eax, %esi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xfbe0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
leaq 0xb0(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0x96a21
movq 0x10(%rsp), %rdi
movb $0x0, 0x3f(%rsp)
leaq 0x7eb96(%rip), %rsi     # 0x1155c8
leaq -0x7c3c9(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0x96b6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0xb6e8
jmp 0x96b61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0x96b10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0x96b06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0x96af9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0x96aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xfc00
leaq 0xb0(%rsp), %rdi
callq 0xb6e8
leaq 0x50(%rsp), %rdi
callq 0xb6e8
leaq 0x90(%rsp), %rdi
callq 0xb6e8
leaq 0x70(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x3f(%rsp)
jne 0x96b19
jmp 0x96b23
movq 0x10(%rsp), %rdi
callq 0xb2d0
leaq 0x100(%rsp), %rdi
callq 0x3eec0
jmp 0x96b61
movl 0x12c(%rsp), %edx
movq 0x140(%rsp), %rax
movq 0x100(%rsp), %rcx
movl %edx, (%rax,%rcx)
leaq 0x100(%rsp), %rdi
callq 0x3eec0
addq $0x148, %rsp            # imm = 0x148
retq
movq 0xd8(%rsp), %rdi
callq 0xb680
nop