	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_buffer_finish          ## -- Begin function saa7146_buffer_finish
	.p2align	4, 0x90
_saa7146_buffer_finish:                 ## @saa7146_buffer_finish
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_assert_spin_locked
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_DEB_EE
	movq	(%r15), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DEB_EE
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	sete	%dil
	callq	_BUG_ON
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%r14d, (%rax)
	xorl	%eax, %eax
	callq	_ktime_get_ns
	movq	(%r15), %rdi
	movl	%eax, 8(%rdi)
	addq	$4, %rdi
	callq	_wake_up
	movq	$0, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DEB_D                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev:%p, dmaq:%p, state:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"q->curr:%p\n"

L_.str.2:                               ## @.str.2
	.asciz	"aiii. no current buffer\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7146_buffer_finish          ; -- Begin function saa7146_buffer_finish
	.p2align	2
_saa7146_buffer_finish:                 ; @saa7146_buffer_finish
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_assert_spin_locked
	stp	x19, x20, [sp, #8]
	str	x21, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DEB_EE
	ldr	x8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DEB_EE
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	str	w20, [x8]
	bl	_ktime_get_ns
	ldr	x8, [x19]
	str	w0, [x8, #8]
	add	x0, x8, #4
	bl	_wake_up
	str	xzr, [x19]
	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
	add	sp, sp, #80
	ret
LBB0_2:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@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
	add	sp, sp, #80
	b	_DEB_D
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev:%p, dmaq:%p, state:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"q->curr:%p\n"

l_.str.2:                               ; @.str.2
	.asciz	"aiii. no current buffer\n"

.subsections_via_symbols
