// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/command.cpp
// Function: initCommandTable()
dict *initCommandTable()
{
	char k1[4] = "get";
	char k2[4] = "set";
	char k3[4] = "del";
	char k4[6] = "lpush";
	char k5[5] = "lpop";
	char k6[7] = "lindex";
	char k7[5] = "hget";
	char k8[5] = "hset";
	char k9[5] = "hlen";
	char k10[5]= "type";
	char k11[3] = "db";
	redisCommand cmdtable[11] = {
		{ k1, 2, &getCommand },
		{ k2, 3, &setCommand },
		{ k3, 2, &delCommand },
		{ k4, -3, &lpushCommand },
		{ k5, 2, &lpopCommand },
		{ k6, 3, &lindexCommand },
		{ k7, 3, &hgetCommand },
		{ k8, -4 ,&hsetCommand },
		{ k9, 2 ,&hlenCommand },
		{ k10, 2, &typeCommand },
		{ k11, 3, &dbCommand},
	};
	dict *d = dictCreate(NULL, NULL);

	for (size_t i = 0; i < 11; ++i) {
		redisCommand cmd = cmdtable[i];
		sds k = sdsNew(cmd.name);
		redisCommand *v = (redisCommand *)zmalloc(sizeof(struct redisCommand));
		v->arbity = cmd.arbity;
		v->name = k;
		v->proc = cmd.proc;

		dictAdd(d, k, v);
	}
	printf("========= After init CommandTabel =========\n");
	return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
leaq 0x14(%rsp), %r11
movl $0x746567, (%r11)       # imm = 0x746567
leaq 0x10(%rsp), %r14
movl $0x746573, (%r14)       # imm = 0x746573
leaq 0xc(%rsp), %rbx
movl $0x6c6564, (%rbx)       # imm = 0x6C6564
leaq 0x40(%rsp), %r8
movw $0x68, 0x4(%r8)
movl $0x7375706c, (%r8)      # imm = 0x7375706C
xorl %r15d, %r15d
leaq 0x38(%rsp), %r10
movb %r15b, 0x4(%r10)
movl $0x706f706c, (%r10)     # imm = 0x706F706C
leaq 0x48(%rsp), %r9
movl $0x786564, 0x3(%r9)     # imm = 0x786564
movl $0x646e696c, (%r9)      # imm = 0x646E696C
leaq 0x30(%rsp), %rdi
movb %r15b, 0x4(%rdi)
movl $0x74656768, (%rdi)     # imm = 0x74656768
leaq 0x28(%rsp), %rsi
movb %r15b, 0x4(%rsi)
movl $0x74657368, (%rsi)     # imm = 0x74657368
leaq 0x20(%rsp), %rdx
movb %r15b, 0x4(%rdx)
movl $0x6e656c68, (%rdx)     # imm = 0x6E656C68
leaq 0x18(%rsp), %rcx
movb %r15b, 0x4(%rcx)
movl $0x65707974, (%rcx)     # imm = 0x65707974
leaq 0x8(%rsp), %rax
movb %r15b, 0x2(%rax)
movw $0x6264, (%rax)         # imm = 0x6264
movq %r11, 0x50(%rsp)
movl $0x2, %r11d
movl %r11d, 0x58(%rsp)
leaq 0x1b0(%rip), %r15       # 0x19d1
movq %r15, 0x60(%rsp)
movq %r14, 0x68(%rsp)
movl $0x3, %ebp
movl %ebp, 0x70(%rsp)
leaq 0x225(%rip), %r14       # 0x1a60
movq %r14, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
movl %r11d, 0x88(%rsp)
leaq 0x305(%rip), %rbx       # 0x1b5c
movq %rbx, 0x90(%rsp)
movq %r8, 0x98(%rsp)
movl $0xfffffffd, 0xa0(%rsp) # imm = 0xFFFFFFFD
leaq 0x34d(%rip), %r8        # 0x1bc6
movq %r8, 0xa8(%rsp)
movq %r10, 0xb0(%rsp)
movl %r11d, 0xb8(%rsp)
leaq 0x3fa(%rip), %r8        # 0x1c92
movq %r8, 0xc0(%rsp)
movq %r9, 0xc8(%rsp)
movl %ebp, 0xd0(%rsp)
leaq 0x4b5(%rip), %r8        # 0x1d6b
movq %r8, 0xd8(%rsp)
movq %rdi, 0xe0(%rsp)
movl %ebp, 0xe8(%rsp)
leaq 0x5f5(%rip), %rdi       # 0x1ec9
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xf8(%rsp)
movl $0xfffffffc, 0x100(%rsp) # imm = 0xFFFFFFFC
leaq 0x695(%rip), %rsi       # 0x1f8b
movq %rsi, 0x108(%rsp)
movq %rdx, 0x110(%rsp)
movl %r11d, 0x118(%rsp)
leaq 0x828(%rip), %rdx       # 0x213d
movq %rdx, 0x120(%rsp)
movq %rcx, 0x128(%rsp)
movl %r11d, 0x130(%rsp)
leaq 0x917(%rip), %rcx       # 0x224b
movq %rcx, 0x138(%rsp)
movq %rax, 0x140(%rsp)
movl %ebp, 0x148(%rsp)
leaq 0x997(%rip), %rax       # 0x22e9
movq %rax, 0x150(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x2a1d
movq %rax, %rbx
movl $0x10, %r15d
movq 0x40(%rsp,%r15), %rdi
movl 0x48(%rsp,%r15), %ebp
movq 0x50(%rsp,%r15), %r12
callq 0x3726
movq %rax, %r14
movl $0x18, %edi
callq 0x3884
movl %ebp, 0x8(%rax)
movq %r14, (%rax)
movq %r12, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2ea7
addq $0x18, %r15
cmpq $0x118, %r15            # imm = 0x118
jne 0x196c
leaq 0x37b5(%rip), %rdi      # 0x516e
callq 0x1200
movq %rbx, %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq