// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x5, %eax
jne 0x4f526
leaq 0x10(%rsp), %r13
movq (%r14), %rsi
movq (%rsi), %rax
movq %r13, %rdi
callq *0x48(%rax)
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x8(%r14), %rdi
movups %xmm0, (%r14)
testq %rdi, %rdi
je 0x4f514
callq 0xdce4
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4f514
callq 0xdce4
movq (%r12), %r12
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x5, %eax
je 0x4f4da
movq (%r14), %r13
leaq 0x98(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rbp
movq %rbp, %rdi
callq 0xde0c
movq (%r13), %rax
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq *0x50(%rax)
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4f573
callq 0xa2b0
cmpq $0x0, 0x40(%rsp)
je 0x4f5a9
movq 0x38(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%r12,%rax)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x4f597
callq 0xdce4
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x38, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0x2b795(%rip), %rsi     # 0x7ad52
leaq 0x68(%rsp), %rdi
movq %r15, %rdx
callq 0xdc11
leaq 0x2b7a1(%rip), %rsi     # 0x7ad72
leaq 0x68(%rsp), %rdi
callq 0xa560
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4f5fc
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x4f609
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq (%rsi), %rax
leaq 0xa8(%rsp), %rdi
callq *0x8(%rax)
leaq 0xc8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x159ca
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0xc8(%rsp), %rsi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x47fc0(%rip), %rsi     # 0x97638
leaq -0x3ab59(%rip), %rdx    # 0x14b26
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4f699
callq 0xdce4
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f6b7
callq 0xa2b0
jmp 0x4f6b7
movq %rax, %r14
movb $0x1, %bpl
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f6d5
callq 0xa2b0
jmp 0x4f6d5
movq %rax, %r14
movb $0x1, %bpl
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f6e4
callq 0xa2b0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f6f7
callq 0xa2b0
testb %bpl, %bpl
jne 0x4f719
jmp 0x4f721
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f719
callq 0xa2b0
jmp 0x4f719
movq %rax, %r14
movq %rbx, %rdi
callq 0xa240
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x4f747
callq 0xdce4
jmp 0x4f747
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4f747
callq 0xa2b0
movq %r14, %rdi
callq 0xa510