// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/topdown.c
// Function: print_metrics
void print_metrics(struct counter_group *counter_group_list,enum output_format oformat){
  struct counter_group *cgroup;
  for (cgroup = counter_group_list;cgroup;cgroup = cgroup->next){
    if (!strcmp(cgroup->label,"software")){
      print_software(cgroup,oformat);
    } else if (cgroup->mask & COUNTER_IPC){
      print_ipc(cgroup,oformat);
    } else if (cgroup->mask & COUNTER_TOPDOWN){
      print_topdown(cgroup,oformat,COUNTER_TOPDOWN);
    } else if (cgroup->mask & COUNTER_TOPDOWN2){
      print_topdown(cgroup,oformat,COUNTER_TOPDOWN2);
    } else if (cgroup->mask & COUNTER_TOPDOWN_BE){
      print_topdown_be(cgroup,oformat,COUNTER_TOPDOWN_BE);
    } else if (cgroup->mask & COUNTER_TOPDOWN_FE){
      print_topdown_fe(cgroup,oformat,COUNTER_TOPDOWN_FE);
    } else if (cgroup->mask & COUNTER_TOPDOWN_OP){
      print_topdown_op(cgroup,oformat,COUNTER_TOPDOWN_OP);      
    } else if (cgroup->mask & COUNTER_BRANCH){
      print_branch(cgroup,oformat);
    } else if (cgroup->mask & COUNTER_L2CACHE){
      print_l2cache(cgroup,oformat);      
    } else if (cgroup->mask & COUNTER_L3CACHE){
      print_l3cache(cgroup,oformat);      
    } else if (cgroup->mask & COUNTER_OPCACHE){
      print_opcache(cgroup,oformat);
    } else if (cgroup->mask & (COUNTER_DCACHE|COUNTER_ICACHE|COUNTER_TLB)){
      if (cgroup->mask & COUNTER_DCACHE) print_dcache(cgroup,oformat);
      if (cgroup->mask & COUNTER_ICACHE) print_icache(cgroup,oformat);
      if (cgroup->mask & COUNTER_TLB){
	print_dtlb(cgroup,oformat);	  
	print_itlb(cgroup,oformat);
      }
    } else if (cgroup->mask & COUNTER_FLOAT){
      print_float(cgroup,oformat);
    }
  }
}

// Assembly:
testq %rdi, %rdi
je 0x8b75
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x28c4(%rip), %r15      # 0xb270
leaq 0x289f(%rip), %r12      # 0xb252
leaq 0x367d(%rip), %r13      # 0xc037
leaq 0x36b4(%rip), %rbp      # 0xc075
movq (%r14), %rdi
movq %r15, %rsi
callq 0x31a0
testl %eax, %eax
je 0x8ac7
movl 0x10(%r14), %eax
testb $0x1, %al
jne 0x8ad3
testb $0x2, %al
jne 0x8adf
testb $0x4, %al
jne 0x8adf
testb $0x10, %al
jne 0x8af8
testb $0x8, %al
jne 0x8b04
testb $0x20, %al
jne 0x8b10
testb $0x40, %al
jne 0x8b1c
btl $0xa, %eax
jb 0x8b28
btl $0xb, %eax
jb 0x8b34
btl $0xe, %eax
jb 0x8b40
testl $0x2180, %eax           # imm = 0x2180
je 0x8b55
testb %al, %al
jns 0x8a5c
movq %r14, %rdi
movl %ebx, %esi
leaq 0x4e53(%rip), %rdx      # 0xd89c
leaq 0x3f63(%rip), %rcx      # 0xc9b3
leaq 0x3f65(%rip), %r8       # 0xc9bc
callq 0x8282
testb $0x1, 0x11(%r14)
je 0x8a82
movq %r14, %rdi
movl %ebx, %esi
leaq 0x4e37(%rip), %rdx      # 0xd8a6
leaq 0x3f54(%rip), %rcx      # 0xc9ca
leaq 0x3f56(%rip), %r8       # 0xc9d3
callq 0x8282
testb $0x20, 0x11(%r14)
je 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
leaq 0x4e20(%rip), %rdx      # 0xd8b5
leaq 0x3f45(%rip), %rcx      # 0xc9e1
leaq 0x3f49(%rip), %r8       # 0xc9ec
callq 0x8282
movq %r14, %rdi
movl %ebx, %esi
leaq 0x4dfc(%rip), %rdx      # 0xd8b0
leaq 0x3f42(%rip), %rcx      # 0xc9fd
leaq 0x3f46(%rip), %r8       # 0xca08
jmp 0x8b4e
movq %r14, %rdi
movl %ebx, %esi
callq 0x8830
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x58b5
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x5c9f
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x89c1
jmp 0x8b67
movq %r14, %rdi
movl %ebx, %esi
callq 0x6a3b
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x6ea6
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x7315
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x76cb
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x79f2
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x7dfc
jmp 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x8282
jmp 0x8ae9
btl $0x10, %eax
jae 0x8ae9
movq %r14, %rdi
movl %ebx, %esi
callq 0x851a
jmp 0x8ae9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq