#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void print_att_hist(char const *s, int att_hist[]) {
  fprintf(stderr, "\n%s\n", s);
  for (int i = 0; i < 37; ++i)
    fprintf(stderr, ">%3d dB: %5d smps\n", 3 - i, att_hist[i]);
}


x86 assembly (clang, -O0):
<print_att_hist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x25,-0x14(%rbp)
jge    1184 <print_att_hist+0x74>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    $0x3,%edx
sub    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <print_att_hist+0x32>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_att_hist>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r12
mov    %rdi,%rdx
mov    0x2ebb(%rip),%r15
mov    (%r15),%edi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x3,%ebp
lea    0xec3(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15),%edi
mov    (%r12,%rbx,4),%ecx
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x25,%rbx
jne    1150 <print_att_hist+0x40>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [19 x i8] c">%3d dB: %5d smps\0A\00"
define void @print_att_hist(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %3
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 0, i32* %5
br label %9
9: ; preds = %22, %2
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 37
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* @stderr
%14 = load i32, i32* %5
%15 = sub nsw i32 3, %14
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %9
25: ; preds = %9
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [19 x i8] c">%3d dB: %5d smps\0A\00"
define void @print_att_hist(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
5: ; preds = %6
ret void
6: ; preds = %2, %6
%7 = phi i64 [ 0, %2 ], [ %14, %6 ]
%8 = load i32, i32* @stderr
%9 = getelementptr inbounds i32, i32* %1, i64 %7
%10 = load i32, i32* %9
%11 = trunc i64 %7 to i32
%12 = sub i32 3, %11
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %10)
%14 = add nuw nsw i64 %7, 1
%15 = icmp eq i64 %14, 37
br i1 %15, label %5, label %6
}