#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 */
double AT_histoOld_get_bin_width(long const, double const *, long);
void AT_histoOld_get_bin_widths(const long number_of_bins,
                                const double bin_centers[],
                                double bin_widths[]) {
  long i;
  for (i = 0; i < number_of_bins; i++) {
    bin_widths[i] = AT_histoOld_get_bin_width(number_of_bins, bin_centers, i);
  }
}


x86 assembly (clang, -O0):
<AT_histoOld_get_bin_widths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1169 <AT_histoOld_get_bin_widths+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <AT_histoOld_get_bin_width@plt>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <AT_histoOld_get_bin_widths+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT_histoOld_get_bin_widths>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
jle    114d <AT_histoOld_get_bin_widths+0x3d>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <AT_histoOld_get_bin_width@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <AT_histoOld_get_bin_widths+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @AT_histoOld_get_bin_widths(i64 %0, double* %1, double* %2) {
%4 = alloca i64
%5 = alloca double*
%6 = alloca double*
%7 = alloca i64
store i64 %0, i64* %4
store double* %1, double** %5
store double* %2, double** %6
store i64 0, i64* %7
br label %8
8: ; preds = %20, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %4
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i64, i64* %4
%14 = load double*, double** %5
%15 = load i64, i64* %7
%16 = call double @AT_histoOld_get_bin_width(i64 %13, double* %14, i64 %15)
%17 = load double*, double** %6
%18 = load i64, i64* %7
%19 = getelementptr inbounds double, double* %17, i64 %18
store double %16, double* %19
br label %20
20: ; preds = %12
%21 = load i64, i64* %7
%22 = add nsw i64 %21, 1
store i64 %22, i64* %7
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @AT_histoOld_get_bin_widths(i64 %0, double* %1, double* nocapture writeonly %2) {
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ 0, %3 ]
%7 = tail call double @AT_histoOld_get_bin_width(i64 %0, double* %1, i64 %6)
%8 = getelementptr inbounds double, double* %2, i64 %6
store double %7, double* %8
%9 = add nuw nsw i64 %6, 1
%10 = icmp eq i64 %9, %0
br i1 %10, label %11, label %5
11: ; preds = %5, %3
ret void
}