// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/stats.c
// Function: stats_print_helper
static void
stats_print_helper(void (*write_cb)(void *, const char *), void *cbopaque,
    bool json, bool merged, bool unmerged, bool bins, bool large, bool huge)
{
	size_t *cactive;
	size_t allocated, active, metadata, resident, mapped, retained;

	CTL_GET("stats.cactive", &cactive, size_t *);
	CTL_GET("stats.allocated", &allocated, size_t);
	CTL_GET("stats.active", &active, size_t);
	CTL_GET("stats.metadata", &metadata, size_t);
	CTL_GET("stats.resident", &resident, size_t);
	CTL_GET("stats.mapped", &mapped, size_t);
	CTL_GET("stats.retained", &retained, size_t);
	if (json) {
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\"stats\": {\n");

		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"cactive\": %zu,\n", atomic_read_z(cactive));
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"allocated\": %zu,\n", allocated);
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"active\": %zu,\n", active);
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"metadata\": %zu,\n", metadata);
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"resident\": %zu,\n", resident);
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"mapped\": %zu,\n", mapped);
		malloc_cprintf(write_cb, cbopaque,
		    "\t\t\t\"retained\": %zu\n", retained);

		malloc_cprintf(write_cb, cbopaque,
		    "\t\t}%s\n", (merged || unmerged) ? "," : "");
	} else {
		malloc_cprintf(write_cb, cbopaque,
		    "Allocated: %zu, active: %zu, metadata: %zu,"
		    " resident: %zu, mapped: %zu, retained: %zu\n",
		    allocated, active, metadata, resident, mapped, retained);
		malloc_cprintf(write_cb, cbopaque,
		    "Current active ceiling: %zu\n",
		    atomic_read_z(cactive));
	}

	if (merged || unmerged) {
		unsigned narenas;

		if (json) {
			malloc_cprintf(write_cb, cbopaque,
			    "\t\t\"stats.arenas\": {\n");
		}

		CTL_GET("arenas.narenas", &narenas, unsigned);
		{
			VARIABLE_ARRAY(bool, initialized, narenas);
			size_t isz;
			unsigned i, j, ninitialized;

			isz = sizeof(bool) * narenas;
			xmallctl("arenas.initialized", (void *)initialized,
			    &isz, NULL, 0);
			for (i = ninitialized = 0; i < narenas; i++) {
				if (initialized[i])
					ninitialized++;
			}

			/* Merged stats. */
			if (merged && (ninitialized > 1 || !unmerged)) {
				/* Print merged arena stats. */
				if (json) {
					malloc_cprintf(write_cb, cbopaque,
					    "\t\t\t\"merged\": {\n");
				} else {
					malloc_cprintf(write_cb, cbopaque,
					    "\nMerged arenas stats:\n");
				}
				stats_arena_print(write_cb, cbopaque, json,
				    narenas, bins, large, huge);
				if (json) {
					malloc_cprintf(write_cb, cbopaque,
					    "\t\t\t}%s\n", (ninitialized > 1) ?
					    "," : "");
				}
			}

			/* Unmerged stats. */
			for (i = j = 0; i < narenas; i++) {
				if (initialized[i]) {
					if (json) {
						j++;
						malloc_cprintf(write_cb,
						    cbopaque,
						    "\t\t\t\"%u\": {\n", i);
					} else {
						malloc_cprintf(write_cb,
						    cbopaque, "\narenas[%u]:\n",
						    i);
					}
					stats_arena_print(write_cb, cbopaque,
					    json, i, bins, large, huge);
					if (json) {
						malloc_cprintf(write_cb,
						    cbopaque,
						    "\t\t\t}%s\n", (j <
						    ninitialized) ? "," : "");
					}
				}
			}
		}

		if (json) {
			malloc_cprintf(write_cb, cbopaque,
			    "\t\t}\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl %r9d, -0xc0(%rbp)
movl %edx, %eax
movl -0xc0(%rbp), %edx
movq %rsi, %r9
movq %rdi, %r10
movb %r8b, %sil
movb %cl, %dil
movb %al, %r8b
movb 0x18(%rbp), %al
movb 0x10(%rbp), %cl
movq %r10, -0x8(%rbp)
movq %r9, -0x10(%rbp)
andb $0x1, %r8b
movb %r8b, -0x11(%rbp)
andb $0x1, %dil
movb %dil, -0x12(%rbp)
andb $0x1, %sil
movb %sil, -0x13(%rbp)
andb $0x1, %dl
movb %dl, -0x14(%rbp)
andb $0x1, %cl
movb %cl, -0x15(%rbp)
andb $0x1, %al
movb %al, -0x16(%rbp)
movq $0x8, -0x58(%rbp)
leaq 0x177f6(%rip), %rdi     # 0x92885
leaq -0x20(%rbp), %rsi
leaq -0x58(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b0c3
leaq 0x16ace(%rip), %rdi     # 0x91b7e
leaq 0x177ce(%rip), %rsi     # 0x92885
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b0c5
jmp 0x7b0c7
jmp 0x7b0c9
movq $0x8, -0x60(%rbp)
leaq 0x177bb(%rip), %rdi     # 0x92893
leaq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b10c
leaq 0x16a85(%rip), %rdi     # 0x91b7e
leaq 0x17793(%rip), %rsi     # 0x92893
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b10e
jmp 0x7b110
jmp 0x7b112
movq $0x8, -0x68(%rbp)
leaq 0x17782(%rip), %rdi     # 0x928a3
leaq -0x30(%rbp), %rsi
leaq -0x68(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b155
leaq 0x16a3c(%rip), %rdi     # 0x91b7e
leaq 0x1775a(%rip), %rsi     # 0x928a3
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b157
jmp 0x7b159
jmp 0x7b15b
movq $0x8, -0x70(%rbp)
leaq 0x17746(%rip), %rdi     # 0x928b0
leaq -0x38(%rbp), %rsi
leaq -0x70(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b19e
leaq 0x169f3(%rip), %rdi     # 0x91b7e
leaq 0x1771e(%rip), %rsi     # 0x928b0
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b1a0
jmp 0x7b1a2
jmp 0x7b1a4
movq $0x8, -0x78(%rbp)
leaq 0x1770c(%rip), %rdi     # 0x928bf
leaq -0x40(%rbp), %rsi
leaq -0x78(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b1e7
leaq 0x169aa(%rip), %rdi     # 0x91b7e
leaq 0x176e4(%rip), %rsi     # 0x928bf
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b1e9
jmp 0x7b1eb
jmp 0x7b1ed
movq $0x8, -0x80(%rbp)
leaq 0x176d2(%rip), %rdi     # 0x928ce
leaq -0x48(%rbp), %rsi
leaq -0x80(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b230
leaq 0x16961(%rip), %rdi     # 0x91b7e
leaq 0x176aa(%rip), %rsi     # 0x928ce
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b232
jmp 0x7b234
jmp 0x7b236
movq $0x8, -0x88(%rbp)
leaq 0x17693(%rip), %rdi     # 0x928db
leaq -0x50(%rbp), %rsi
leaq -0x88(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b27f
leaq 0x16912(%rip), %rdi     # 0x91b7e
leaq 0x17668(%rip), %rsi     # 0x928db
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b281
jmp 0x7b283
testb $0x1, -0x11(%rbp)
je 0x7b3ea
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x1764e(%rip), %rdx     # 0x928ea
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7b800
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %rax, %rcx
leaq 0x1761a(%rip), %rdx     # 0x928f8
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq 0x17a3f(%rip), %rdx     # 0x92d37
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rcx
leaq 0x175fa(%rip), %rdx     # 0x9290c
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rcx
leaq 0x175f3(%rip), %rdx     # 0x9291f
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rcx
leaq 0x175ee(%rip), %rdx     # 0x92934
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq 0x17d53(%rip), %rdx     # 0x930b3
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rcx
leaq 0x175cf(%rip), %rdx     # 0x92949
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
movb $0x1, %al
testb $0x1, -0x12(%rbp)
movb %al, -0xc1(%rbp)
jne 0x7b3ae
movb -0x13(%rbp), %al
movb %al, -0xc1(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdi
movb -0xc1(%rbp), %dl
leaq 0x13d34(%rip), %rcx     # 0x8f0fd
leaq 0x12e2f(%rip), %rax     # 0x8e1ff
testb $0x1, %dl
cmovneq %rax, %rcx
leaq 0x18369(%rip), %rdx     # 0x93747
movb $0x0, %al
callq 0x85b80
jmp 0x7b470
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x40(%rbp), %r11
movq -0x48(%rbp), %r10
movq -0x50(%rbp), %rax
leaq 0x1754c(%rip), %rdx     # 0x9295d
subq $0x20, %rsp
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x85b80
addq $0x20, %rsp
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7b800
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq %rax, %rcx
leaq 0x1754b(%rip), %rdx     # 0x929b4
movb $0x0, %al
callq 0x85b80
testb $0x1, -0x12(%rbp)
jne 0x7b480
testb $0x1, -0x13(%rbp)
je 0x7b7ef
testb $0x1, -0x11(%rbp)
je 0x7b49c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x1753c(%rip), %rdx     # 0x929d1
movb $0x0, %al
callq 0x85b80
jmp 0x7b49e
movq $0x4, -0x98(%rbp)
leaq 0x17010(%rip), %rdi     # 0x924c0
leaq -0x8c(%rbp), %rsi
leaq -0x98(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b4ea
leaq 0x166a7(%rip), %rdi     # 0x91b7e
leaq 0x16fe2(%rip), %rsi     # 0x924c0
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b4ec
jmp 0x7b4ee
movl -0x8c(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0xa0(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x100(%rbp)
movq %rcx, %rsp
movq %rax, -0xa8(%rbp)
movl -0x8c(%rbp), %eax
shlq $0x0, %rax
movq %rax, -0xb0(%rbp)
movq -0x100(%rbp), %rsi
leaq 0x174a7(%rip), %rdi     # 0x929e6
leaq -0xb0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x35ca0
cmpl $0x0, %eax
je 0x7b572
leaq 0x1661f(%rip), %rdi     # 0x91b7e
leaq 0x17480(%rip), %rsi     # 0x929e6
movb $0x0, %al
callq 0x85c20
callq 0xb050
jmp 0x7b574
jmp 0x7b576
movl $0x0, -0xbc(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jae 0x7b5cd
movq -0x100(%rbp), %rax
movl -0xb4(%rbp), %ecx
testb $0x1, (%rax,%rcx)
je 0x7b5ba
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x7b5bc
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x7b58a
testb $0x1, -0x12(%rbp)
je 0x7b69e
cmpl $0x1, -0xbc(%rbp)
ja 0x7b5ea
testb $0x1, -0x13(%rbp)
jne 0x7b69e
testb $0x1, -0x11(%rbp)
je 0x7b608
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x173fa(%rip), %rdx     # 0x929f9
movb $0x0, %al
callq 0x85b80
jmp 0x7b61e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x173f2(%rip), %rdx     # 0x92a09
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x11(%rbp), %dl
movl -0x8c(%rbp), %ecx
movb -0x14(%rbp), %r8b
movb -0x15(%rbp), %r9b
movb -0x16(%rbp), %al
andb $0x1, %dl
andb $0x1, %r8b
andb $0x1, %r9b
andb $0x1, %al
subq $0x10, %rsp
movzbl %dl, %edx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movzbl %al, %eax
movl %eax, (%rsp)
callq 0x7b830
addq $0x10, %rsp
testb $0x1, -0x11(%rbp)
je 0x7b69c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xbc(%rbp), %edx
leaq 0x13a7d(%rip), %rcx     # 0x8f0fd
leaq 0x12b78(%rip), %rax     # 0x8e1ff
cmpl $0x1, %edx
cmovaq %rax, %rcx
leaq 0x180b1(%rip), %rdx     # 0x93746
movb $0x0, %al
callq 0x85b80
jmp 0x7b69e
movl $0x0, -0xb8(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jae 0x7b7c7
movq -0x100(%rbp), %rax
movl -0xb4(%rbp), %ecx
testb $0x1, (%rax,%rcx)
je 0x7b7b1
testb $0x1, -0x11(%rbp)
je 0x7b70e
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xb4(%rbp), %ecx
leaq 0x1731b(%rip), %rdx     # 0x92a20
movb $0x0, %al
callq 0x85b80
jmp 0x7b72a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xb4(%rbp), %ecx
leaq 0x17309(%rip), %rdx     # 0x92a2c
movb $0x0, %al
callq 0x85b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x11(%rbp), %dl
movl -0xb4(%rbp), %ecx
movb -0x14(%rbp), %r8b
movb -0x15(%rbp), %r9b
movb -0x16(%rbp), %al
andb $0x1, %dl
andb $0x1, %r8b
andb $0x1, %r9b
andb $0x1, %al
subq $0x10, %rsp
movzbl %dl, %edx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movzbl %al, %eax
movl %eax, (%rsp)
callq 0x7b830
addq $0x10, %rsp
testb $0x1, -0x11(%rbp)
je 0x7b7af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xb8(%rbp), %edx
movl -0xbc(%rbp), %r8d
leaq 0x1396a(%rip), %rcx     # 0x8f0fd
leaq 0x12a65(%rip), %rax     # 0x8e1ff
cmpl %r8d, %edx
cmovbq %rax, %rcx
leaq 0x17f9e(%rip), %rdx     # 0x93746
movb $0x0, %al
callq 0x85b80
jmp 0x7b7b1
jmp 0x7b7b3
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x7b6b2
movq -0xa0(%rbp), %rax
movq %rax, %rsp
testb $0x1, -0x11(%rbp)
je 0x7b7ed
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x17254(%rip), %rdx     # 0x92a3a
movb $0x0, %al
callq 0x85b80
jmp 0x7b7ef
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)