// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/ctl.c
// Function: arena_i_dss_ctl
static int
arena_i_dss_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,
    size_t *oldlenp, void *newp, size_t newlen)
{
	int ret;
	const char *dss = NULL;
	unsigned arena_ind = (unsigned)mib[1];
	dss_prec_t dss_prec_old = dss_prec_limit;
	dss_prec_t dss_prec = dss_prec_limit;

	malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx);
	WRITE(dss, const char *);
	if (dss != NULL) {
		int i;
		bool match = false;

		for (i = 0; i < dss_prec_limit; i++) {
			if (strcmp(dss_prec_names[i], dss) == 0) {
				dss_prec = i;
				match = true;
				break;
			}
		}

		if (!match) {
			ret = EINVAL;
			goto label_return;
		}
	}

	if (arena_ind < ctl_stats.narenas) {
		arena_t *arena = arena_get(tsd_tsdn(tsd), arena_ind, false);
		if (arena == NULL || (dss_prec != dss_prec_limit &&
		    arena_dss_prec_set(tsd_tsdn(tsd), arena, dss_prec))) {
			ret = EFAULT;
			goto label_return;
		}
		dss_prec_old = arena_dss_prec_get(tsd_tsdn(tsd), arena);
	} else {
		if (dss_prec != dss_prec_limit &&
		    chunk_dss_prec_set(dss_prec)) {
			ret = EFAULT;
			goto label_return;
		}
		dss_prec_old = chunk_dss_prec_get();
	}

	dss = dss_prec_names[dss_prec_old];
	READ(dss, const char *);

	ret = 0;
label_return:
	malloc_mutex_unlock(tsd_tsdn(tsd), &ctl_mtx);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdi, %r15
movq $0x0, (%rsp)
movq 0x8(%rsi), %r14
leaq 0x23a4e(%rip), %rdi     # 0x4d100
callq 0xb5a0
testq %rbx, %rbx
je 0x296d4
movl $0x16, %ebp
cmpq $0x8, 0x50(%rsp)
jne 0x2981b
movq (%rbx), %rax
movq %rax, (%rsp)
movq (%rsp), %r13
testq %r13, %r13
je 0x2971e
leaq 0x22cfc(%rip), %rbx     # 0x4c3e0
movq (%rbx), %rdi
movq %r13, %rsi
callq 0xb2e0
xorl %r12d, %r12d
testl %eax, %eax
je 0x29726
cmpq $0x2, %r12
je 0x2972a
movq 0x8(%rbx,%r12,8), %rdi
movq %r13, %rsi
callq 0xb2e0
incq %r12
testl %eax, %eax
jne 0x296f6
leaq -0x1(%r12), %rax
cmpq $0x2, %rax
setb %al
jmp 0x29733
movl $0x3, %r12d
jmp 0x29740
movb $0x1, %al
jmp 0x29733
setb %al
movl $0x3, %r12d
movl $0x16, %ebp
testb %al, %al
je 0x2981b
cmpl %r14d, 0x23a39(%rip)    # 0x4d180
jbe 0x2978f
movl %r14d, %eax
leaq 0x22e5d(%rip), %rcx     # 0x4c5b0
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x29838
movl $0xe, %ebp
movl $0x3, %r13d
testq %rbx, %rbx
je 0x2978b
cmpl $0x3, %r12d
je 0x297b0
movq %r15, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x23ada
testb %al, %al
je 0x297b0
xorl %eax, %eax
jmp 0x297c5
cmpl $0x3, %r12d
je 0x297a6
movl %r12d, %edi
callq 0x275a7
movl $0xe, %ebp
testb %al, %al
jne 0x2981b
callq 0x2759c
movl %eax, %r13d
jmp 0x297c9
movq %r15, %rdi
movq %rbx, %rsi
callq 0x23aaf
movl %eax, %r13d
movl $0x16, %ebp
movb $0x1, %al
testb %al, %al
je 0x2981b
movl %r13d, %eax
leaq 0x22c0d(%rip), %rcx     # 0x4c3e0
movq (%rcx,%rax,8), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
sete %cl
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0x2981b
movq (%rsi), %rcx
cmpq $0x8, %rcx
jne 0x29805
movq %rax, (%rdi)
jmp 0x2981b
movl $0x8, %edx
cmovbq %rcx, %rdx
movq %rsp, %rsi
callq 0xb340
movl $0x16, %ebp
leaq 0x238de(%rip), %rdi     # 0x4d100
callq 0xb380
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
lock
xaddq %rbx, (%rcx,%rax,8)
jmp 0x29763