	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_common_buffers
_free_common_buffers:                   ## @free_common_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_STREAM_VIDEOIN1@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_MAX_STREAM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jae	LBB0_3
## %bb.1:
	leaq	(,%r13,4), %rax
	leaq	(%rax,%rax,2), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %r12
	leaq	(%r12,%rbx), %r15
	leaq	(%r12,%rbx), %rsi
	addq	$8, %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_free_idlebuffer
	leaq	(%r12,%rbx), %rsi
	addq	$4, %rsi
	movq	%r14, %rdi
	callq	_free_ringbuffer
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_free_ringbuffer
	movq	_MAX_STREAM@GOTPCREL(%rip), %rax
	incq	%r13
	addq	$12, %rbx
	cmpq	(%rax), %r13
	jb	LBB0_2
LBB0_3:
	movq	24(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	_OVERFLOW_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edi
	movl	20(%r14), %ecx
	callq	_pci_free_consistent
LBB0_5:
	movq	8(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.7:
	movl	(%r14), %ecx
	movl	16(%r14), %edi
	movl	$4096, %esi                     ## imm = 0x1000
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_free_consistent            ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STREAM_VIDEOIN1,8,3            ## @STREAM_VIDEOIN1
	.comm	_MAX_STREAM,8,3                 ## @MAX_STREAM
	.comm	_OVERFLOW_BUFFER_SIZE,4,2       ## @OVERFLOW_BUFFER_SIZE
	.no_dead_strip	_free_common_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_common_buffers
_free_common_buffers:                   ; @free_common_buffers
	.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	x8, _STREAM_VIDEOIN1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STREAM_VIDEOIN1@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x22, _MAX_STREAM@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_STREAM@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x21, x8
	b.hs	LBB0_3
; %bb.1:
	add	x8, x21, x21, lsl #1
	lsl	x23, x8, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x20, x8, x23
	add	x1, x20, #8
	mov	x0, x19
	mov	x2, x20
	bl	_free_idlebuffer
	add	x1, x20, #4
	mov	x0, x19
	bl	_free_ringbuffer
	mov	x0, x19
	mov	x1, x20
	bl	_free_ringbuffer
	add	x21, x21, #1
	ldr	x8, [x22]
	add	x23, x23, #12
	cmp	x21, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	x2, [x19, #24]
	cbz	x2, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _OVERFLOW_BUFFER_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OVERFLOW_BUFFER_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldp	w0, w3, [x19, #16]
	bl	_pci_free_consistent
LBB0_5:
	ldr	x2, [x19, #8]
	cbz	x2, LBB0_7
; %bb.6:
	ldr	w0, [x19, #16]
	ldr	w3, [x19]
	mov	w1, #4096
	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	_pci_free_consistent
LBB0_7:
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STREAM_VIDEOIN1,8,3            ; @STREAM_VIDEOIN1
	.comm	_MAX_STREAM,8,3                 ; @MAX_STREAM
	.comm	_OVERFLOW_BUFFER_SIZE,4,2       ; @OVERFLOW_BUFFER_SIZE
	.no_dead_strip	_free_common_buffers
.subsections_via_symbols
