#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 */
typedef double nnet;

/* Variables and functions */
int /*<<< orphan*/ free(double *);
double *malloc(int);
double *nnet_alloc(int, int);
int /*<<< orphan*/ nnet_conc_fill_rand(double *);
int /*<<< orphan*/ nnet_fill_rand(double *);
int /*<<< orphan*/ nnet_free(double *);
double *nnet_read(char *);
int /*<<< orphan*/ nnet_write(double *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ produce(double *, double *);
int /*<<< orphan*/ train(double *, double *, double *);
int main(int argc, char *argv[]) {
  printf("alloc nnet\n");
  struct nnet *net = nnet_alloc(1000000, 100);
  printf("fill conc rand nnet\n");
  nnet_conc_fill_rand(net);
  printf("write net.bin\n");
  nnet_write(net, "net.bin");
  printf("free nnet\n");
  nnet_free(net);
  printf("read net.bin\n");
  net = nnet_read("net.bin");
  printf("free nnet\n");
  nnet_free(net);
  net = nnet_alloc(2, 2);
  nnet_fill_rand(net);
  double *features = malloc(sizeof(double) * 2);
  double *expected = malloc(sizeof(double) * 2);
  for (int i = 0; i < 1000; i++) {
    features[0] = 0;
    features[1] = 0;
    expected[0] = 0;
    expected[1] = 1;
    train(net, expected, features);
    features[0] = 0;
    features[1] = 1;
    expected[0] = 1;
    expected[1] = 0;
    train(net, expected, features);
    features[0] = 1;
    features[1] = 0;
    expected[0] = 1;
    expected[1] = 0;
    train(net, expected, features);
    features[0] = 1;
    features[1] = 1;
    expected[0] = 1;
    expected[1] = 0;
    train(net, expected, features);
  }
  features[0] = 0;
  features[1] = 0;
  produce(net, features);
  features[0] = 0;
  features[1] = 1;
  produce(net, features);
  features[0] = 1;
  features[1] = 0;
  produce(net, features);
  features[0] = 1;
  features[1] = 1;
  produce(net, features);
  free(features);
  free(expected);
  free(net);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe3b(%rip),%rdi
call   1050 <printf@plt>
mov    $0xf4240,%edi
mov    $0x64,%esi
call   1060 <nnet_alloc@plt>
mov    %rax,-0x18(%rbp)
lea    0xe28(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10c0 <nnet_conc_fill_rand@plt>
lea    0xe28(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe27(%rip),%rsi
call   10d0 <nnet_write@plt>
lea    0xe23(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <nnet_free@plt>
lea    0xe19(%rip),%rdi
call   1050 <printf@plt>
lea    0xdfa(%rip),%rdi
call   10b0 <nnet_read@plt>
mov    %rax,-0x18(%rbp)
lea    0xdf2(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <nnet_free@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1060 <nnet_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <nnet_fill_rand@plt>
mov    $0x10,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x10,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x3e8,-0x2c(%rbp)
jge    13d7 <main+0x227>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0xd2d(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1070 <train@plt>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xd00(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movsd  0xcef(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1070 <train@plt>
mov    -0x20(%rbp),%rax
movsd  0xcc2(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movsd  0xca6(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1070 <train@plt>
mov    -0x20(%rbp),%rax
movsd  0xc79(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xc69(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movsd  0xc58(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1070 <train@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1298 <main+0xe8>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <produce@plt>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xbee(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <produce@plt>
mov    -0x20(%rbp),%rax
movsd  0xbd0(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <produce@plt>
mov    -0x20(%rbp),%rax
movsd  0xba7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xb97(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <produce@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xe6f(%rip),%rdi
call   1040 <puts@plt>
mov    $0xf4240,%edi
mov    $0x64,%esi
call   1060 <nnet_alloc@plt>
mov    %rax,%rbx
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   10c0 <nnet_conc_fill_rand@plt>
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe63(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10d0 <nnet_write@plt>
lea    0xe59(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   10a0 <nnet_free@plt>
lea    0xe35(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   10b0 <nnet_read@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   10a0 <nnet_free@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1060 <nnet_alloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1090 <nnet_fill_rand@plt>
mov    $0x10,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    $0x10,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    $0x3e8,%ebp
xorps  %xmm0,%xmm0
movhps 0xd75(%rip),%xmm0
movaps %xmm0,(%rsp)
nop
xorps  %xmm0,%xmm0
movups %xmm0,(%rbx)
movaps (%rsp),%xmm0
movups %xmm0,(%r15)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <train@plt>
movaps (%rsp),%xmm0
movups %xmm0,(%rbx)
movsd  0xd45(%rip),%xmm0
movups %xmm0,(%r15)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <train@plt>
movsd  0xd2b(%rip),%xmm0
movups %xmm0,(%rbx)
movups %xmm0,(%r15)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <train@plt>
movaps 0xd1f(%rip),%xmm0
movups %xmm0,(%rbx)
movsd  0xd04(%rip),%xmm0
movups %xmm0,(%r15)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <train@plt>
add    $0xffffffff,%ebp
jne    1290 <main+0xe0>
xorps  %xmm0,%xmm0
movups %xmm0,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <produce@plt>
xorps  %xmm0,%xmm0
movhps 0xcce(%rip),%xmm0
movups %xmm0,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <produce@plt>
movsd  0xcb8(%rip),%xmm0
movups %xmm0,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <produce@plt>
movaps 0xcb3(%rip),%xmm0
movups %xmm0,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <produce@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.nnet = type opaque
@.str = [12 x i8] c"alloc nnet\0A\00"
@.str.1 = [21 x i8] c"fill conc rand nnet\0A\00"
@.str.2 = [15 x i8] c"write net.bin\0A\00"
@.str.3 = [8 x i8] c"net.bin\00"
@.str.4 = [11 x i8] c"free nnet\0A\00"
@.str.5 = [14 x i8] c"read net.bin\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.nnet*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%11 = call double* @nnet_alloc(i32 1000000, i32 100)
%12 = bitcast double* %11 to %struct.nnet*
store %struct.nnet* %12, %struct.nnet** %6
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%14 = load %struct.nnet*, %struct.nnet** %6
%15 = bitcast %struct.nnet* %14 to double*
%16 = call i32 @nnet_conc_fill_rand(double* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%18 = load %struct.nnet*, %struct.nnet** %6
%19 = bitcast %struct.nnet* %18 to double*
%20 = call i32 @nnet_write(double* %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%22 = load %struct.nnet*, %struct.nnet** %6
%23 = bitcast %struct.nnet* %22 to double*
%24 = call i32 @nnet_free(double* %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%26 = call double* @nnet_read(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%27 = bitcast double* %26 to %struct.nnet*
store %struct.nnet* %27, %struct.nnet** %6
%28 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%29 = load %struct.nnet*, %struct.nnet** %6
%30 = bitcast %struct.nnet* %29 to double*
%31 = call i32 @nnet_free(double* %30)
%32 = call double* @nnet_alloc(i32 2, i32 2)
%33 = bitcast double* %32 to %struct.nnet*
store %struct.nnet* %33, %struct.nnet** %6
%34 = load %struct.nnet*, %struct.nnet** %6
%35 = bitcast %struct.nnet* %34 to double*
%36 = call i32 @nnet_fill_rand(double* %35)
%37 = call double* @malloc(i32 16)
store double* %37, double** %7
%38 = call double* @malloc(i32 16)
store double* %38, double** %8
store i32 0, i32* %9
br label %39
39: ; preds = %95, %2
%40 = load i32, i32* %9
%41 = icmp slt i32 %40, 1000
br i1 %41, label %42, label %98
42: ; preds = %39
%43 = load double*, double** %7
%44 = getelementptr inbounds double, double* %43, i64 0
store double 0.000000e+00, double* %44
%45 = load double*, double** %7
%46 = getelementptr inbounds double, double* %45, i64 1
store double 0.000000e+00, double* %46
%47 = load double*, double** %8
%48 = getelementptr inbounds double, double* %47, i64 0
store double 0.000000e+00, double* %48
%49 = load double*, double** %8
%50 = getelementptr inbounds double, double* %49, i64 1
store double 1.000000e+00, double* %50
%51 = load %struct.nnet*, %struct.nnet** %6
%52 = bitcast %struct.nnet* %51 to double*
%53 = load double*, double** %8
%54 = load double*, double** %7
%55 = call i32 @train(double* %52, double* %53, double* %54)
%56 = load double*, double** %7
%57 = getelementptr inbounds double, double* %56, i64 0
store double 0.000000e+00, double* %57
%58 = load double*, double** %7
%59 = getelementptr inbounds double, double* %58, i64 1
store double 1.000000e+00, double* %59
%60 = load double*, double** %8
%61 = getelementptr inbounds double, double* %60, i64 0
store double 1.000000e+00, double* %61
%62 = load double*, double** %8
%63 = getelementptr inbounds double, double* %62, i64 1
store double 0.000000e+00, double* %63
%64 = load %struct.nnet*, %struct.nnet** %6
%65 = bitcast %struct.nnet* %64 to double*
%66 = load double*, double** %8
%67 = load double*, double** %7
%68 = call i32 @train(double* %65, double* %66, double* %67)
%69 = load double*, double** %7
%70 = getelementptr inbounds double, double* %69, i64 0
store double 1.000000e+00, double* %70
%71 = load double*, double** %7
%72 = getelementptr inbounds double, double* %71, i64 1
store double 0.000000e+00, double* %72
%73 = load double*, double** %8
%74 = getelementptr inbounds double, double* %73, i64 0
store double 1.000000e+00, double* %74
%75 = load double*, double** %8
%76 = getelementptr inbounds double, double* %75, i64 1
store double 0.000000e+00, double* %76
%77 = load %struct.nnet*, %struct.nnet** %6
%78 = bitcast %struct.nnet* %77 to double*
%79 = load double*, double** %8
%80 = load double*, double** %7
%81 = call i32 @train(double* %78, double* %79, double* %80)
%82 = load double*, double** %7
%83 = getelementptr inbounds double, double* %82, i64 0
store double 1.000000e+00, double* %83
%84 = load double*, double** %7
%85 = getelementptr inbounds double, double* %84, i64 1
store double 1.000000e+00, double* %85
%86 = load double*, double** %8
%87 = getelementptr inbounds double, double* %86, i64 0
store double 1.000000e+00, double* %87
%88 = load double*, double** %8
%89 = getelementptr inbounds double, double* %88, i64 1
store double 0.000000e+00, double* %89
%90 = load %struct.nnet*, %struct.nnet** %6
%91 = bitcast %struct.nnet* %90 to double*
%92 = load double*, double** %8
%93 = load double*, double** %7
%94 = call i32 @train(double* %91, double* %92, double* %93)
br label %95
95: ; preds = %42
%96 = load i32, i32* %9
%97 = add nsw i32 %96, 1
store i32 %97, i32* %9
br label %39
98: ; preds = %39
%99 = load double*, double** %7
%100 = getelementptr inbounds double, double* %99, i64 0
store double 0.000000e+00, double* %100
%101 = load double*, double** %7
%102 = getelementptr inbounds double, double* %101, i64 1
store double 0.000000e+00, double* %102
%103 = load %struct.nnet*, %struct.nnet** %6
%104 = bitcast %struct.nnet* %103 to double*
%105 = load double*, double** %7
%106 = call i32 @produce(double* %104, double* %105)
%107 = load double*, double** %7
%108 = getelementptr inbounds double, double* %107, i64 0
store double 0.000000e+00, double* %108
%109 = load double*, double** %7
%110 = getelementptr inbounds double, double* %109, i64 1
store double 1.000000e+00, double* %110
%111 = load %struct.nnet*, %struct.nnet** %6
%112 = bitcast %struct.nnet* %111 to double*
%113 = load double*, double** %7
%114 = call i32 @produce(double* %112, double* %113)
%115 = load double*, double** %7
%116 = getelementptr inbounds double, double* %115, i64 0
store double 1.000000e+00, double* %116
%117 = load double*, double** %7
%118 = getelementptr inbounds double, double* %117, i64 1
store double 0.000000e+00, double* %118
%119 = load %struct.nnet*, %struct.nnet** %6
%120 = bitcast %struct.nnet* %119 to double*
%121 = load double*, double** %7
%122 = call i32 @produce(double* %120, double* %121)
%123 = load double*, double** %7
%124 = getelementptr inbounds double, double* %123, i64 0
store double 1.000000e+00, double* %124
%125 = load double*, double** %7
%126 = getelementptr inbounds double, double* %125, i64 1
store double 1.000000e+00, double* %126
%127 = load %struct.nnet*, %struct.nnet** %6
%128 = bitcast %struct.nnet* %127 to double*
%129 = load double*, double** %7
%130 = call i32 @produce(double* %128, double* %129)
%131 = load double*, double** %7
%132 = call i32 @free(double* %131)
%133 = load double*, double** %8
%134 = call i32 @free(double* %133)
%135 = load %struct.nnet*, %struct.nnet** %6
%136 = bitcast %struct.nnet* %135 to double*
%137 = call i32 @free(double* %136)
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [8 x i8] c"net.bin\00"
@str = [11 x i8] c"alloc nnet\00"
@str.6 = [20 x i8] c"fill conc rand nnet\00"
@str.7 = [14 x i8] c"write net.bin\00"
@str.9 = [13 x i8] c"read net.bin\00"
@str.10 = [10 x i8] c"free nnet\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = tail call double* @nnet_alloc(i32 1000000, i32 100)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
%6 = tail call i32 @nnet_conc_fill_rand(double* %4)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.7, i64 0, i64 0))
%8 = tail call i32 @nnet_write(double* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 @nnet_free(double* %4)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.9, i64 0, i64 0))
%12 = tail call double* @nnet_read(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
%14 = tail call i32 @nnet_free(double* %12)
%15 = tail call double* @nnet_alloc(i32 2, i32 2)
%16 = tail call i32 @nnet_fill_rand(double* %15)
%17 = tail call double* @malloc(i32 16)
%18 = tail call double* @malloc(i32 16)
%19 = bitcast double* %17 to i8*
%20 = bitcast double* %18 to <2 x double>*
%21 = bitcast double* %17 to <2 x double>*
%22 = bitcast double* %18 to <2 x double>*
%23 = bitcast double* %17 to <2 x double>*
%24 = bitcast double* %18 to <2 x double>*
%25 = bitcast double* %17 to <2 x double>*
%26 = bitcast double* %18 to <2 x double>*
br label %39
27: ; preds = %39
%28 = bitcast double* %17 to i8*
%29 = tail call i32 @produce(double* %15, double* %17)
%30 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %30
%31 = tail call i32 @produce(double* %15, double* %17)
%32 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %32
%33 = tail call i32 @produce(double* %15, double* %17)
%34 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %34
%35 = tail call i32 @produce(double* %15, double* %17)
%36 = tail call i32 @free(double* %17)
%37 = tail call i32 @free(double* %18)
%38 = tail call i32 @free(double* %15)
ret i32 0
39: ; preds = %2, %39
%40 = phi i32 [ 0, %2 ], [ %45, %39 ]
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %20
%41 = tail call i32 @train(double* %15, double* %18, double* %17)
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %21
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %22
%42 = tail call i32 @train(double* %15, double* %18, double* %17)
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %23
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %24
%43 = tail call i32 @train(double* %15, double* %18, double* %17)
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %25
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %26
%44 = tail call i32 @train(double* %15, double* %18, double* %17)
%45 = add nuw nsw i32 %40, 1
%46 = icmp eq i32 %45, 1000
br i1 %46, label %27, label %39
}