	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_free_buffers
_pwc_free_buffers:                      ## @pwc_free_buffers
	.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, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_MEMORY
	testq	%r15, %r15
	je	LBB0_18
## %bb.1:
	movq	_MAX_ISO_BUFS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	32(%r15), %rcx
	leaq	L_.str.1(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_MEMORY
	movq	32(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_kfree
	movq	32(%r15), %rcx
	movq	$0, (%rcx,%rbx,8)
	movl	(%r12), %eax
	jmp	LBB0_5
LBB0_6:
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.7:
	movq	_default_fbufs@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	leaq	L_.str.2(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rbx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_MEMORY
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_vfree
	movq	24(%r15), %rdi
	movq	$0, (%rdi,%rbx,8)
	movl	(%r12), %eax
	jmp	LBB0_11
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	_kfree
	movq	$0, 24(%r15)
LBB0_13:
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_MEMORY
	movq	16(%r15), %rdi
	callq	_kfree
	movq	$0, 16(%r15)
LBB0_15:
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_MEMORY
	movq	8(%r15), %rdi
	movq	_pwc_mbufs@GOTPCREL(%rip), %rax
	movl	(%r15), %esi
	imull	(%rax), %esi
	callq	_pwc_rvfree
LBB0_17:
	movq	$0, 8(%r15)
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PWC_DEBUG_MEMORY               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Entering free_buffers(%p).\n"

	.comm	_MAX_ISO_BUFS,4,2               ## @MAX_ISO_BUFS
L_.str.1:                               ## @.str.1
	.asciz	"Freeing ISO buffer at %p.\n"

	.comm	_default_fbufs,4,2              ## @default_fbufs
L_.str.2:                               ## @.str.2
	.asciz	"Freeing frame buffer %d at %p.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Freeing decompression buffer at %p.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Freeing image buffer at %p.\n"

	.comm	_pwc_mbufs,4,2                  ## @pwc_mbufs
L_.str.5:                               ## @.str.5
	.asciz	"Leaving free_buffers().\n"

	.no_dead_strip	_pwc_free_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_free_buffers
_pwc_free_buffers:                      ; @pwc_free_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	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
	.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
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PWC_DEBUG_MEMORY
	cbz	x19, LBB0_12
; %bb.1:
Lloh2:
	adrp	x21, _MAX_ISO_BUFS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MAX_ISO_BUFS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
	ldr	x9, [x19, #32]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x22, lsl #3]
	cbz	x10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x10, [sp]
	mov	x0, x20
	bl	_PWC_DEBUG_MEMORY
	ldr	x8, [x19, #32]
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_kfree
	ldr	x9, [x19, #32]
	str	xzr, [x9, x23]
	ldr	w8, [x21]
	b	LBB0_3
LBB0_6:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_14
; %bb.7:
Lloh6:
	adrp	x21, _default_fbufs@GOTPAGE
Lloh7:
	ldr	x21, [x21, _default_fbufs@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.8:
	mov	x22, #0
Lloh8:
	adrp	x20, l_.str.2@PAGE
Lloh9:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x0, x22, lsl #3]
	cbz	x9, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	stp	x22, x9, [sp]
	mov	x0, x20
	bl	_PWC_DEBUG_MEMORY
	ldr	x8, [x19, #24]
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_vfree
	ldr	x0, [x19, #24]
	str	xzr, [x0, x23]
	ldr	w8, [x21]
	b	LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	bl	_kfree
	str	xzr, [x19, #24]
LBB0_14:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_16
; %bb.15:
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_PWC_DEBUG_MEMORY
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
LBB0_16:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_18
; %bb.17:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_PWC_DEBUG_MEMORY
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x8, _pwc_mbufs@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pwc_mbufs@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	mul	w1, w9, w8
	bl	_pwc_rvfree
LBB0_18:
	str	xzr, [x19, #8]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PWC_DEBUG_MEMORY
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Entering free_buffers(%p).\n"

	.comm	_MAX_ISO_BUFS,4,2               ; @MAX_ISO_BUFS
l_.str.1:                               ; @.str.1
	.asciz	"Freeing ISO buffer at %p.\n"

	.comm	_default_fbufs,4,2              ; @default_fbufs
l_.str.2:                               ; @.str.2
	.asciz	"Freeing frame buffer %d at %p.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Freeing decompression buffer at %p.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Freeing image buffer at %p.\n"

	.comm	_pwc_mbufs,4,2                  ; @pwc_mbufs
l_.str.5:                               ; @.str.5
	.asciz	"Leaving free_buffers().\n"

	.no_dead_strip	_pwc_free_buffers
.subsections_via_symbols
