// File: /workspace/github_c_makefile_star2_O0/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_add_to_lru
int
shmqueue_add_to_lru(struct shmqueue *shmq_header, struct shmqueue_item *item, uint32_t hashidx)
{
	struct shmqueue_header *header;

	header = shmq_header->header;
	item->shi_hashidx = hashidx;

	shmqueue_lock(shmq_header);

	/* insert to LRU list */
	RTAILQ_INSERT_HEAD(&header->sha_lrulist,
	    item, shmqueue_item, shi_list);

	/* insert to HASH list */
	RTAILQ_INSERT_HEAD(&header->sha_hashlist[item->shi_hashidx],
	    item, shmqueue_item, shi_hashlist);

	header->sha_item_inuse++;

	shmqueue_unlock(shmq_header);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x2350
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x241e
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
addq $0x10, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rdx
addq $0x10, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x2435
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
addq $0x10, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
addq $0x10, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
addq $0x10, %rcx
movq -0x20(%rbp), %rax
addq $0x10, %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x2469
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
je 0x24f2
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
addq $0x150, %rdx            # imm = 0x150
movq -0x10(%rbp), %rsi
movl 0x20(%rsi), %esi
shlq $0x4, %rsi
addq %rsi, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
jmp 0x2531
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
subq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x150, %rcx            # imm = 0x150
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x150, %rax            # imm = 0x150
movq -0x10(%rbp), %rdx
movl 0x20(%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x34(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x34(%rax)
movq -0x8(%rbp), %rdi
callq 0x2380
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)