	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_buffer_queue           ## -- Begin function saa7146_buffer_queue
	.p2align	4, 0x90
_saa7146_buffer_queue:                  ## @saa7146_buffer_queue
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_assert_spin_locked
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_DEB_EE
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	cmpq	$0, 8(%rbx)
	je	LBB0_1
## %bb.2:
	leaq	4(%r15), %rdi
	movq	%rbx, %rsi
	callq	_list_add_tail
	movq	_VIDEOBUF_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_DEB_D
	jmp	LBB0_3
LBB0_1:
	movq	%r15, 8(%rbx)
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_DEB_D
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	*8(%r15)
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev:%p, dmaq:%p, buf:%p\n"

L_.str.1:                               ## @.str.1
	.asciz	"immediately activating buffer %p\n"

	.comm	_VIDEOBUF_QUEUED,4,2            ## @VIDEOBUF_QUEUED
L_.str.2:                               ## @.str.2
	.asciz	"adding buffer %p to queue. (active buffer present)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_buffer_queue           ; -- Begin function saa7146_buffer_queue
	.p2align	2
_saa7146_buffer_queue:                  ; @saa7146_buffer_queue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_assert_spin_locked
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_DEB_EE
	cmp	x21, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x19, #4
	mov	x1, x21
	bl	_list_add_tail
Lloh2:
	adrp	x8, _VIDEOBUF_QUEUED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIDEOBUF_QUEUED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_DEB_D
	b	LBB0_3
LBB0_2:
	str	x19, [x21, #8]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_DEB_D
	ldr	x8, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	blr	x8
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev:%p, dmaq:%p, buf:%p\n"

l_.str.1:                               ; @.str.1
	.asciz	"immediately activating buffer %p\n"

	.comm	_VIDEOBUF_QUEUED,4,2            ; @VIDEOBUF_QUEUED
l_.str.2:                               ; @.str.2
	.asciz	"adding buffer %p to queue. (active buffer present)\n"

.subsections_via_symbols
