// File: /workspace/github_c_makefile_star2_O0/igaw[P]jitterdebugger/jitterdebugger.c
// Function: dump_stats
static void dump_stats(FILE *f, struct system_info *sysinfo, struct stats *s)
{
	unsigned int i, j, comma;

	fprintf(f, "{\n");
	fprintf(f, "  \"version\": 3,\n");
	fprintf(f, "  \"sysinfo\": {\n");
	fprintf(f, "    \"sysname\": \"%s\",\n", sysinfo->sysname);
	fprintf(f, "    \"nodename\": \"%s\",\n", sysinfo->nodename);
	fprintf(f, "    \"release\": \"%s\",\n", sysinfo->release);
	fprintf(f, "    \"version\": \"%s\",\n", sysinfo->version);
	fprintf(f, "    \"machine\": \"%s\",\n", sysinfo->machine);
	fprintf(f, "    \"cpus_online\": %d,\n", sysinfo->cpus_online);
	fprintf(f, "    \"resolution_in_ns\": %u\n", interval_resolution);
	fprintf(f, "  },\n");
	fprintf(f, "  \"cpu\": {\n");
	for (i = 0; i < num_threads; i++) {
		fprintf(f, "    \"%u\": {\n", i);

		fprintf(f, "      \"histogram\": {");
		for (j = 0, comma = 0; j < s[i].hist_size; j++) {
			if (!s[i].hist[j])
				continue;
			fprintf(f, "%s", comma ? ",\n" : "\n");
			fprintf(f, "        \"%u\": %" PRIu64,j, s[i].hist[j]);
			comma = 1;
		}
		if (comma)
			fprintf(f, "\n");
		fprintf(f, "      },\n");
		fprintf(f, "      \"count\": %" PRIu64 ",\n", s[i].count);
		fprintf(f, "      \"min\": %" PRIu64 ",\n", s[i].min);
		fprintf(f, "      \"max\": %" PRIu64 ",\n", s[i].max);
		fprintf(f, "      \"avg\": %.2f\n",
			(double)s[i].total / (double)s[i].count);
		fprintf(f, "    }%s\n", i == num_threads - 1 ? "" : ",");
	}
	fprintf(f, "  }\n");
	fprintf(f, "}\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3091(%rip), %rsi      # 0x6e70
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x3061(%rip), %rsi      # 0x6e52
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x3060(%rip), %rsi      # 0x6e63
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x3057(%rip), %rsi      # 0x6e73
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x3053(%rip), %rsi      # 0x6e89
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3050(%rip), %rsi      # 0x6ea0
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x304c(%rip), %rsi      # 0x6eb6
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x3048(%rip), %rsi      # 0x6ecc
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x3045(%rip), %rsi      # 0x6ee2
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movl 0x5552(%rip), %edx      # 0x9400
leaq 0x3045(%rip), %rsi      # 0x6efa
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x3093(%rip), %rsi      # 0x6f5a
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x303d(%rip), %rsi      # 0x6f16
movb $0x0, %al
callq 0x2220
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x55b0(%rip), %eax      # 0x94a0
jae 0x4118
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x301e(%rip), %rsi      # 0x6f22
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x3019(%rip), %rsi      # 0x6f2f
movb $0x0, %al
callq 0x2220
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x28(%rcx), %eax
jae 0x3fd0
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x3f63
jmp 0x3fc2
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x233d(%rip), %rdx      # 0x62ae
leaq 0x2f25(%rip), %rax      # 0x6e9d
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x318d(%rip), %rsi      # 0x7113
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
leaq 0x2f90(%rip), %rsi      # 0x6f44
movb $0x0, %al
callq 0x2220
movl $0x1, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3f2b
cmpl $0x0, -0x24(%rbp)
je 0x3fe8
movq -0x8(%rbp), %rdi
leaq 0x22cd(%rip), %rsi      # 0x62ae
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x2f63(%rip), %rsi      # 0x6f56
xorl %eax, %eax
movb %al, -0x25(%rbp)
callq 0x2220
movb -0x25(%rbp), %al
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
leaq (%rdx,%rdx,4), %rdx
shlq $0x4, %rdx
movq 0x40(%rcx,%rdx), %rdx
leaq 0x2f41(%rip), %rsi      # 0x6f60
callq 0x2220
movb -0x25(%rbp), %al
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
leaq (%rdx,%rdx,4), %rdx
shlq $0x4, %rdx
movq 0x18(%rcx,%rdx), %rdx
leaq 0x2f2f(%rip), %rsi      # 0x6f75
callq 0x2220
movb -0x25(%rbp), %al
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
leaq (%rdx,%rdx,4), %rdx
shlq $0x4, %rdx
movq 0x10(%rcx,%rdx), %rdx
leaq 0x2f1b(%rip), %rsi      # 0x6f88
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
movq 0x38(%rax,%rcx), %xmm0
movaps 0x214e(%rip), %xmm3     # 0x61e0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2152(%rip), %xmm2     # 0x61f0
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x40(%rax,%rcx), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x2eca(%rip), %rsi      # 0x6f9b
movb $0x1, %al
callq 0x2220
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movl 0x53bb(%rip), %esi      # 0x94a0
subl $0x1, %esi
leaq 0x2ec8(%rip), %rdx      # 0x6fb7
leaq 0x21b9(%rip), %rax      # 0x62af
cmpl %esi, %ecx
cmoveq %rax, %rdx
leaq 0x2eab(%rip), %rsi      # 0x6fae
movb $0x0, %al
callq 0x2220
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3ee7
movq -0x8(%rbp), %rdi
leaq 0x2e96(%rip), %rsi      # 0x6fb9
movb $0x0, %al
callq 0x2220
movq -0x8(%rbp), %rdi
leaq 0x2e86(%rip), %rsi      # 0x6fbb
movb $0x0, %al
callq 0x2220
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)