// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ctl.c
// Function: arena_i_dss_ctl
static int
arena_i_dss_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
    void *newp, size_t newlen)
{
	int ret, i;
	bool match, err;
	const char *dss;
	unsigned arena_ind = mib[1];
	dss_prec_t dss_prec_old = dss_prec_limit;
	dss_prec_t dss_prec = dss_prec_limit;

	malloc_mutex_lock(&ctl_mtx);
	WRITE(dss, const char *);
	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 == false) {
		ret = EINVAL;
		goto label_return;
	}

	if (arena_ind < ctl_stats.narenas) {
		arena_t *arena = arenas[arena_ind];
		if (arena != NULL) {
			dss_prec_old = arena_dss_prec_get(arena);
			arena_dss_prec_set(arena, dss_prec);
			err = false;
		} else
			err = true;
	} else {
		dss_prec_old = chunk_dss_prec_get();
		err = chunk_dss_prec_set(dss_prec);
	}
	dss = dss_prec_names[dss_prec_old];
	READ(dss, const char *);
	if (err) {
		ret = EFAULT;
		goto label_return;
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x4c(%rbp)
movl $0x3, -0x50(%rbp)
movl $0x3, -0x54(%rbp)
leaq 0x64a50(%rip), %rdi     # 0x1292d0
callq 0xc19c0
cmpq $0x0, -0x28(%rbp)
je 0xc48aa
cmpq $0x8, -0x30(%rbp)
je 0xc489f
movl $0x16, -0x34(%rbp)
jmp 0xc4a03
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xc48ac
movb $0x0, -0x39(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0xc48f3
movslq -0x38(%rbp), %rcx
leaq 0x4efd8(%rip), %rax     # 0x1138a0
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rsi
callq 0x1f890
cmpl $0x0, %eax
jne 0xc48e6
movl -0x38(%rbp), %eax
movl %eax, -0x54(%rbp)
movb $0x1, -0x39(%rbp)
jmp 0xc48f3
jmp 0xc48e8
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xc48b7
movb -0x39(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xc490c
movl $0x16, -0x34(%rbp)
jmp 0xc4a03
movl -0x4c(%rbp), %eax
cmpl 0x64a2b(%rip), %eax     # 0x129340
jae 0xc4957
leaq 0x63baa(%rip), %rax     # 0x1284c8
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xc4951
movq -0x60(%rbp), %rdi
callq 0xb8310
movl %eax, -0x50(%rbp)
movq -0x60(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0xb8350
movb $0x0, -0x3a(%rbp)
jmp 0xc4955
movb $0x1, -0x3a(%rbp)
jmp 0xc496c
callq 0xc0ae0
movl %eax, -0x50(%rbp)
movl -0x54(%rbp), %edi
callq 0xc0af0
andb $0x1, %al
movb %al, -0x3a(%rbp)
movl -0x50(%rbp), %eax
movl %eax, %ecx
leaq 0x4ef28(%rip), %rax     # 0x1138a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xc49eb
cmpq $0x0, -0x20(%rbp)
je 0xc49eb
movq -0x20(%rbp), %rax
cmpq $0x8, (%rax)
je 0xc49de
movq -0x20(%rbp), %rcx
movl $0x8, %eax
cmpq (%rcx), %rax
ja 0xc49b1
movl $0x8, %eax
movq %rax, -0x70(%rbp)
jmp 0xc49bc
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq -0x48(%rbp), %rsi
callq 0x1fbf0
movl $0x16, -0x34(%rbp)
jmp 0xc4a03
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc49eb
jmp 0xc49ed
testb $0x1, -0x3a(%rbp)
je 0xc49fc
movl $0xe, -0x34(%rbp)
jmp 0xc4a03
movl $0x0, -0x34(%rbp)
leaq 0x648c6(%rip), %rdi     # 0x1292d0
callq 0xc1d60
movl -0x34(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)