	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ov51x_do_dealloc
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ov51x_do_dealloc:                      ## @ov51x_do_dealloc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	40(%r12), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	_OV511_NUMFRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	48(%r12), %esi
	movl	52(%r12), %edi
	callq	_MAX_DATA_SIZE
	imull	%eax, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_rvfree
	movq	$0, 40(%r12)
LBB0_2:
	movq	32(%r12), %rdi
	callq	_vfree
	movq	$0, 32(%r12)
	movq	24(%r12), %rdi
	callq	_vfree
	movq	$0, 24(%r12)
	movq	_OV511_NUMSBUF@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.3:
	movq	16(%r12), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx,8), %rdi
	callq	_kfree
	movq	16(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_4
LBB0_5:
	movq	_OV511_NUMFRAMES@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	movq	8(%r12), %rcx
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movslq	%eax, %rdx
	addq	$32, %rbx
	cmpq	%rdx, %r15
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rcx,%rbx)
	movq	$0, 24(%rcx,%rbx)
	movq	(%rcx,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	_free_page
	movq	8(%r12), %rcx
	movq	$0, (%rcx,%rbx)
	movl	(%r14), %eax
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	_BUF_NOT_ALLOCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PDEBUG                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entered"

	.comm	_OV511_NUMFRAMES,4,2            ## @OV511_NUMFRAMES
	.comm	_OV511_NUMSBUF,4,2              ## @OV511_NUMSBUF
L_.str.1:                               ## @.str.1
	.asciz	"buffer memory deallocated"

	.comm	_BUF_NOT_ALLOCATED,4,2          ## @BUF_NOT_ALLOCATED
L_.str.2:                               ## @.str.2
	.asciz	"leaving"

	.no_dead_strip	_ov51x_do_dealloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov51x_do_dealloc
_ov51x_do_dealloc:                      ; @ov51x_do_dealloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
	ldr	x20, [x19, #40]
Lloh2:
	adrp	x21, _OV511_NUMFRAMES@GOTPAGE
Lloh3:
	ldr	x21, [x21, _OV511_NUMFRAMES@GOTPAGEOFF]
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w22, [x21]
	ldp	w1, w0, [x19, #48]
	bl	_MAX_DATA_SIZE
	mul	w1, w0, w22
	mov	x0, x20
	bl	_rvfree
	str	xzr, [x19, #40]
LBB0_2:
	ldr	x0, [x19, #32]
	bl	_vfree
	str	xzr, [x19, #32]
	ldr	x0, [x19, #24]
	bl	_vfree
	str	xzr, [x19, #24]
Lloh4:
	adrp	x20, _OV511_NUMSBUF@GOTPAGE
Lloh5:
	ldr	x20, [x20, _OV511_NUMSBUF@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
	ldr	x8, [x19, #16]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_kfree
	ldr	x8, [x19, #16]
	str	xzr, [x8, x23]
	add	x22, x22, #1
	ldrsw	x9, [x20]
	cmp	x22, x9
	b.lt	LBB0_4
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x20, #0
	mov	x22, #0
	ldr	x9, [x19, #8]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x22, x22, #1
	add	x20, x20, #32
	cmp	x22, w8, sxtw
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x10, x9, x20
	stp	xzr, xzr, [x10, #8]
	str	xzr, [x10, #24]
	ldr	x0, [x10]
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_free_page
	ldr	x9, [x19, #8]
	str	xzr, [x9, x20]
	ldr	w8, [x21]
	b	LBB0_7
LBB0_10:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
Lloh8:
	adrp	x8, _BUF_NOT_ALLOCATED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUF_NOT_ALLOCATED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #4
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PDEBUG
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entered"

	.comm	_OV511_NUMFRAMES,4,2            ; @OV511_NUMFRAMES
	.comm	_OV511_NUMSBUF,4,2              ; @OV511_NUMSBUF
l_.str.1:                               ; @.str.1
	.asciz	"buffer memory deallocated"

	.comm	_BUF_NOT_ALLOCATED,4,2          ; @BUF_NOT_ALLOCATED
l_.str.2:                               ; @.str.2
	.asciz	"leaving"

	.no_dead_strip	_ov51x_do_dealloc
.subsections_via_symbols
