Program: tiny-NN

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function g_deriv
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0xbff0000000000000              ## double -1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_g_deriv
	.p2align	4, 0x90
_g_deriv:                               ## @g_deriv
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movsd	%xmm0, -8(%rbp)
	movsd	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-8(%rbp), %xmm0
	callq	_libmin_exp
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	-16(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function g
LCPI1_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI1_1:
	.quad	0xbff0000000000000              ## double -1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_g
	.p2align	4, 0x90
_g:                                     ## @g
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movsd	%xmm0, -8(%rbp)
	movsd	LCPI1_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-8(%rbp), %xmm0
	callq	_libmin_exp
	movsd	LCPI1_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	movsd	LCPI1_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_sampleSine                     ## -- Begin function sampleSine
	.p2align	4, 0x90
_sampleSine:                            ## @sampleSine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$64, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movsd	%xmm0, -24(%rbp)
	movsd	%xmm1, -32(%rbp)
	movl	%edx, -36(%rbp)
	movsd	-32(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-24(%rbp), %xmm1                ## xmm1 = mem[0],zero
	subsd	%xmm1, %xmm0
	movl	-36(%rbp), %eax
                                        ## kill: def $rax killed $eax
	cvtsi2sd	%rax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -48(%rbp)
	movl	$0, -52(%rbp)
LBB2_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jae	LBB2_4
## %bb.2:                               ##   in Loop: Header=BB2_1 Depth=1
	movsd	-24(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movsd	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movl	-52(%rbp), %eax
                                        ## kill: def $rax killed $eax
	cvtsi2sd	%rax, %xmm2
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movq	-8(%rbp), %rax
	movl	-52(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	movsd	%xmm0, (%rax,%rcx,8)
	movq	-8(%rbp), %rax
	movl	-52(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	movsd	(%rax,%rcx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_libmin_sin
	movq	-16(%rbp), %rax
	movl	-52(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	movsd	%xmm0, (%rax,%rcx,8)
## %bb.3:                               ##   in Loop: Header=BB2_1 Depth=1
	movl	-52(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52(%rbp)
	jmp	LBB2_1
LBB2_4:
	addq	$64, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function fillArrayRand
LCPI3_0:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI3_1:
	.quad	0x41dfffffffc00000              ## double 2147483647
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_fillArrayRand
	.p2align	4, 0x90
_fillArrayRand:                         ## @fillArrayRand
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	$0, -16(%rbp)
LBB3_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jae	LBB3_4
## %bb.2:                               ##   in Loop: Header=BB3_1 Depth=1
	callq	_libmin_rand
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	cvtsi2sd	%rax, %xmm0
	movsd	LCPI3_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm1, %xmm0
	movsd	LCPI3_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm1, %xmm0
	movq	-8(%rbp), %rax
	movl	-16(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	movsd	%xmm0, (%rax,%rcx,8)
## %bb.3:                               ##   in Loop: Header=BB3_1 Depth=1
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	LBB3_1
LBB3_4:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_fillArrayNull                  ## -- Begin function fillArrayNull
	.p2align	4, 0x90
_fillArrayNull:                         ## @fillArrayNull
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	$0, -16(%rbp)
LBB4_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jae	LBB4_4
## %bb.2:                               ##   in Loop: Header=BB4_1 Depth=1
	movq	-8(%rbp), %rax
	movl	-16(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	xorps	%xmm0, %xmm0
	movsd	%xmm0, (%rax,%rcx,8)
## %bb.3:                               ##   in Loop: Header=BB4_1 Depth=1
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	LBB4_1
LBB4_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function train
LCPI5_0:
	.quad	0x40091eb851eb851f              ## double 3.1400000000000001
LCPI5_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_train
	.p2align	4, 0x90
_train:                                 ## @train
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$1728, %rsp                     ## imm = 0x6C0
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movsd	%xmm0, -1624(%rbp)
	movsd	%xmm1, -1632(%rbp)
	movsd	%xmm2, -1640(%rbp)
	movsd	%xmm3, -1648(%rbp)
	movsd	LCPI5_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	addsd	-1632(%rbp), %xmm0
	movsd	%xmm0, -1656(%rbp)
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -1664(%rbp)
	leaq	-656(%rbp), %rdi
	movl	$40, %esi
	callq	_fillArrayRand
	leaq	-816(%rbp), %rdi
	movl	$20, %esi
	callq	_fillArrayRand
	leaq	-1136(%rbp), %rdi
	movl	$40, %esi
	callq	_fillArrayNull
	leaq	-1296(%rbp), %rdi
	movl	$20, %esi
	callq	_fillArrayNull
	leaq	-176(%rbp), %rdi
	leaq	-336(%rbp), %rsi
	xorps	%xmm0, %xmm0
	movsd	LCPI5_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movl	$20, %edx
	callq	_sampleSine
	movl	$0, -1708(%rbp)
LBB5_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB5_5 Depth 2
                                        ##       Child Loop BB5_7 Depth 3
                                        ##       Child Loop BB5_11 Depth 3
	movsd	-1656(%rbp), %xmm0              ## xmm0 = mem[0],zero
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	ucomisd	-1632(%rbp), %xmm0
	movb	%al, -1717(%rbp)                ## 1-byte Spill
	jbe	LBB5_3
## %bb.2:                               ##   in Loop: Header=BB5_1 Depth=1
	cmpl	$10, -1708(%rbp)
	setb	%al
	movb	%al, -1717(%rbp)                ## 1-byte Spill
LBB5_3:                                 ##   in Loop: Header=BB5_1 Depth=1
	movb	-1717(%rbp), %al                ## 1-byte Reload
	testb	$1, %al
	jne	LBB5_4
	jmp	LBB5_17
LBB5_4:                                 ##   in Loop: Header=BB5_1 Depth=1
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -1656(%rbp)
	movl	$0, -1712(%rbp)
LBB5_5:                                 ##   Parent Loop BB5_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB5_7 Depth 3
                                        ##       Child Loop BB5_11 Depth 3
	cmpl	$20, -1712(%rbp)
	jae	LBB5_16
## %bb.6:                               ##   in Loop: Header=BB5_5 Depth=2
	movl	$0, -1716(%rbp)
LBB5_7:                                 ##   Parent Loop BB5_1 Depth=1
                                        ##     Parent Loop BB5_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	$20, -1716(%rbp)
	jae	LBB5_10
## %bb.8:                               ##   in Loop: Header=BB5_7 Depth=3
	movl	-1712(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	-176(%rbp,%rax,8), %xmm0        ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movsd	-656(%rbp,%rax,8), %xmm2        ## xmm2 = mem[0],zero
	movsd	-1640(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	addl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	mulsd	-656(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1688(%rbp)
	movsd	-1688(%rbp), %xmm0              ## xmm0 = mem[0],zero
	callq	_g
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	%xmm0, -1456(%rbp,%rax,8)
	movsd	-1688(%rbp), %xmm0              ## xmm0 = mem[0],zero
	callq	_g_deriv
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	%xmm0, -1616(%rbp,%rax,8)
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	-816(%rbp,%rax,8), %xmm0        ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	-1456(%rbp,%rax,8), %xmm2       ## xmm2 = mem[0],zero
	movsd	-1664(%rbp), %xmm1              ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1664(%rbp)
## %bb.9:                               ##   in Loop: Header=BB5_7 Depth=3
	movl	-1716(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -1716(%rbp)
	jmp	LBB5_7
LBB5_10:                                ##   in Loop: Header=BB5_5 Depth=2
	movsd	-1664(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1712(%rbp), %eax
                                        ## kill: def $rax killed $eax
	subsd	-336(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1672(%rbp)
	movsd	-1672(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movsd	-1672(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1656(%rbp), %xmm1              ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1656(%rbp)
	movl	$0, -1716(%rbp)
LBB5_11:                                ##   Parent Loop BB5_1 Depth=1
                                        ##     Parent Loop BB5_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	$20, -1716(%rbp)
	jae	LBB5_14
## %bb.12:                              ##   in Loop: Header=BB5_11 Depth=3
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	-1616(%rbp,%rax,8), %xmm0       ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	mulsd	-816(%rbp,%rax,8), %xmm0
	mulsd	-1672(%rbp), %xmm0
	movsd	%xmm0, -1680(%rbp)
	movsd	-1672(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1456(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1696(%rbp)
	movsd	-1696(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1296(%rbp,%rax,8), %xmm0
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	-816(%rbp,%rax,8), %xmm0        ## xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -816(%rbp,%rax,8)
	movsd	-1696(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1296(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movl	-1716(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movsd	%xmm0, -1296(%rbp,%rax,8)
	movsd	-1680(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1712(%rbp), %eax
                                        ## kill: def $rax killed $eax
	mulsd	-176(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1704(%rbp)
	movsd	-1704(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1136(%rbp,%rax,8), %xmm0
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movsd	-656(%rbp,%rax,8), %xmm0        ## xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -656(%rbp,%rax,8)
	movsd	-1704(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1136(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movsd	%xmm0, -1136(%rbp,%rax,8)
	movsd	-1680(%rbp), %xmm0              ## xmm0 = mem[0],zero
	mulsd	-1640(%rbp), %xmm0
	movsd	%xmm0, -1704(%rbp)
	movsd	-1704(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	addl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1136(%rbp,%rax,8), %xmm0
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	addl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movsd	-656(%rbp,%rax,8), %xmm0        ## xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -656(%rbp,%rax,8)
	movsd	-1704(%rbp), %xmm0              ## xmm0 = mem[0],zero
	movsd	-1624(%rbp), %xmm2              ## xmm2 = mem[0],zero
	movsd	-1648(%rbp), %xmm1              ## xmm1 = mem[0],zero
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	addl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	mulsd	-1136(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movl	-1716(%rbp), %eax
	shll	$1, %eax
	addl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movsd	%xmm0, -1136(%rbp,%rax,8)
## %bb.13:                              ##   in Loop: Header=BB5_11 Depth=3
	movl	-1716(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -1716(%rbp)
	jmp	LBB5_11
LBB5_14:                                ##   in Loop: Header=BB5_5 Depth=2
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -1664(%rbp)
## %bb.15:                              ##   in Loop: Header=BB5_5 Depth=2
	movl	-1712(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -1712(%rbp)
	jmp	LBB5_5
LBB5_16:                                ##   in Loop: Header=BB5_1 Depth=1
	movl	-1708(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -1708(%rbp)
	leaq	-1136(%rbp), %rdi
	movl	$40, %esi
	callq	_fillArrayNull
	leaq	-1296(%rbp), %rdi
	movl	$20, %esi
	callq	_fillArrayNull
	movl	-1708(%rbp), %esi
	movsd	-1656(%rbp), %xmm0              ## xmm0 = mem[0],zero
	leaq	L_.str(%rip), %rdi
	movb	$1, %al
	callq	_libmin_printf
	jmp	LBB5_1
LBB5_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rcx
	cmpq	%rcx, %rax
	jne	LBB5_19
## %bb.18:
	xorl	%eax, %eax
	addq	$1728, %rsp                     ## imm = 0x6C0
	popq	%rbp
	retq
LBB5_19:
	callq	___stack_chk_fail
	ud2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function main
LCPI6_0:
	.quad	0x3f747ae147ae147b              ## double 0.0050000000000000001
LCPI6_1:
	.quad	0x3f847ae147ae147b              ## double 0.01
LCPI6_2:
	.quad	0x3ff0000000000000              ## double 1
LCPI6_3:
	.quad	0x3fd999999999999a              ## double 0.40000000000000002
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	movl	$42, %edi
	callq	_libmin_srand
	movsd	LCPI6_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	LCPI6_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	movsd	LCPI6_2(%rip), %xmm2            ## xmm2 = mem[0],zero
	movsd	LCPI6_3(%rip), %xmm3            ## xmm3 = mem[0],zero
	callq	_train
	callq	_libmin_success
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iteration %d Total error %f\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_g_deriv                        ; -- Begin function g_deriv
	.p2align	2
_g_deriv:                               ; @g_deriv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	d0, [sp, #8]
	ldr	d1, [sp, #8]
	fmov	d0, #-1.00000000
	fmul	d0, d0, d1
	bl	_libmin_exp
	fmov	d1, #1.00000000
	fadd	d0, d1, d0
	fdiv	d0, d1, d0
	str	d0, [sp]
	ldr	d0, [sp]
	ldr	d2, [sp]
	fsub	d1, d1, d2
	fmul	d0, d0, d1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_g                              ; -- Begin function g
	.p2align	2
_g:                                     ; @g
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	d0, [sp, #8]
	ldr	d1, [sp, #8]
	fmov	d0, #-1.00000000
	fmul	d0, d0, d1
	bl	_libmin_exp
	fmov	d1, d0
	fmov	d0, #1.00000000
	fadd	d1, d0, d1
	fdiv	d0, d0, d1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_sampleSine                     ; -- Begin function sampleSine
	.p2align	2
_sampleSine:                            ; @sampleSine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	stur	x0, [x29, #-8]
	stur	x1, [x29, #-16]
	stur	d0, [x29, #-24]
	str	d1, [sp, #32]
	str	w2, [sp, #28]
	ldr	d0, [sp, #32]
	ldur	d1, [x29, #-24]
	fsub	d0, d0, d1
	ldr	s2, [sp, #28]
                                        ; implicit-def: $d1
	fmov	s1, s2
	ucvtf	d1, d1
	fdiv	d0, d0, d1
	str	d0, [sp, #16]
	str	wzr, [sp, #12]
	b	LBB2_1
LBB2_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #28]
	subs	w8, w8, w9
	cset	w8, hs
	tbnz	w8, #0, LBB2_4
	b	LBB2_2
LBB2_2:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldur	d2, [x29, #-24]
	ldr	d0, [sp, #16]
	ldr	s3, [sp, #12]
                                        ; implicit-def: $d1
	fmov	s1, s3
	ucvtf	d1, d1
	fmadd	d0, d0, d1, d2
	ldur	x8, [x29, #-8]
	ldr	w9, [sp, #12]
                                        ; kill: def $x9 killed $w9
	str	d0, [x8, x9, lsl #3]
	ldur	x8, [x29, #-8]
	ldr	w9, [sp, #12]
                                        ; kill: def $x9 killed $w9
	ldr	d0, [x8, x9, lsl #3]
	bl	_libmin_sin
	ldur	x8, [x29, #-16]
	ldr	w9, [sp, #12]
                                        ; kill: def $x9 killed $w9
	str	d0, [x8, x9, lsl #3]
	b	LBB2_3
LBB2_3:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldr	w8, [sp, #12]
	add	w8, w8, #1
	str	w8, [sp, #12]
	b	LBB2_1
LBB2_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function fillArrayRand
lCPI3_0:
	.quad	0x41dfffffffc00000              ; double 2147483647
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_fillArrayRand
	.p2align	2
_fillArrayRand:                         ; @fillArrayRand
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	x0, [sp, #8]
	str	w1, [sp, #4]
	str	wzr, [sp]
	b	LBB3_1
LBB3_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp]
	ldr	w9, [sp, #4]
	subs	w8, w8, w9
	cset	w8, hs
	tbnz	w8, #0, LBB3_4
	b	LBB3_2
LBB3_2:                                 ;   in Loop: Header=BB3_1 Depth=1
	bl	_libmin_rand
	ucvtf	d0, w0
	adrp	x8, lCPI3_0@PAGE
	ldr	d1, [x8, lCPI3_0@PAGEOFF]
	fdiv	d0, d0, d1
	fmov	d1, #0.50000000
	fsub	d0, d0, d1
	ldr	x8, [sp, #8]
	ldr	w9, [sp]
                                        ; kill: def $x9 killed $w9
	str	d0, [x8, x9, lsl #3]
	b	LBB3_3
LBB3_3:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldr	w8, [sp]
	add	w8, w8, #1
	str	w8, [sp]
	b	LBB3_1
LBB3_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_fillArrayNull                  ; -- Begin function fillArrayNull
	.p2align	2
_fillArrayNull:                         ; @fillArrayNull
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #16
	.cfi_def_cfa_offset 16
	str	x0, [sp, #8]
	str	w1, [sp, #4]
	str	wzr, [sp]
	b	LBB4_1
LBB4_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp]
	ldr	w9, [sp, #4]
	subs	w8, w8, w9
	cset	w8, hs
	tbnz	w8, #0, LBB4_4
	b	LBB4_2
LBB4_2:                                 ;   in Loop: Header=BB4_1 Depth=1
	ldr	x8, [sp, #8]
	ldr	w9, [sp]
                                        ; kill: def $x9 killed $w9
	movi	d0, #0000000000000000
	str	d0, [x8, x9, lsl #3]
	b	LBB4_3
LBB4_3:                                 ;   in Loop: Header=BB4_1 Depth=1
	ldr	w8, [sp]
	add	w8, w8, #1
	str	w8, [sp]
	b	LBB4_1
LBB4_4:
	add	sp, sp, #16
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function train
lCPI5_0:
	.quad	0x40091eb851eb851f              ; double 3.1400000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_train
	.p2align	2
_train:                                 ; @train
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w27, -24
	.cfi_offset w28, -32
	sub	sp, sp, #1760
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	str	d0, [sp, #144]
	str	d1, [sp, #136]
	str	d2, [sp, #128]
	str	d3, [sp, #120]
	ldr	d0, [sp, #136]
	fmov	d1, #1.00000000
	fadd	d0, d0, d1
	str	d0, [sp, #112]
	movi	d0, #0000000000000000
	str	d0, [sp, #40]                   ; 8-byte Folded Spill
	str	d0, [sp, #104]
	add	x0, sp, #1112
	mov	w1, #40
	str	w1, [sp, #36]                   ; 4-byte Folded Spill
	bl	_fillArrayRand
	add	x0, sp, #952
	mov	w1, #20
	str	w1, [sp, #48]                   ; 4-byte Folded Spill
	bl	_fillArrayRand
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	add	x0, sp, #632
	bl	_fillArrayNull
	ldr	w1, [sp, #48]                   ; 4-byte Folded Reload
	add	x0, sp, #472
	bl	_fillArrayNull
	ldr	d0, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w2, [sp, #48]                   ; 4-byte Folded Reload
	sub	x0, x29, #184
	add	x1, sp, #1432
	adrp	x8, lCPI5_0@PAGE
	ldr	d1, [x8, lCPI5_0@PAGEOFF]
	bl	_sampleSine
	str	wzr, [sp, #60]
	b	LBB5_1
LBB5_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB5_5 Depth 2
                                        ;       Child Loop BB5_7 Depth 3
                                        ;       Child Loop BB5_11 Depth 3
	ldr	d0, [sp, #112]
	ldr	d1, [sp, #136]
	fcmp	d0, d1
	cset	w8, le
	mov	w9, #0
	str	w9, [sp, #32]                   ; 4-byte Folded Spill
	tbnz	w8, #0, LBB5_3
	b	LBB5_2
LBB5_2:                                 ;   in Loop: Header=BB5_1 Depth=1
	ldr	w8, [sp, #60]
	subs	w8, w8, #10
	cset	w8, lo
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
	b	LBB5_3
LBB5_3:                                 ;   in Loop: Header=BB5_1 Depth=1
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	tbz	w8, #0, LBB5_17
	b	LBB5_4
LBB5_4:                                 ;   in Loop: Header=BB5_1 Depth=1
	movi	d0, #0000000000000000
	str	d0, [sp, #112]
	str	wzr, [sp, #56]
	b	LBB5_5
LBB5_5:                                 ;   Parent Loop BB5_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB5_7 Depth 3
                                        ;       Child Loop BB5_11 Depth 3
	ldr	w8, [sp, #56]
	subs	w8, w8, #20
	cset	w8, hs
	tbnz	w8, #0, LBB5_16
	b	LBB5_6
LBB5_6:                                 ;   in Loop: Header=BB5_5 Depth=2
	str	wzr, [sp, #52]
	b	LBB5_7
LBB5_7:                                 ;   Parent Loop BB5_1 Depth=1
                                        ;     Parent Loop BB5_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w8, [sp, #52]
	subs	w8, w8, #20
	cset	w8, hs
	tbnz	w8, #0, LBB5_10
	b	LBB5_8
LBB5_8:                                 ;   in Loop: Header=BB5_7 Depth=3
	ldr	w8, [sp, #56]
	mov	x9, x8
	sub	x8, x29, #184
	ldr	d0, [x8, x9, lsl #3]
	ldr	w8, [sp, #52]
	mov	w9, #2
	mul	w10, w9, w8
	add	x8, sp, #1112
	ldr	d1, [x8, w10, uxtw #3]
	ldr	d2, [sp, #128]
	ldr	w10, [sp, #52]
	mul	w9, w9, w10
	add	w9, w9, #1
	ldr	d3, [x8, w9, uxtw #3]
	fmul	d2, d2, d3
	fmadd	d0, d0, d1, d2
	str	d0, [sp, #80]
	ldr	d0, [sp, #80]
	bl	_g
	ldr	w8, [sp, #52]
	mov	x9, x8
	add	x8, sp, #312
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	str	d0, [x8, x9, lsl #3]
	ldr	d0, [sp, #80]
	bl	_g_deriv
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w9, [sp, #52]
	mov	x10, x9
	add	x9, sp, #152
	str	d0, [x9, x10, lsl #3]
	ldr	w9, [sp, #52]
	mov	x10, x9
	add	x9, sp, #952
	ldr	d0, [x9, x10, lsl #3]
	ldr	w9, [sp, #52]
                                        ; kill: def $x9 killed $w9
	ldr	d1, [x8, x9, lsl #3]
	ldr	d2, [sp, #104]
	fmadd	d0, d0, d1, d2
	str	d0, [sp, #104]
	b	LBB5_9
LBB5_9:                                 ;   in Loop: Header=BB5_7 Depth=3
	ldr	w8, [sp, #52]
	add	w8, w8, #1
	str	w8, [sp, #52]
	b	LBB5_7
LBB5_10:                                ;   in Loop: Header=BB5_5 Depth=2
	ldr	d0, [sp, #104]
	ldr	w8, [sp, #56]
	mov	x9, x8
	add	x8, sp, #1432
	ldr	d1, [x8, x9, lsl #3]
	fsub	d0, d0, d1
	str	d0, [sp, #96]
	ldr	d0, [sp, #96]
	ldr	d1, [sp, #96]
	ldr	d2, [sp, #112]
	fmadd	d0, d0, d1, d2
	str	d0, [sp, #112]
	str	wzr, [sp, #52]
	b	LBB5_11
LBB5_11:                                ;   Parent Loop BB5_1 Depth=1
                                        ;     Parent Loop BB5_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w8, [sp, #52]
	subs	w8, w8, #20
	cset	w8, hs
	tbnz	w8, #0, LBB5_14
	b	LBB5_12
LBB5_12:                                ;   in Loop: Header=BB5_11 Depth=3
	ldr	w8, [sp, #52]
	mov	x9, x8
	add	x8, sp, #152
	ldr	d0, [x8, x9, lsl #3]
	ldr	w8, [sp, #52]
                                        ; kill: def $x8 killed $w8
	add	x9, sp, #952
	ldr	d1, [x9, x8, lsl #3]
	fmul	d0, d0, d1
	ldr	d1, [sp, #96]
	fmul	d0, d0, d1
	str	d0, [sp, #88]
	ldr	d0, [sp, #96]
	ldr	w8, [sp, #52]
	mov	x10, x8
	add	x8, sp, #312
	ldr	d1, [x8, x10, lsl #3]
	fmul	d0, d0, d1
	str	d0, [sp, #72]
	ldr	d0, [sp, #72]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w8, [sp, #52]
	mov	x10, x8
	add	x8, sp, #472
	ldr	d3, [x8, x10, lsl #3]
	fmul	d2, d2, d3
	fmadd	d1, d0, d1, d2
	ldr	w10, [sp, #52]
                                        ; kill: def $x10 killed $w10
	add	x9, x9, x10, lsl #3
	ldr	d0, [x9]
	fsub	d0, d0, d1
	str	d0, [x9]
	ldr	d0, [sp, #72]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w9, [sp, #52]
                                        ; kill: def $x9 killed $w9
	ldr	d3, [x8, x9, lsl #3]
	fmul	d2, d2, d3
	fmadd	d0, d0, d1, d2
	ldr	w9, [sp, #52]
                                        ; kill: def $x9 killed $w9
	str	d0, [x8, x9, lsl #3]
	ldr	d0, [sp, #88]
	ldr	w8, [sp, #56]
	mov	x9, x8
	sub	x8, x29, #184
	ldr	d1, [x8, x9, lsl #3]
	fmul	d0, d0, d1
	str	d0, [sp, #64]
	ldr	d0, [sp, #64]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w8, [sp, #52]
	mov	w9, #2
	str	w9, [sp, #20]                   ; 4-byte Folded Spill
	mul	w10, w9, w8
	add	x8, sp, #632
	ldr	d3, [x8, w10, uxtw #3]
	fmul	d2, d2, d3
	fmadd	d1, d0, d1, d2
	ldr	w10, [sp, #52]
	mul	w11, w9, w10
	add	x10, sp, #1112
	add	x11, x10, w11, uxtw #3
	ldr	d0, [x11]
	fsub	d0, d0, d1
	str	d0, [x11]
	ldr	d0, [sp, #64]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w11, [sp, #52]
	mul	w11, w9, w11
	ldr	d3, [x8, w11, uxtw #3]
	fmul	d2, d2, d3
	fmadd	d0, d0, d1, d2
	ldr	w11, [sp, #52]
	mul	w11, w9, w11
	str	d0, [x8, w11, uxtw #3]
	ldr	d0, [sp, #88]
	ldr	d1, [sp, #128]
	fmul	d0, d0, d1
	str	d0, [sp, #64]
	ldr	d0, [sp, #64]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w11, [sp, #52]
	mul	w11, w9, w11
	add	w11, w11, #1
	ldr	d3, [x8, w11, uxtw #3]
	fmul	d2, d2, d3
	fmadd	d1, d0, d1, d2
	ldr	w11, [sp, #52]
	mul	w11, w9, w11
	add	w11, w11, #1
	add	x10, x10, w11, uxtw #3
	ldr	d0, [x10]
	fsub	d0, d0, d1
	str	d0, [x10]
	ldr	d0, [sp, #64]
	ldr	d1, [sp, #144]
	ldr	d2, [sp, #120]
	ldr	w10, [sp, #52]
	mul	w10, w9, w10
	add	w10, w10, #1
	ldr	d3, [x8, w10, uxtw #3]
	fmul	d2, d2, d3
	fmadd	d0, d0, d1, d2
	ldr	w10, [sp, #52]
	mul	w9, w9, w10
	add	w9, w9, #1
	str	d0, [x8, w9, uxtw #3]
	b	LBB5_13
LBB5_13:                                ;   in Loop: Header=BB5_11 Depth=3
	ldr	w8, [sp, #52]
	add	w8, w8, #1
	str	w8, [sp, #52]
	b	LBB5_11
LBB5_14:                                ;   in Loop: Header=BB5_5 Depth=2
	movi	d0, #0000000000000000
	str	d0, [sp, #104]
	b	LBB5_15
LBB5_15:                                ;   in Loop: Header=BB5_5 Depth=2
	ldr	w8, [sp, #56]
	add	w8, w8, #1
	str	w8, [sp, #56]
	b	LBB5_5
LBB5_16:                                ;   in Loop: Header=BB5_1 Depth=1
	ldr	w8, [sp, #60]
	add	w8, w8, #1
	str	w8, [sp, #60]
	add	x0, sp, #632
	mov	w1, #40
	bl	_fillArrayNull
	add	x0, sp, #472
	mov	w1, #20
	bl	_fillArrayNull
	ldr	w8, [sp, #60]
                                        ; implicit-def: $x9
	mov	x9, x8
	ldr	d0, [sp, #112]
	mov	x8, sp
	str	x9, [x8]
	str	d0, [x8, #8]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	b	LBB5_1
LBB5_17:
	ldur	x9, [x29, #-24]
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB5_19
	b	LBB5_18
LBB5_18:
	bl	___stack_chk_fail
LBB5_19:
	mov	w0, #0
	add	sp, sp, #1760
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function main
lCPI6_0:
	.quad	0x3fd999999999999a              ; double 0.40000000000000002
lCPI6_1:
	.quad	0x3f847ae147ae147b              ; double 0.01
lCPI6_2:
	.quad	0x3f747ae147ae147b              ; double 0.0050000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w8, #0
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	stur	wzr, [x29, #-4]
	mov	w0, #42
	bl	_libmin_srand
	adrp	x8, lCPI6_2@PAGE
	ldr	d0, [x8, lCPI6_2@PAGEOFF]
	adrp	x8, lCPI6_1@PAGE
	ldr	d1, [x8, lCPI6_1@PAGEOFF]
	fmov	d2, #1.00000000
	adrp	x8, lCPI6_0@PAGE
	ldr	d3, [x8, lCPI6_0@PAGEOFF]
	bl	_train
	bl	_libmin_success
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iteration %d Total error %f\n"

.subsections_via_symbols