	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SN76496Update                  ## -- Begin function SN76496Update
	.p2align	4, 0x90
_SN76496Update:                         ## @SN76496Update
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ono_sn@GOTPCREL(%rip), %r8
	movq	(%r8), %r10
	movq	8(%r8), %rcx
	movq	(%r10), %rax
	movq	%rax, %rbx
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	(%rcx), %r9d
	movq	_STEP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	imull	%esi, %ebx
	cmpl	%ebx, %r9d
	jg	LBB0_3
## %bb.2:
	addl	%r9d, %ebx
	movl	%ebx, (%rcx)
LBB0_3:
	movq	8(%r10), %rbx
	movq	%rbx, %rax
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.4:
	movl	4(%rcx), %r9d
	movq	_STEP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	imull	%esi, %ebx
	cmpl	%ebx, %r9d
	jg	LBB0_6
## %bb.5:
	addl	%r9d, %ebx
	movl	%ebx, 4(%rcx)
LBB0_6:
	movq	16(%r10), %rbx
	movq	%rbx, %rax
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.7:
	movl	8(%rcx), %r9d
	movq	_STEP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	imull	%esi, %ebx
	cmpl	%ebx, %r9d
	jg	LBB0_9
## %bb.8:
	addl	%r9d, %ebx
	movl	%ebx, 8(%rcx)
LBB0_9:
	movq	24(%r10), %rbx
	movq	%rbx, %rax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.10:
	movl	12(%rcx), %eax
	movq	_STEP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	imull	%esi, %ebx
	cmpl	%ebx, %eax
	jg	LBB0_12
## %bb.11:
	addl	%eax, %ebx
	movl	%ebx, 12(%rcx)
LBB0_12:
	testl	%esi, %esi
	jle	LBB0_39
## %bb.13:
	cmpl	$1, %edx
	movl	$2, %eax
	sbbq	$0, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%r8), %r15
	xorps	%xmm0, %xmm0
	movq	_STEP@GOTPCREL(%rip), %r12
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rdi,%rax,2), %rdi
	leal	-1(%rsi), %eax
	cmpl	$1, %esi
	movl	%eax, %esi
	jle	LBB0_39
LBB0_15:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
                                        ##       Child Loop BB0_21 Depth 3
                                        ##     Child Loop BB0_33 Depth 2
	movaps	%xmm0, -64(%rbp)
	movq	8(%r8), %r10
	movq	32(%r8), %r9
	xorl	%edx, %edx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=2
	incq	%rdx
	cmpq	$3, %rdx
	je	LBB0_28
LBB0_17:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_21 Depth 3
	cmpl	$0, (%r15,%rdx,4)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r10,%rdx,4), %eax
	addl	%eax, -64(%rbp,%rdx,4)
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%rcx,%rdx,4), %eax
	subl	(%r12), %eax
	movl	%eax, (%rcx,%rdx,4)
	jle	LBB0_20
## %bb.24:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$0, (%r15,%rdx,4)
	je	LBB0_16
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%rcx,%rdx,4), %eax
	subl	%eax, -64(%rbp,%rdx,4)
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r9,%rdx,8), %ebx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_15 Depth=1
                                        ##     Parent Loop BB0_17 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	addl	%ebx, %eax
	testl	%eax, %eax
	jg	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=3
	addl	%ebx, %eax
	addl	%ebx, -64(%rbp,%rdx,4)
	testl	%eax, %eax
	jle	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%eax, (%rcx,%rdx,4)
	cmpl	$0, (%r15,%rdx,4)
	jne	LBB0_25
	jmp	LBB0_16
LBB0_26:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	%eax, (%rcx,%rdx,4)
	xorl	$1, (%r15,%rdx,4)
	je	LBB0_16
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=2
	addl	%ebx, -64(%rbp,%rdx,4)
	cmpl	$0, (%r15,%rdx,4)
	jne	LBB0_25
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r12), %r9d
	movl	-52(%rbp), %r14d
	movq	32(%r8), %rax
	movl	12(%rcx), %r10d
	movl	12(%r15), %edx
	movl	%r9d, %r13d
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_33 Depth=2
	movl	24(%r8), %ebx
	movl	%ebx, %edx
	andl	$1, %edx
	negl	%edx
	andl	28(%r8), %edx
	xorl	%ebx, %edx
	sarl	%edx
	movl	%edx, 24(%r8)
	andl	$1, %edx
	movl	%edx, 12(%r15)
	movl	24(%rax), %ebx
	movl	12(%rcx), %r10d
	addl	%ebx, %r10d
	movl	%r10d, 12(%rcx)
	movl	12(%r15), %edx
	testl	%edx, %edx
	je	LBB0_36
## %bb.30:                              ##   in Loop: Header=BB0_33 Depth=2
	addl	%ebx, %r14d
LBB0_31:                                ##   in Loop: Header=BB0_33 Depth=2
	subl	%r10d, %r14d
	subl	%r11d, %r13d
	jle	LBB0_37
LBB0_33:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r13d, %r10d
	movl	%r13d, %r11d
	cmovll	%r10d, %r11d
	testl	%edx, %edx
	cmovnel	%r10d, %edx
	movl	%r14d, %ebx
	movl	%edx, %r14d
	addl	%ebx, %r14d
	subl	%r11d, %r10d
	movl	%r10d, 12(%rcx)
	jle	LBB0_29
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=2
	movl	12(%r15), %edx
	testl	%edx, %edx
	jne	LBB0_31
LBB0_36:                                ##   in Loop: Header=BB0_33 Depth=2
	xorl	%edx, %edx
	subl	%r11d, %r13d
	jg	LBB0_33
LBB0_37:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	-64(%rbp), %eax
	imull	-104(%rbp), %eax                ## 4-byte Folded Reload
	movl	-60(%rbp), %edx
	imull	-96(%rbp), %edx                 ## 4-byte Folded Reload
	addl	%eax, %edx
	movl	-56(%rbp), %eax
	imull	-88(%rbp), %eax                 ## 4-byte Folded Reload
	addl	%edx, %eax
	imull	-80(%rbp), %r14d                ## 4-byte Folded Reload
	addl	%eax, %r14d
	movq	_MAX_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%r9d, %eax
	cmpl	%r14d, %eax
	cmovael	%r14d, %eax
	cmpl	%eax, %r9d
	ja	LBB0_14
## %bb.38:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%edx, %edx
	divl	%r9d
	addw	%ax, (%rdi)
	jmp	LBB0_14
LBB0_39:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.40:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ono_sn,40,3                    ## @ono_sn
	.comm	_STEP,4,2                       ## @STEP
	.comm	_MAX_OUTPUT,4,2                 ## @MAX_OUTPUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SN76496Update                  ; -- Begin function SN76496Update
	.p2align	2
_SN76496Update:                         ; @SN76496Update
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
Lloh0:
	adrp	x8, _ono_sn@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ono_sn@GOTPAGEOFF]
	ldp	x14, x9, [x8]
	ldr	x10, [x14]
Lloh2:
	adrp	x11, _STEP@GOTPAGE
Lloh3:
	ldr	x11, [x11, _STEP@GOTPAGEOFF]
	cbnz	x10, LBB0_3
; %bb.1:
	ldr	w12, [x9]
	ldr	w13, [x11]
	mul	w13, w13, w1
	cmp	w12, w13
	b.gt	LBB0_3
; %bb.2:
	add	w12, w13, w12
	str	w12, [x9]
LBB0_3:
	ldr	x12, [x14, #8]
	cbnz	x12, LBB0_6
; %bb.4:
	ldr	w13, [x9, #4]
	ldr	w15, [x11]
	mul	w15, w15, w1
	cmp	w13, w15
	b.gt	LBB0_6
; %bb.5:
	add	w13, w15, w13
	str	w13, [x9, #4]
LBB0_6:
	ldr	x13, [x14, #16]
	cbnz	x13, LBB0_9
; %bb.7:
	ldr	w15, [x9, #8]
	ldr	w16, [x11]
	mul	w16, w16, w1
	cmp	w15, w16
	b.gt	LBB0_9
; %bb.8:
	add	w15, w16, w15
	str	w15, [x9, #8]
LBB0_9:
	ldr	x14, [x14, #24]
	cbnz	x14, LBB0_12
; %bb.10:
	ldr	w15, [x9, #12]
	ldr	w16, [x11]
	mul	w16, w16, w1
	cmp	w15, w16
	b.gt	LBB0_12
; %bb.11:
	add	w15, w16, w15
	str	w15, [x9, #12]
LBB0_12:
	cmp	w1, #0
	b.le	LBB0_59
; %bb.13:
	ldr	x15, [x8, #16]
	cmp	w2, #0
	mov	w16, #1
	cinc	x16, x16, ne
Lloh4:
	adrp	x17, _MAX_OUTPUT@GOTPAGE
Lloh5:
	ldr	x17, [x17, _MAX_OUTPUT@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x0, x16, lsl #1
	subs	w1, w1, #1
	b.le	LBB0_59
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
                                        ;     Child Loop BB0_29 Depth 2
                                        ;     Child Loop BB0_39 Depth 2
                                        ;     Child Loop BB0_47 Depth 2
	ldr	x5, [x8, #8]
	ldr	w2, [x15]
	cbz	w2, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w2, [x5]
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x6, [x8, #32]
	ldr	w3, [x11]
	ldr	w4, [x9]
	sub	w4, w4, w3
	str	w4, [x9]
	cmp	w4, #0
	b.le	LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x15]
	cbz	w3, LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x9]
	sub	w2, w2, w3
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x15, #4]
	cbz	w3, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w4, [x5, #4]
	b	LBB0_27
LBB0_22:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x6]
LBB0_23:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w7, w4, w3
	cmp	w7, #1
	b.ge	LBB0_53
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	add	w4, w7, w3
	add	w2, w2, w3
	cmp	w4, #1
	b.lt	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_15 Depth=1
	str	w4, [x9]
	ldr	w3, [x15]
	cbnz	w3, LBB0_19
	b	LBB0_20
LBB0_26:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w4, #0
LBB0_27:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x11]
	ldr	w7, [x9, #4]
	sub	w19, w7, w3
	str	w19, [x9, #4]
	cmp	w19, #0
	b.gt	LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w7, [x6, #8]
LBB0_29:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w20, w19, w7
	cmp	w20, #0
	b.gt	LBB0_55
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=2
	add	w19, w20, w7
	add	w4, w4, w7
	cmp	w19, #1
	b.lt	LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_15 Depth=1
	str	w19, [x9, #4]
LBB0_32:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w7, [x15, #4]
	cbz	w7, LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w7, [x9, #4]
	sub	w4, w4, w7
LBB0_34:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w7, [x15, #8]
	cbz	w7, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w5, [x5, #8]
	b	LBB0_37
LBB0_36:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w5, #0
LBB0_37:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w7, [x9, #8]
	sub	w7, w7, w3
	str	w7, [x9, #8]
	cmp	w7, #0
	b.gt	LBB0_42
; %bb.38:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w6, [x6, #16]
LBB0_39:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w19, w7, w6
	cmp	w19, #0
	b.gt	LBB0_57
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=2
	add	w7, w19, w6
	add	w5, w5, w6
	cmp	w7, #1
	b.lt	LBB0_39
; %bb.41:                               ;   in Loop: Header=BB0_15 Depth=1
	str	w7, [x9, #8]
LBB0_42:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w6, [x15, #8]
	cbz	w6, LBB0_44
LBB0_43:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w6, [x9, #8]
	sub	w5, w5, w6
LBB0_44:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w6, #0
	ldr	x7, [x8, #32]
	ldr	w20, [x9, #12]
	mov	x19, x3
	ldr	w22, [x15, #12]
	b	LBB0_47
LBB0_45:                                ;   in Loop: Header=BB0_47 Depth=2
	sub	w6, w6, w20
LBB0_46:                                ;   in Loop: Header=BB0_47 Depth=2
	sub	w19, w19, w21
	cmp	w19, #0
	b.le	LBB0_51
LBB0_47:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w20, w19
	csel	w21, w20, w19, lt
	cmp	w22, #0
	csel	w22, wzr, w20, eq
	add	w6, w6, w22
	sub	w20, w20, w21
	str	w20, [x9, #12]
	cmp	w20, #0
	b.le	LBB0_49
; %bb.48:                               ;   in Loop: Header=BB0_47 Depth=2
	ldr	w22, [x15, #12]
	cbnz	w22, LBB0_45
	b	LBB0_46
LBB0_49:                                ;   in Loop: Header=BB0_47 Depth=2
	ldp	w20, w22, [x8, #24]
	sbfx	w23, w20, #0, #1
	and	w22, w23, w22
	eor	w20, w20, w22
	asr	w20, w20, #1
	str	w20, [x8, #24]
	and	w20, w20, #0x1
	str	w20, [x15, #12]
	ldr	w23, [x7, #24]
	ldr	w20, [x9, #12]
	add	w20, w20, w23
	str	w20, [x9, #12]
	ldr	w22, [x15, #12]
	cbz	w22, LBB0_46
; %bb.50:                               ;   in Loop: Header=BB0_47 Depth=2
	add	w6, w6, w23
	b	LBB0_45
LBB0_51:                                ;   in Loop: Header=BB0_15 Depth=1
	mul	w2, w10, w2
	madd	w2, w12, w4, w2
	madd	w2, w13, w5, w2
	madd	w2, w14, w6, w2
	ldr	w4, [x17]
	mul	w4, w4, w3
	cmp	w4, w2
	csel	w2, w4, w2, lo
	cmp	w3, w2
	b.hi	LBB0_14
; %bb.52:                               ;   in Loop: Header=BB0_15 Depth=1
	udiv	w2, w2, w3
	ldrh	w3, [x0]
	add	w2, w3, w2
	strh	w2, [x0]
	b	LBB0_14
LBB0_53:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w4, w3, w4
	str	w4, [x9]
	ldr	w4, [x15]
	eor	w4, w4, #0x1
	str	w4, [x15]
	cbz	w4, LBB0_20
; %bb.54:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w2, w3, w2
	b	LBB0_19
LBB0_55:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w19, w7, w19
	str	w19, [x9, #4]
	ldr	w19, [x15, #4]
	eor	w19, w19, #0x1
	str	w19, [x15, #4]
	cbz	w19, LBB0_34
; %bb.56:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w4, w7, w4
	b	LBB0_33
LBB0_57:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w7, w6, w7
	str	w7, [x9, #8]
	ldr	w7, [x15, #8]
	eor	w7, w7, #0x1
	str	w7, [x15, #8]
	cbz	w7, LBB0_44
; %bb.58:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w5, w6, w5
	b	LBB0_43
LBB0_59:
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ono_sn,40,3                    ; @ono_sn
	.comm	_STEP,4,2                       ; @STEP
	.comm	_MAX_OUTPUT,4,2                 ; @MAX_OUTPUT
.subsections_via_symbols
