#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*/ printf(char *, ...);
void print_bin_filters(int bin_fil_w[3][5][5], double alphas[3]) {
  for (int k = 0; k < 3; ++k) {
    printf("k=%d, alpha=%f\nweights:\n", k, alphas[k]);
    for (int i = 0; i < 5; ++i) {
      for (int j = 0; j < 5; ++j) {
        printf("%3d, ", bin_fil_w[k][i][j]);
      }
      printf("\n");
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_bin_filters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11e6 <print_bin_filters+0xd6>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    11ca <print_bin_filters+0xba>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
jge    11ae <print_bin_filters+0x9e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1167 <print_bin_filters+0x57>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1156 <print_bin_filters+0x46>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_bin_filters+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bin_filters>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x60,%rbx
lea    0xec6(%rip),%r15
lea    0xed8(%rip),%r12
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r14,%r13,8),%xmm0
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x60(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x5c(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x58(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x54(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x50(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4c(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x48(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x44(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x40(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x3c(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x38(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x34(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x30(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x2c(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x28(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x24(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x20(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x1c(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x18(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x14(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0xc(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x8(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x4(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
add    $0x64,%rbx
cmp    $0x3,%r13
jne    1150 <print_bin_filters+0x30>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c"k=%d, alpha=%f\0Aweights:\0A\00"
@.str.1 = [6 x i8] c"%3d, \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_bin_filters([5 x [5 x i32]]* %0, double* %1) {
%3 = alloca [5 x [5 x i32]]*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store [5 x [5 x i32]]* %0, [5 x [5 x i32]]** %3
store double* %1, double** %4
store i32 0, i32* %5
br label %8
8: ; preds = %49, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %52
11: ; preds = %8
%12 = load i32, i32* %5
%13 = load double*, double** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %12, double %17)
store i32 0, i32* %6
br label %19
19: ; preds = %44, %11
%20 = load i32, i32* %6
%21 = icmp slt i32 %20, 5
br i1 %21, label %22, label %47
22: ; preds = %19
store i32 0, i32* %7
br label %23
23: ; preds = %39, %22
%24 = load i32, i32* %7
%25 = icmp slt i32 %24, 5
br i1 %25, label %26, label %42
26: ; preds = %23
%27 = load [5 x [5 x i32]]*, [5 x [5 x i32]]** %3
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %27, i64 %29
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %30, i64 0, i64 %32
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [5 x i32], [5 x i32]* %33, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %26
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %23
42: ; preds = %23
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %44
44: ; preds = %42
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %19
47: ; preds = %19
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %49
49: ; preds = %47
%50 = load i32, i32* %5
%51 = add nsw i32 %50, 1
store i32 %51, i32* %5
br label %8
52: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"k=%d, alpha=%f\0Aweights:\0A\00"
@.str.1 = [6 x i8] c"%3d, \00"
define void @print_bin_filters([5 x [5 x i32]]* nocapture %0, double* nocapture %1) {
br label %4
3: ; preds = %4
ret void
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %91, %4 ]
%6 = getelementptr inbounds double, double* %1, i64 %5
%7 = load double, double* %6
%8 = trunc i64 %5 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %8, double %7)
%10 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 0, i64 0
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 0, i64 1
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 0, i64 2
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 0, i64 3
%20 = load i32, i32* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 0, i64 4
%23 = load i32, i32* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = tail call i32 @putchar(i32 10)
%26 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 1, i64 0
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 1, i64 1
%30 = load i32, i32* %29
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 1, i64 2
%33 = load i32, i32* %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 1, i64 3
%36 = load i32, i32* %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 1, i64 4
%39 = load i32, i32* %38
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = tail call i32 @putchar(i32 10)
%42 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 2, i64 0
%43 = load i32, i32* %42
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 2, i64 1
%46 = load i32, i32* %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 2, i64 2
%49 = load i32, i32* %48
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 2, i64 3
%52 = load i32, i32* %51
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 2, i64 4
%55 = load i32, i32* %54
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %55)
%57 = tail call i32 @putchar(i32 10)
%58 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 3, i64 0
%59 = load i32, i32* %58
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %59)
%61 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 3, i64 1
%62 = load i32, i32* %61
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 3, i64 2
%65 = load i32, i32* %64
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %65)
%67 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 3, i64 3
%68 = load i32, i32* %67
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %68)
%70 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 3, i64 4
%71 = load i32, i32* %70
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %71)
%73 = tail call i32 @putchar(i32 10)
%74 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 4, i64 0
%75 = load i32, i32* %74
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %75)
%77 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 4, i64 1
%78 = load i32, i32* %77
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %78)
%80 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 4, i64 2
%81 = load i32, i32* %80
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %81)
%83 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 4, i64 3
%84 = load i32, i32* %83
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %84)
%86 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %0, i64 %5, i64 4, i64 4
%87 = load i32, i32* %86
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %87)
%89 = tail call i32 @putchar(i32 10)
%90 = tail call i32 @putchar(i32 10)
%91 = add nuw nsw i64 %5, 1
%92 = icmp eq i64 %91, 3
br i1 %92, label %3, label %4
}