// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x31(%rbp)
movb $0x1, -0x32(%rbp)
movb $0x1, -0x33(%rbp)
movb $0x1, -0x34(%rbp)
movb $0x1, -0x35(%rbp)
movb $0x1, -0x36(%rbp)
movb $0x1, -0x37(%rbp)
movq $0x1, -0x28(%rbp)
movq $0x8, -0x30(%rbp)
leaq 0x18d96(%rip), %rdi     # 0x9171d
leaq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rdx
movl $0x8, %r8d
movq %rcx, %rsi
callq 0x35ca0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x789ce
cmpl $0xb, -0x1c(%rbp)
jne 0x789bd
leaq 0x19101(%rip), %rdi     # 0x91ab4
callq 0x828c0
jmp 0x78b3d
leaq 0x19130(%rip), %rdi     # 0x91af4
callq 0x828c0
callq 0xb050
cmpq $0x0, -0x18(%rbp)
je 0x78a54
movl $0x0, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x78a52
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
addl $-0x4a, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0x23, %eax
ja 0x78a43
movq -0x48(%rbp), %rax
leaq 0x19014(%rip), %rcx     # 0x91a24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, -0x31(%rbp)
jmp 0x78a45
movb $0x0, -0x32(%rbp)
jmp 0x78a45
movb $0x0, -0x33(%rbp)
jmp 0x78a45
movb $0x0, -0x34(%rbp)
jmp 0x78a45
movb $0x0, -0x35(%rbp)
jmp 0x78a45
movb $0x0, -0x36(%rbp)
jmp 0x78a45
movb $0x0, -0x37(%rbp)
jmp 0x78a45
jmp 0x78a45
jmp 0x78a47
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x789dc
jmp 0x78a54
testb $0x1, -0x31(%rbp)
je 0x78a72
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x190b9(%rip), %rdx     # 0x91b22
movb $0x0, %al
callq 0x85b80
jmp 0x78a88
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x190b3(%rip), %rdx     # 0x91b34
movb $0x0, %al
callq 0x85b80
testb $0x1, -0x32(%rbp)
je 0x78ab6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x31(%rbp), %dl
movb -0x33(%rbp), %cl
movb -0x34(%rbp), %al
andb $0x1, %dl
andb $0x1, %cl
andb $0x1, %al
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %al, %r8d
callq 0x78b50
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x31(%rbp), %dl
movb -0x33(%rbp), %cl
movb -0x34(%rbp), %r8b
movb -0x35(%rbp), %r9b
movb -0x36(%rbp), %r10b
movb -0x37(%rbp), %al
andb $0x1, %dl
andb $0x1, %cl
andb $0x1, %r8b
andb $0x1, %r9b
andb $0x1, %r10b
andb $0x1, %al
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x7b020
testb $0x1, -0x31(%rbp)
je 0x78b27
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x19039(%rip), %rdx     # 0x91b57
movb $0x0, %al
callq 0x85b80
jmp 0x78b3d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x19027(%rip), %rdx     # 0x91b5d
movb $0x0, %al
callq 0x85b80
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)