#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*/ RELU(double *, double *, int);
int /*<<< orphan*/ get_delta_matrix_weights1(double *, double *, double *);
int /*<<< orphan*/ get_delta_matrix_weights2(double *, double *, double *);
int /*<<< orphan*/ get_delta_matrix_weights3(double *, double *, double *);
int /*<<< orphan*/ get_oracle_activations1(double *, double *, double *,
                                           double *);
int /*<<< orphan*/ get_oracle_activations2(double *, double *, double *,
                                           double *);
int /*<<< orphan*/ matrix_vector_product_with_bias_input_layer(double *,
                                                               double *,
                                                               double *,
                                                               double *);
int /*<<< orphan*/ matrix_vector_product_with_bias_output_layer(double *,
                                                                double *,
                                                                double *,
                                                                double *);
int /*<<< orphan*/ matrix_vector_product_with_bias_second_layer(double *,
                                                                double *,
                                                                double *,
                                                                double *);
int /*<<< orphan*/ soft_max(double *, double *);
int /*<<< orphan*/ take_difference(double *, double *, double *, double *);
int /*<<< orphan*/ update_weights(double *, double *, double *, double *,
                                  double *, double *, double *, double *,
                                  double *, double *, double *, double *);
void backprop(double weights1[13 * 64], double weights2[64 * 64],
              double weights3[64 * 3], double biases1[64], double biases2[64],
              double biases3[3], double training_data[163 * 13],
              double training_targets[163 * 3]) {
  int i, j;
  double activations1[64];
  double activations2[64];
  double activations3[3];
  double dactivations1[64];
  double dactivations2[64];
  double dactivations3[3];
  double net_outputs[3];
  double output_difference[3];
  double delta_weights1[13 * 64];
  double delta_weights2[64 * 64];
  double delta_weights3[64 * 3];
  double oracle_activations1[64];
  double oracle_activations2[64];
  for (i = 0; i < 163; i++) {
    for (j = 0; j < 64; j++) {
      activations1[j] = (double)0.0;
      activations2[j] = (double)0.0;
      if (j < 3) {
        activations3[j] = (double)0.0;
      }
    }
    matrix_vector_product_with_bias_input_layer(biases1, weights1, activations1,
                                                &training_data[i * 13]);
    RELU(activations1, dactivations1, 64);
    matrix_vector_product_with_bias_second_layer(biases2, weights2,
                                                 activations2, activations1);
    RELU(activations2, dactivations2, 64);
    matrix_vector_product_with_bias_output_layer(biases3, weights3,
                                                 activations3, activations2);
    RELU(activations3, dactivations3, 3);
    soft_max(net_outputs, activations3);
    take_difference(net_outputs, &training_targets[i * 3], output_difference,
                    dactivations3);
    get_delta_matrix_weights3(delta_weights3, output_difference, activations2);
    get_oracle_activations2(weights3, output_difference, oracle_activations2,
                            dactivations2);
    get_delta_matrix_weights2(delta_weights2, oracle_activations2,
                              activations1);
    get_oracle_activations1(weights2, oracle_activations2, oracle_activations1,
                            dactivations1);
    get_delta_matrix_weights1(delta_weights1, oracle_activations1,
                              &training_data[i * 13]);
    update_weights(weights1, weights2, weights3, delta_weights1, delta_weights2,
                   delta_weights3, biases1, biases2, biases3,
                   oracle_activations1, oracle_activations2, output_difference);
  }
}


x86 assembly (clang, -O0):
<backprop>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xace8,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0xa3,-0x4c(%rbp)
jge    1449 <backprop+0x289>
movl   $0x0,-0x50(%rbp)
cmpl   $0x40,-0x50(%rbp)
jge    1262 <backprop+0xa2>
movslq -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x250(%rbp,%rax,8)
ff ff
movslq -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x450(%rbp,%rax,8)
ff ff
cmpl   $0x3,-0x50(%rbp)
jge    124f <backprop+0x8f>
movslq -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x470(%rbp,%rax,8)
ff ff
jmp    1254 <backprop+0x94>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    120b <backprop+0x4b>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x250(%rbp),%rdx
mov    0x10(%rbp),%rcx
imul   $0xd,-0x4c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1090 <matrix_vector_product_with_bias_input_layer@plt>
lea    -0x250(%rbp),%rdi
lea    -0x670(%rbp),%rsi
mov    $0x40,%edx
call   10b0 <RELU@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x450(%rbp),%rdx
lea    -0x250(%rbp),%rcx
call   1080 <matrix_vector_product_with_bias_second_layer@plt>
lea    -0x450(%rbp),%rdi
lea    -0x870(%rbp),%rsi
mov    $0x40,%edx
call   10b0 <RELU@plt>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x470(%rbp),%rdx
lea    -0x450(%rbp),%rcx
call   10e0 <matrix_vector_product_with_bias_output_layer@plt>
lea    -0x470(%rbp),%rdi
lea    -0x890(%rbp),%rsi
mov    $0x3,%edx
call   10b0 <RELU@plt>
lea    -0x8b0(%rbp),%rdi
lea    -0x470(%rbp),%rsi
call   1030 <soft_max@plt>
lea    -0x8b0(%rbp),%rdi
mov    0x18(%rbp),%rsi
imul   $0x3,-0x4c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x8d0(%rbp),%rdx
lea    -0x890(%rbp),%rcx
call   10a0 <take_difference@plt>
lea    -0xa8d0(%rbp),%rdi
lea    -0x8d0(%rbp),%rsi
lea    -0x450(%rbp),%rdx
call   1050 <get_delta_matrix_weights3@plt>
mov    -0x30(%rbp),%rdi
lea    -0x8d0(%rbp),%rsi
lea    -0xacd0(%rbp),%rdx
lea    -0x870(%rbp),%rcx
call   10c0 <get_oracle_activations2@plt>
lea    -0xa2d0(%rbp),%rdi
lea    -0xacd0(%rbp),%rsi
lea    -0x250(%rbp),%rdx
call   10d0 <get_delta_matrix_weights2@plt>
mov    -0x28(%rbp),%rdi
lea    -0xacd0(%rbp),%rsi
lea    -0xaad0(%rbp),%rdx
lea    -0x670(%rbp),%rcx
call   1070 <get_oracle_activations1@plt>
lea    -0x22d0(%rbp),%rdi
lea    -0xaad0(%rbp),%rsi
mov    0x10(%rbp),%rdx
imul   $0xd,-0x4c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
call   1060 <get_delta_matrix_weights1@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x22d0(%rbp),%rcx
lea    -0xa2d0(%rbp),%r8
lea    -0xa8d0(%rbp),%r9
mov    -0x38(%rbp),%r15
mov    -0x40(%rbp),%r14
mov    -0x48(%rbp),%rbx
lea    -0xaad0(%rbp),%r11
lea    -0xacd0(%rbp),%r10
lea    -0x8d0(%rbp),%rax
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1040 <update_weights@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11f7 <backprop+0x37>
add    $0xace8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<backprop>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xacc8,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x20(%rsp)
mov    %rcx,0x18(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,0x8(%rsp)
mov    0xad00(%rsp),%r14
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %rbp,0x38(%rsp)
mov    $0x200,%edx
lea    0x4c0(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
mov    $0x200,%edx
lea    0xac0(%rsp),%r13
mov    %r13,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   10a0 <matrix_vector_product_with_bias_input_layer@plt>
mov    %rbx,%rdi
lea    0x2c0(%rsp),%rsi
mov    $0x40,%edx
call   10c0 <RELU@plt>
mov    0x20(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1090 <matrix_vector_product_with_bias_second_layer@plt>
mov    %r13,%rdi
lea    0xc0(%rsp),%rsi
mov    $0x40,%edx
call   10c0 <RELU@plt>
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rbx
mov    %rbx,%rsi
lea    0x40(%rsp),%r15
mov    %r15,%rdx
mov    %r13,%rcx
call   10f0 <matrix_vector_product_with_bias_output_layer@plt>
mov    %r15,%rdi
lea    0x80(%rsp),%rsi
mov    $0x3,%edx
call   10c0 <RELU@plt>
lea    0xa0(%rsp),%r12
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <soft_max@plt>
mov    0xad08(%rsp),%rax
lea    (%rax,%rbp,1),%rsi
mov    %r12,%rdi
lea    0x60(%rsp),%r15
mov    %r15,%rdx
lea    0x80(%rsp),%rcx
call   10b0 <take_difference@plt>
lea    0xcc0(%rsp),%rdi
mov    %r15,%rsi
mov    %r13,%rdx
call   1050 <get_delta_matrix_weights3@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
lea    0x6c0(%rsp),%rbp
mov    %rbp,%rdx
lea    0xc0(%rsp),%rcx
call   10d0 <get_oracle_activations2@plt>
lea    0x2cc0(%rsp),%rdi
mov    %rbp,%rsi
lea    0x4c0(%rsp),%rdx
call   10e0 <get_delta_matrix_weights2@plt>
mov    0x10(%rsp),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
lea    0x8c0(%rsp),%r15
mov    %r15,%rdx
lea    0x2c0(%rsp),%rcx
call   1070 <get_oracle_activations1@plt>
lea    0x12c0(%rsp),%r13
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1060 <get_delta_matrix_weights1@plt>
mov    0x8(%rsp),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
lea    0x2cc0(%rsp),%r8
lea    0xcc0(%rsp),%r9
lea    0x60(%rsp),%rax
push   %rax
push   %rbp
mov    0x48(%rsp),%rbp
push   %r15
push   0x40(%rsp)
push   0x40(%rsp)
push   0x40(%rsp)
call   1040 <update_weights@plt>
add    $0x30,%rsp
add    $0x18,%rbp
add    $0x68,%r14
cmp    $0xf48,%rbp
jne    1210 <backprop+0x40>
add    $0xacc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @backprop(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca [64 x double]
%20 = alloca [64 x double]
%21 = alloca [3 x double]
%22 = alloca [64 x double]
%23 = alloca [64 x double]
%24 = alloca [3 x double]
%25 = alloca [3 x double]
%26 = alloca [3 x double]
%27 = alloca [832 x double]
%28 = alloca [4096 x double]
%29 = alloca [192 x double]
%30 = alloca [64 x double]
%31 = alloca [64 x double]
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
store i32 0, i32* %17
br label %32
32: ; preds = %136, %8
%33 = load i32, i32* %17
%34 = icmp slt i32 %33, 163
br i1 %34, label %35, label %139
35: ; preds = %32
store i32 0, i32* %18
br label %36
36: ; preds = %53, %35
%37 = load i32, i32* %18
%38 = icmp slt i32 %37, 64
br i1 %38, label %39, label %56
39: ; preds = %36
%40 = load i32, i32* %18
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 %41
store double 0.000000e+00, double* %42
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 %44
store double 0.000000e+00, double* %45
%46 = load i32, i32* %18
%47 = icmp slt i32 %46, 3
br i1 %47, label %48, label %52
48: ; preds = %39
%49 = load i32, i32* %18
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %50
store double 0.000000e+00, double* %51
br label %52
52: ; preds = %48, %39
br label %53
53: ; preds = %52
%54 = load i32, i32* %18
%55 = add nsw i32 %54, 1
store i32 %55, i32* %18
br label %36
56: ; preds = %36
%57 = load double*, double** %12
%58 = load double*, double** %9
%59 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 0
%60 = load double*, double** %15
%61 = load i32, i32* %17
%62 = mul nsw i32 %61, 13
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %60, i64 %63
%65 = call i32 @matrix_vector_product_with_bias_input_layer(double* %57, double* %58, double* %59, double* %64)
%66 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 0
%67 = getelementptr inbounds [64 x double], [64 x double]* %22, i64 0, i64 0
%68 = call i32 @RELU(double* %66, double* %67, i32 64)
%69 = load double*, double** %13
%70 = load double*, double** %10
%71 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 0
%72 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 0
%73 = call i32 @matrix_vector_product_with_bias_second_layer(double* %69, double* %70, double* %71, double* %72)
%74 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 0
%75 = getelementptr inbounds [64 x double], [64 x double]* %23, i64 0, i64 0
%76 = call i32 @RELU(double* %74, double* %75, i32 64)
%77 = load double*, double** %14
%78 = load double*, double** %11
%79 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%80 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 0
%81 = call i32 @matrix_vector_product_with_bias_output_layer(double* %77, double* %78, double* %79, double* %80)
%82 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%83 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
%84 = call i32 @RELU(double* %82, double* %83, i32 3)
%85 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 0
%86 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%87 = call i32 @soft_max(double* %85, double* %86)
%88 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 0
%89 = load double*, double** %16
%90 = load i32, i32* %17
%91 = mul nsw i32 %90, 3
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %89, i64 %92
%94 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 0
%95 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
%96 = call i32 @take_difference(double* %88, double* %93, double* %94, double* %95)
%97 = getelementptr inbounds [192 x double], [192 x double]* %29, i64 0, i64 0
%98 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 0
%99 = getelementptr inbounds [64 x double], [64 x double]* %20, i64 0, i64 0
%100 = call i32 @get_delta_matrix_weights3(double* %97, double* %98, double* %99)
%101 = load double*, double** %11
%102 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 0
%103 = getelementptr inbounds [64 x double], [64 x double]* %31, i64 0, i64 0
%104 = getelementptr inbounds [64 x double], [64 x double]* %23, i64 0, i64 0
%105 = call i32 @get_oracle_activations2(double* %101, double* %102, double* %103, double* %104)
%106 = getelementptr inbounds [4096 x double], [4096 x double]* %28, i64 0, i64 0
%107 = getelementptr inbounds [64 x double], [64 x double]* %31, i64 0, i64 0
%108 = getelementptr inbounds [64 x double], [64 x double]* %19, i64 0, i64 0
%109 = call i32 @get_delta_matrix_weights2(double* %106, double* %107, double* %108)
%110 = load double*, double** %10
%111 = getelementptr inbounds [64 x double], [64 x double]* %31, i64 0, i64 0
%112 = getelementptr inbounds [64 x double], [64 x double]* %30, i64 0, i64 0
%113 = getelementptr inbounds [64 x double], [64 x double]* %22, i64 0, i64 0
%114 = call i32 @get_oracle_activations1(double* %110, double* %111, double* %112, double* %113)
%115 = getelementptr inbounds [832 x double], [832 x double]* %27, i64 0, i64 0
%116 = getelementptr inbounds [64 x double], [64 x double]* %30, i64 0, i64 0
%117 = load double*, double** %15
%118 = load i32, i32* %17
%119 = mul nsw i32 %118, 13
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %117, i64 %120
%122 = call i32 @get_delta_matrix_weights1(double* %115, double* %116, double* %121)
%123 = load double*, double** %9
%124 = load double*, double** %10
%125 = load double*, double** %11
%126 = getelementptr inbounds [832 x double], [832 x double]* %27, i64 0, i64 0
%127 = getelementptr inbounds [4096 x double], [4096 x double]* %28, i64 0, i64 0
%128 = getelementptr inbounds [192 x double], [192 x double]* %29, i64 0, i64 0
%129 = load double*, double** %12
%130 = load double*, double** %13
%131 = load double*, double** %14
%132 = getelementptr inbounds [64 x double], [64 x double]* %30, i64 0, i64 0
%133 = getelementptr inbounds [64 x double], [64 x double]* %31, i64 0, i64 0
%134 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 0
%135 = call i32 @update_weights(double* %123, double* %124, double* %125, double* %126, double* %127, double* %128, double* %129, double* %130, double* %131, double* %132, double* %133, double* %134)
br label %136
136: ; preds = %56
%137 = load i32, i32* %17
%138 = add nsw i32 %137, 1
store i32 %138, i32* %17
br label %32
139: ; preds = %32
ret void
}

LLVM IR (-O2):
define void @backprop(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca [64 x double]
%10 = bitcast [64 x double]* %9 to i8*
%11 = alloca [64 x double]
%12 = bitcast [64 x double]* %11 to i8*
%13 = alloca [3 x double]
%14 = alloca [64 x double]
%15 = alloca [64 x double]
%16 = alloca [3 x double]
%17 = alloca [3 x double]
%18 = alloca [3 x double]
%19 = alloca [832 x double]
%20 = alloca [4096 x double]
%21 = alloca [192 x double]
%22 = alloca [64 x double]
%23 = alloca [64 x double]
%24 = bitcast [3 x double]* %13 to i8*
%25 = bitcast [64 x double]* %14 to i8*
%26 = bitcast [64 x double]* %15 to i8*
%27 = bitcast [3 x double]* %16 to i8*
%28 = bitcast [3 x double]* %17 to i8*
%29 = bitcast [3 x double]* %18 to i8*
%30 = bitcast [832 x double]* %19 to i8*
%31 = bitcast [4096 x double]* %20 to i8*
%32 = bitcast [192 x double]* %21 to i8*
%33 = bitcast [64 x double]* %22 to i8*
%34 = bitcast [64 x double]* %23 to i8*
%35 = getelementptr inbounds [64 x double], [64 x double]* %9, i64 0, i64 0
%36 = getelementptr inbounds [64 x double], [64 x double]* %14, i64 0, i64 0
%37 = getelementptr inbounds [64 x double], [64 x double]* %11, i64 0, i64 0
%38 = getelementptr inbounds [64 x double], [64 x double]* %15, i64 0, i64 0
%39 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%40 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%41 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
%42 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 0
%43 = getelementptr inbounds [192 x double], [192 x double]* %21, i64 0, i64 0
%44 = getelementptr inbounds [64 x double], [64 x double]* %23, i64 0, i64 0
%45 = getelementptr inbounds [4096 x double], [4096 x double]* %20, i64 0, i64 0
%46 = getelementptr inbounds [64 x double], [64 x double]* %22, i64 0, i64 0
%47 = getelementptr inbounds [832 x double], [832 x double]* %19, i64 0, i64 0
%48 = bitcast [3 x double]* %13 to i8*
br label %49
49: ; preds = %49, %8
%50 = phi i64 [ 0, %8 ], [ %69, %49 ]
%51 = mul nuw nsw i64 %50, 13
%52 = getelementptr inbounds double, double* %6, i64 %51
%53 = call i32 @matrix_vector_product_with_bias_input_layer(double* %3, double* %0, double* %35, double* %52)
%54 = call i32 @RELU(double* %35, double* %36, i32 64)
%55 = call i32 @matrix_vector_product_with_bias_second_layer(double* %4, double* %1, double* %37, double* %35)
%56 = call i32 @RELU(double* %37, double* %38, i32 64)
%57 = call i32 @matrix_vector_product_with_bias_output_layer(double* %5, double* %2, double* %39, double* %37)
%58 = call i32 @RELU(double* %39, double* %40, i32 3)
%59 = call i32 @soft_max(double* %41, double* %39)
%60 = mul nuw nsw i64 %50, 3
%61 = getelementptr inbounds double, double* %7, i64 %60
%62 = call i32 @take_difference(double* %41, double* %61, double* %42, double* %40)
%63 = call i32 @get_delta_matrix_weights3(double* %43, double* %42, double* %37)
%64 = call i32 @get_oracle_activations2(double* %2, double* %42, double* %44, double* %38)
%65 = call i32 @get_delta_matrix_weights2(double* %45, double* %44, double* %35)
%66 = call i32 @get_oracle_activations1(double* %1, double* %44, double* %46, double* %36)
%67 = call i32 @get_delta_matrix_weights1(double* %47, double* %46, double* %52)
%68 = call i32 @update_weights(double* %0, double* %1, double* %2, double* %47, double* %45, double* %43, double* %3, double* %4, double* %5, double* %46, double* %44, double* %42)
%69 = add nuw nsw i64 %50, 1
%70 = icmp eq i64 %69, 163
br i1 %70, label %71, label %49
71: ; preds = %49
ret void
}