	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function factorization
_factorization:                         ## @factorization
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	jle	LBB0_22
## %bb.1:
	movl	%esi, %r9d
	movl	%esi, %r11d
	leal	(%r9,%r9), %ecx
	leaq	8(%rdi), %rdx
	leaq	(,%r11,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi,%r11,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorpd	%xmm0, %xmm0
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movq	%r11, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	-48(%rbp)                       ## 8-byte Folded Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rdx
	addq	%rax, -56(%rbp)                 ## 8-byte Folded Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r15
	cmpq	%r11, %rax
	je	LBB0_22
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
                                        ##       Child Loop BB0_17 Depth 3
	movq	%r15, %r13
	andq	$-2, %r13
	movq	%r15, %rax
	imulq	%r11, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	imull	%r9d, %eax
	cltq
	addq	%r15, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movsd	(%rdi,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	testq	%r15, %r15
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$1, %r15
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r9, %rsi
	xorl	%r8d, %r8d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	movq	%r9, %rax
	movl	$1, %r9d
	movq	%rax, %rsi
                                        ## kill: def $eax killed $eax killed $rax def $rax
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cltq
	leaq	(%r9,%rax), %r10
	movslq	%ebx, %rbx
	leaq	(%r8,%rbx), %r14
	movsd	-8(%rdx,%r8,8), %xmm2           ## xmm2 = mem[0],zero
	movsd	(%rdx,%r8,8), %xmm3             ## xmm3 = mem[0],zero
	movsd	(%rdi,%r14,8), %xmm4            ## xmm4 = mem[0],zero
	mulsd	%xmm2, %xmm4
	mulsd	%xmm2, %xmm4
	subsd	%xmm4, %xmm1
	movsd	(%rdi,%r10,8), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm3, %xmm2
	mulsd	%xmm3, %xmm2
	subsd	%xmm2, %xmm1
	addq	$2, %r8
	addl	%ecx, %ebx
	addq	$2, %r9
	addl	%ecx, %eax
	cmpq	%r8, %r13
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r15b
	movq	%rsi, %r9
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r8d, %eax
	imull	%r9d, %eax
	cltq
	addq	%r8, %rax
	addq	-64(%rbp), %r8                  ## 8-byte Folded Reload
	movsd	(%rdi,%r8,8), %xmm2             ## xmm2 = mem[0],zero
	movsd	(%rdi,%rax,8), %xmm3            ## xmm3 = mem[0],zero
	mulsd	%xmm2, %xmm3
	mulsd	%xmm2, %xmm3
	subsd	%xmm3, %xmm1
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	ucomisd	%xmm0, %xmm1
	jne	LBB0_11
	jnp	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movsd	%xmm1, (%rdi,%rax,8)
	leaq	1(%r15), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpq	%r11, %rax
	jae	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	divsd	(%rdi,%rbx,8), %xmm1
	movsd	%xmm1, (%rdi,%rsi,8)
	incq	%r10
	addq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	cmpq	%r11, %r10
	je	LBB0_21
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_17 Depth 3
	movq	%r10, %r12
	imulq	%r11, %r12
	leaq	(%r12,%r15), %rsi
	movsd	(%rdi,%rsi,8), %xmm1            ## xmm1 = mem[0],zero
	testq	%r15, %r15
	je	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpq	$1, %r15
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	%r9, %r15
	xorl	%r9d, %r9d
	movl	$1, %ebx
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_13 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	%r15d, %r15
	leaq	(%rbx,%r15), %r11
	movslq	%r9d, %r9
	leaq	(%r14,%r9), %r8
	movsd	-8(%rdx,%r14,8), %xmm2          ## xmm2 = mem[0],zero
	mulsd	(%rdi,%r8,8), %xmm2
	mulsd	-8(%rax,%r14,8), %xmm2
	movsd	(%rdx,%r14,8), %xmm3            ## xmm3 = mem[0],zero
	subsd	%xmm2, %xmm1
	mulsd	(%rdi,%r11,8), %xmm3
	mulsd	(%rax,%r14,8), %xmm3
	subsd	%xmm3, %xmm1
	addq	$2, %r14
	addl	%ecx, %r9d
	addq	$2, %rbx
	addl	%ecx, %r15d
	cmpq	%r14, %r13
	jne	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	-112(%rbp), %r15                ## 8-byte Reload
	testb	$1, %r15b
	movq	-104(%rbp), %r9                 ## 8-byte Reload
	movq	-96(%rbp), %r11                 ## 8-byte Reload
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	%r14d, %ebx
	imull	%r9d, %ebx
	movslq	%ebx, %r8
	addq	%r14, %r8
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	addq	%r14, %rbx
	movsd	(%rdi,%rbx,8), %xmm2            ## xmm2 = mem[0],zero
	mulsd	(%rdi,%r8,8), %xmm2
	addq	%r14, %r12
	mulsd	(%rdi,%r12,8), %xmm2
	subsd	%xmm2, %xmm1
	jmp	LBB0_20
LBB0_22:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_10:
	movl	$-1, %eax
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_factorization
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function factorization
_factorization:                         ; @factorization
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x13, #0
	mov	w8, w1
	lsl	x9, x8, #3
	add	x10, x0, x9
	mov	w11, #1
	mov	x12, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	add	x12, x12, x9
	add	x10, x10, x9
	mov	x13, x15
	cmp	x15, x8
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
	mul	w14, w13, w1
	add	x14, x13, w14, sxtw
	ldr	d0, [x0, x14, lsl #3]
	cbz	x13, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w15, #0
	mov	x16, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x17, x16, w15, sxtw
	ldr	d1, [x0, x17, lsl #3]
	ldr	d2, [x12, x16, lsl #3]
	fneg	d1, d1
	fmul	d1, d2, d1
	fmadd	d0, d1, d2, d0
	add	x16, x16, #1
	add	w15, w15, w1
	cmp	x13, x16
	b.ne	LBB0_5
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	fcmp	d0, #0.0
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	str	d0, [x0, x14, lsl #3]
	add	x15, x13, #1
	cmp	x15, x8
	b.hs	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x16, x10
	mov	x17, x11
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	d1, [x0, x14, lsl #3]
	fdiv	d0, d0, d1
	str	d0, [x0, x2, lsl #3]
	add	x17, x17, #1
	add	x16, x16, x9
	cmp	x17, x8
	b.eq	LBB0_2
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
	madd	x2, x17, x8, x13
	ldr	d0, [x0, x2, lsl #3]
	cbz	x13, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w3, #0
	mov	x4, #0
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x5, x4, w3, sxtw
	ldr	d1, [x0, x5, lsl #3]
	lsl	x5, x4, #3
	ldr	d2, [x12, x5]
	ldr	d3, [x16, x5]
	fneg	d1, d1
	fmul	d1, d2, d1
	fmadd	d0, d1, d3, d0
	add	x4, x4, #1
	add	w3, w3, w1
	cmp	x13, x4
	b.ne	LBB0_12
	b	LBB0_9
LBB0_13:
	mov	w0, #0
	ret
LBB0_14:
	mov	w0, #-1
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_factorization
.subsections_via_symbols
