// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/stats.c
// Function: je_stats_print
void
stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
    const char *opts)
{
	int err;
	uint64_t epoch;
	size_t u64sz;
	bool json = false;
	bool general = true;
	bool merged = true;
	bool unmerged = true;
	bool bins = true;
	bool large = true;
	bool huge = true;

	/*
	 * Refresh stats, in case mallctl() was called by the application.
	 *
	 * Check for OOM here, since refreshing the ctl cache can trigger
	 * allocation.  In practice, none of the subsequent mallctl()-related
	 * calls in this function will cause OOM if this one succeeds.
	 * */
	epoch = 1;
	u64sz = sizeof(uint64_t);
	err = je_mallctl("epoch", (void *)&epoch, &u64sz, (void *)&epoch,
	    sizeof(uint64_t));
	if (err != 0) {
		if (err == EAGAIN) {
			malloc_write("<jemalloc>: Memory allocation failure in "
			    "mallctl(\"epoch\", ...)\n");
			return;
		}
		malloc_write("<jemalloc>: Failure in mallctl(\"epoch\", "
		    "...)\n");
		abort();
	}

	if (opts != NULL) {
		unsigned i;

		for (i = 0; opts[i] != '\0'; i++) {
			switch (opts[i]) {
			case 'J':
				json = true;
				break;
			case 'g':
				general = false;
				break;
			case 'm':
				merged = false;
				break;
			case 'a':
				unmerged = false;
				break;
			case 'b':
				bins = false;
				break;
			case 'l':
				large = false;
				break;
			case 'h':
				huge = false;
				break;
			default:;
			}
		}
	}

	if (json) {
		malloc_cprintf(write_cb, cbopaque,
		    "{\n"
		    "\t\"jemalloc\": {\n");
	} else {
		malloc_cprintf(write_cb, cbopaque,
		    "___ Begin jemalloc statistics ___\n");
	}

	if (general)
		stats_general_print(write_cb, cbopaque, json, merged, unmerged);
	if (config_stats) {
		stats_print_helper(write_cb, cbopaque, json, merged, unmerged,
		    bins, large, huge);
	}
	if (json) {
		malloc_cprintf(write_cb, cbopaque,
		    "\t}\n"
		    "}\n");
	} else {
		malloc_cprintf(write_cb, cbopaque,
		    "--- End jemalloc statistics ---\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
leaq 0x20(%rsp), %rcx
movq $0x1, (%rcx)
leaq 0x18(%rsp), %rdx
movq $0x8, (%rdx)
leaq 0xc274(%rip), %rdi      # 0x3ca4c
movl $0x8, %r8d
movq %rcx, %rsi
callq 0x1ffb8
testl %eax, %eax
je 0x30804
cmpl $0xb, %eax
jne 0x30949
leaq 0xc3ce(%rip), %rdi      # 0x3cbc8
callq 0x35efc
jmp 0x3093a
movq %rbx, %rdi
xorl %ebp, %ebp
movb $0x1, %r14b
testq %r15, %r15
je 0x3087b
leaq 0xc37c(%rip), %rcx      # 0x3cb94
xorl %eax, %eax
movb $0x1, %r13b
movb $0x1, %r9b
movb $0x1, %r8b
movb $0x1, %bl
movb $0x1, %r12b
movl %ebp, %edx
movzbl (%r15,%rdx), %edx
leal -0x61(%rdx), %esi
cmpl $0xc, %esi
ja 0x30845
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
xorl %r9d, %r9d
jmp 0x3086a
cmpl $0x4a, %edx
je 0x30868
testl %edx, %edx
jne 0x3086a
jmp 0x3086e
xorl %r14d, %r14d
jmp 0x3086a
xorl %r12d, %r12d
jmp 0x3086a
xorl %r8d, %r8d
jmp 0x3086a
xorl %ebx, %ebx
jmp 0x3086a
xorl %r13d, %r13d
jmp 0x3086a
movb $0x1, %al
incl %ebp
jmp 0x30828
movl %r9d, (%rsp)
movl %r8d, 0x4(%rsp)
movl %eax, %ebp
jmp 0x3088e
movb $0x1, %r13b
movb $0x1, %al
movl %eax, (%rsp)
movb $0x1, %al
movl %eax, 0x4(%rsp)
movb $0x1, %bl
movb $0x1, %r12b
leaq 0xc3a1(%rip), %rax      # 0x3cc36
leaq 0xc3ac(%rip), %rdx      # 0x3cc48
testb $0x1, %bpl
cmovneq %rax, %rdx
movq %rdi, 0x8(%rsp)
movq 0x10(%rsp), %r15
movq %r15, %rsi
xorl %eax, %eax
callq 0x36e31
movzbl %bpl, %ebp
testb $0x1, %r14b
movq 0x8(%rsp), %r14
je 0x308d7
movl %ebp, %edx
andl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3095a
movzbl %r12b, %eax
andl $0x1, %eax
movzbl %bl, %r10d
andl $0x1, %r10d
movl %ebp, %edx
andl $0x1, %edx
movzbl %r13b, %ecx
andl $0x1, %ecx
movzbl (%rsp), %r8d
andl $0x1, %r8d
movzbl 0x4(%rsp), %r9d
andl $0x1, %r9d
movq %r14, %rdi
movq %r15, %rsi
pushq %rax
pushq %r10
callq 0x326a4
addq $0x10, %rsp
testb $0x1, %bpl
je 0x30926
leaq 0xc347(%rip), %rdx      # 0x3cc6b
jmp 0x3092d
leaq 0xc344(%rip), %rdx      # 0x3cc71
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x36e31
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc2b8(%rip), %rdi      # 0x3cc08
callq 0x35efc
callq 0xb070