	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vb2_buffer_done                ## -- Begin function vb2_buffer_done
	.p2align	4, 0x90
_vb2_buffer_done:                       ## @vb2_buffer_done
	.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
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	56(%rdi), %r14
	movq	_VB2_BUF_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	setne	%al
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rbx
	cmpl	%r15d, (%rbx)
	setne	%cl
	andb	%al, %cl
	cmpl	$128, %r15d
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%rbx), %r15d
LBB0_3:
	movl	48(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	movl	%r15d, %ecx
	callq	_dprintk
	cmpl	$128, %r15d
	jne	LBB0_4
## %bb.11:
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	$128, (%r13)
	leaq	8(%r14), %rdi
	callq	_atomic_dec
	jmp	LBB0_9
LBB0_4:
	cmpl	$0, 8(%r13)
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_finish@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	40(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r13, %rdi
	callq	_call_void_memop
	incq	%rbx
	movl	8(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_6
LBB0_7:
	movq	$0, 32(%r13)
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	leaq	24(%r13), %rdi
	leaq	12(%r14), %rsi
	callq	_list_add_tail
	movl	%r15d, %eax
	movq	%rax, (%r13)
	leaq	8(%r14), %rdi
	callq	_atomic_dec
	cmpq	$0, 16(%r13)
	je	LBB0_9
## %bb.8:
	leaq	16(%r13), %rbx
	movq	%rbx, %rdi
	callq	_media_request_object_unbind
	movq	%rbx, %rdi
	callq	_media_request_object_put
LBB0_9:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_trace_vb2_buf_done
	cmpl	$128, %r15d
	jne	LBB0_12
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VB2_BUF_STATE_ACTIVE,8,3       ## @VB2_BUF_STATE_ACTIVE
	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"done processing on buffer %d, state: %d\n"

	.comm	_finish,4,2                     ## @finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vb2_buffer_done                ; -- Begin function vb2_buffer_done
	.p2align	2
_vb2_buffer_done:                       ; @vb2_buffer_done
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #56]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _VB2_BUF_STATE_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VB2_BUF_STATE_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_9
; %bb.1:
Lloh3:
	adrp	x8, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x22, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh7:
	ldr	x22, [x22, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
	cmp	w8, w21
	ldr	w8, [x22]
	ccmp	w8, w21, #4, ne
	mov	w8, #128
	ccmp	w21, w8, #4, ne
	cset	w0, ne
	bl	_WARN_ON
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w21, w21, w8, eq
	ldr	w2, [x20, #48]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	mov	x3, x21
	bl	_dprintk
	cmp	w21, #128
	b.ne	LBB0_3
; %bb.2:
	add	x22, x19, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	w8, #128
	str	x8, [x20]
	add	x0, x19, #8
	bl	_atomic_dec
	b	LBB0_8
LBB0_3:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x22, #0
Lloh10:
	adrp	x23, _finish@GOTPAGE
Lloh11:
	ldr	x23, [x23, _finish@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	ldr	x8, [x20, #40]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x20
	bl	_call_void_memop
	add	x22, x22, #1
	ldr	w8, [x20, #8]
	cmp	x22, x8
	b.lo	LBB0_5
LBB0_6:
	str	xzr, [x20, #32]
	add	x22, x19, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x0, x20, #24
	add	x1, x19, #12
	bl	_list_add_tail
	str	x21, [x20]
	add	x0, x19, #8
	bl	_atomic_dec
	mov	x23, x20
	ldr	x8, [x23, #16]!
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x23
	bl	_media_request_object_unbind
	mov	x0, x23
	bl	_media_request_object_put
LBB0_8:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x20
	bl	_trace_vb2_buf_done
	cmp	w21, #128
	b.ne	LBB0_10
LBB0_9:
	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
LBB0_10:
	mov	x0, x19
	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	_wake_up
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VB2_BUF_STATE_ACTIVE,8,3       ; @VB2_BUF_STATE_ACTIVE
	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"done processing on buffer %d, state: %d\n"

	.comm	_finish,4,2                     ; @finish
.subsections_via_symbols
