	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function model2_update
_model2_update:                         ## @model2_update
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	decl	4(%rdi)
	je	LBB0_3
LBB0_8:
	popq	%rbp
	retq
LBB0_1:
	incl	(%rdi)
	decl	4(%rdi)
	jne	LBB0_8
LBB0_3:
	movl	12(%rdi), %eax
	movl	8(%rdi), %ecx
	addl	%eax, %ecx
	movl	%ecx, 8(%rdi)
	cmpl	$8192, %ecx                     ## imm = 0x2000
	jle	LBB0_4
## %bb.5:
	incl	%ecx
	shrl	%ecx
	movl	%ecx, 8(%rdi)
	movl	(%rdi), %esi
	incl	%esi
	sarl	%esi
	movl	%esi, (%rdi)
	cmpl	%esi, %ecx
	jne	LBB0_7
## %bb.6:
	movl	%ecx, %esi
	incl	%ecx
	movl	%ecx, 8(%rdi)
                                        ## kill: def $ecx killed $ecx def $rcx
	jmp	LBB0_7
LBB0_4:
	movl	(%rdi), %esi
LBB0_7:
	leal	(%rax,%rax,4), %eax
	movl	%eax, %edx
	sarl	$2, %edx
	cmpl	$260, %eax                      ## imm = 0x104
	movl	$64, %r8d
	cmovll	%edx, %r8d
	movl	%r8d, 12(%rdi)
	movl	$-2147483648, %eax              ## imm = 0x80000000
	xorl	%edx, %edx
	divl	%ecx
	imull	%eax, %esi
	shrl	$18, %esi
	movl	%esi, 16(%rdi)
	imull	%ecx, %eax
	shrl	$18, %eax
	movl	%eax, 20(%rdi)
	movl	%r8d, 4(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_model2_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function model2_update
_model2_update:                         ; @model2_update
	.cfi_startproc
; %bb.0:
	cbnz	w1, LBB0_2
; %bb.1:
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
LBB0_2:
	ldr	w8, [x0, #4]
	subs	w8, w8, #1
	str	w8, [x0, #4]
	b.eq	LBB0_4
; %bb.3:
	ret
LBB0_4:
	ldp	w8, w9, [x0, #8]
	add	w8, w8, w9
	str	w8, [x0, #8]
	cmp	w8, #2, lsl #12                 ; =8192
	b.le	LBB0_7
; %bb.5:
	add	w8, w8, #1
	lsr	w8, w8, #1
	str	w8, [x0, #8]
	ldr	w10, [x0]
	add	w10, w10, #1
	asr	w10, w10, #1
	str	w10, [x0]
	cmp	w8, w10
	b.ne	LBB0_8
; %bb.6:
	mov	x10, x8
	add	w8, w8, #1
	str	w8, [x0, #8]
	b	LBB0_8
LBB0_7:
	ldr	w10, [x0]
LBB0_8:
	add	w9, w9, w9, lsl #2
	asr	w11, w9, #2
	mov	w12, #64
	cmp	w9, #259
	csel	w9, w12, w11, gt
	mov	w11, #-2147483648
	udiv	w11, w11, w8
	mul	w10, w10, w11
	lsr	w10, w10, #18
	stp	w9, w10, [x0, #12]
	mul	w8, w11, w8
	lsr	w8, w8, #18
	str	w8, [x0, #20]
	str	w9, [x0, #4]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_model2_update
.subsections_via_symbols
