// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x6c(%rbp)
movl $0x3, -0x70(%rbp)
movl $0x3, -0x74(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x4bf75(%rip), %rsi     # 0xa40e0
callq 0x54620
cmpq $0x0, -0x58(%rbp)
je 0x58195
cmpq $0x8, 0x10(%rbp)
je 0x5818a
movl $0x16, -0x5c(%rbp)
jmp 0x58338
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x58197
cmpq $0x0, -0x68(%rbp)
je 0x581f9
movb $0x0, -0x79(%rbp)
movl $0x0, -0x78(%rbp)
cmpl $0x3, -0x78(%rbp)
jge 0x581e5
movslq -0x78(%rbp), %rcx
leaq 0x4b206(%rip), %rax     # 0xa33c0
movq (%rax,%rcx,8), %rdi
movq -0x68(%rbp), %rsi
callq 0xb2b0
cmpl $0x0, %eax
jne 0x581d8
movl -0x78(%rbp), %eax
movl %eax, -0x74(%rbp)
movb $0x1, -0x79(%rbp)
jmp 0x581e5
jmp 0x581da
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x581a9
testb $0x1, -0x79(%rbp)
jne 0x581f7
movl $0x16, -0x5c(%rbp)
jmp 0x58338
jmp 0x581f9
movl -0x6c(%rbp), %eax
cmpl 0x4bf5e(%rip), %eax     # 0xa4160
jae 0x5827b
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x6c(%rbp), %esi
xorl %edx, %edx
callq 0x54b20
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x58252
cmpl $0x3, -0x74(%rbp)
je 0x5825e
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rsi
movl -0x74(%rbp), %edx
callq 0x42c90
testb $0x1, %al
jne 0x58252
jmp 0x5825e
movl $0xe, -0x5c(%rbp)
jmp 0x58338
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x42c40
movl %eax, -0x70(%rbp)
jmp 0x582a3
cmpl $0x3, -0x74(%rbp)
je 0x5829b
movl -0x74(%rbp), %edi
callq 0x53490
testb $0x1, %al
jne 0x5828f
jmp 0x5829b
movl $0xe, -0x5c(%rbp)
jmp 0x58338
callq 0x53430
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl %eax, %ecx
leaq 0x4b111(%rip), %rax     # 0xa33c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x5832f
cmpq $0x0, -0x50(%rbp)
je 0x5832f
movq -0x50(%rbp), %rax
cmpq $0x8, (%rax)
je 0x58324
movq -0x50(%rbp), %rcx
movl $0x8, %eax
cmpq (%rcx), %rax
ja 0x582eb
movl $0x8, %eax
movq %rax, -0x98(%rbp)
jmp 0x582f9
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rdi
movq -0x90(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0xb310
movl $0x16, -0x5c(%rbp)
jmp 0x58338
movq -0x68(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
jmp 0x58331
movl $0x0, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x4bd95(%rip), %rsi     # 0xa40e0
callq 0x549c0
movl -0x5c(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)