// File: /workspace/github_c_makefile_star2_O3/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, %rbp
movq %rdi, %rbx
leaq 0x20(%rsp), %rcx
movq $0x1, (%rcx)
leaq 0x18(%rsp), %rdx
movq $0x8, (%rdx)
leaq 0xc522(%rip), %rdi      # 0x3cb0c
movl $0x8, %r8d
movq %rcx, %rsi
callq 0x1fcb0
testl %eax, %eax
je 0x30616
cmpl $0xb, %eax
jne 0x3080a
leaq 0xc6a8(%rip), %rdi      # 0x3ccb4
callq 0x3645c
jmp 0x307fb
testq %r15, %r15
je 0x3071b
movq %rbx, %r9
movq %rbp, %r8
xorl %eax, %eax
movb $0x1, %bpl
leaq 0xc64f(%rip), %rcx      # 0x3cc80
movb $0x1, %r13b
movb $0x1, %r12b
movb $0x1, %r10b
movb $0x1, %bl
movb $0x1, %r14b
xorl %edx, %edx
movl %edx, %esi
movzbl (%r15,%rsi), %esi
leal -0x61(%rsi), %edi
cmpl $0xc, %edi
ja 0x3065e
movslq (%rcx,%rdi,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
xorl %r12d, %r12d
jmp 0x30682
cmpl $0x4a, %esi
je 0x30680
testl %esi, %esi
jne 0x30682
jmp 0x30686
xorl %ebp, %ebp
jmp 0x30682
xorl %r14d, %r14d
jmp 0x30682
xorl %r10d, %r10d
jmp 0x30682
xorl %ebx, %ebx
jmp 0x30682
xorl %r13d, %r13d
jmp 0x30682
movb $0x1, %al
incl %edx
jmp 0x30641
movl %r10d, 0x4(%rsp)
testb $0x1, %al
je 0x30745
leaq 0xc688(%rip), %rdx      # 0x3cd22
movq %r9, %rdi
movq %r9, 0x10(%rsp)
movq %r8, %r15
movq %r8, %rsi
xorl %eax, %eax
callq 0x373de
testb $0x1, %bpl
movq 0x10(%rsp), %rbp
je 0x306ca
movq %rbp, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x3081b
movzbl %r14b, %eax
andl $0x1, %eax
movzbl %bl, %r10d
andl $0x1, %r10d
movzbl %r13b, %ecx
andl $0x1, %ecx
movzbl %r12b, %r8d
andl $0x1, %r8d
movzbl 0x4(%rsp), %r9d
andl $0x1, %r9d
movq %rbp, %rdi
movq %r15, %rsi
movl $0x1, %edx
pushq %rax
pushq %r10
callq 0x329ae
addq $0x10, %rsp
leaq 0xc647(%rip), %rdx      # 0x3cd57
movq %rbp, %rdi
movq %r15, %rsi
jmp 0x307f4
leaq 0xc612(%rip), %rdx      # 0x3cd34
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x373de
movb $0x1, %r13b
movb $0x1, %r12b
movb $0x1, %al
movl %eax, 0x4(%rsp)
movq %rbx, %r15
movb $0x1, %bl
movb $0x1, %r14b
jmp 0x3076c
leaq 0xc5e8(%rip), %rdx      # 0x3cd34
movq %r9, %r15
movq %r9, %rdi
movq %r8, %rsi
movq %r8, 0x8(%rsp)
xorl %eax, %eax
callq 0x373de
testb $0x1, %bpl
je 0x307a6
movq 0x8(%rsp), %rbp
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x3081b
movzbl %r14b, %eax
andl $0x1, %eax
movzbl %bl, %r10d
andl $0x1, %r10d
movzbl %r13b, %ecx
andl $0x1, %ecx
movzbl %r12b, %r8d
andl $0x1, %r8d
movzbl 0x4(%rsp), %r9d
andl $0x1, %r9d
movq %r15, %rdi
jmp 0x307d6
movzbl %r14b, %eax
andl $0x1, %eax
movzbl %bl, %r10d
andl $0x1, %r10d
movzbl %r13b, %ecx
andl $0x1, %ecx
movzbl %r12b, %r8d
andl $0x1, %r8d
movzbl 0x4(%rsp), %r9d
andl $0x1, %r9d
movq %r15, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
xorl %edx, %edx
pushq %rax
pushq %r10
callq 0x329ae
addq $0x10, %rsp
movq %r15, %rdi
leaq 0xc56c(%rip), %rdx      # 0x3cd5d
movq %rbp, %rsi
xorl %eax, %eax
callq 0x373de
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc4e3(%rip), %rdi      # 0x3ccf4
callq 0x3645c
callq 0xb070