	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vb2_core_prepare_buf           ## -- Begin function vb2_core_prepare_buf
	.p2align	4, 0x90
_vb2_core_prepare_buf:                  ## @vb2_core_prepare_buf
	.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	%rdx, %r14
	movq	(%rdi), %rax
	movl	%esi, %ecx
	movq	(%rax,%rcx,8), %r15
	movq	(%r15), %rdx
	movq	_VB2_BUF_STATE_DEQUEUED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_1
## %bb.3:
	cmpq	$0, 16(%r15)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rdi, %r12
	movq	%r15, %rdi
	callq	___buf_prepare
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_fill_user_buffer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_call_void_bufop
	movq	8(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_VB2_BUF_STATE_DEQUEUED,8,3     ## @VB2_BUF_STATE_DEQUEUED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid buffer state %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"buffer already prepared\n"

	.comm	_fill_user_buffer,4,2           ## @fill_user_buffer
L_.str.2:                               ## @.str.2
	.asciz	"prepare of buffer %d succeeded\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vb2_core_prepare_buf           ; -- Begin function vb2_core_prepare_buf
	.p2align	2
_vb2_core_prepare_buf:                  ; @vb2_core_prepare_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
	ldr	x20, [x8, w1, uxtw #3]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _VB2_BUF_STATE_DEQUEUED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VB2_BUF_STATE_DEQUEUED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.2:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_dprintk
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
	mov	x19, x2
	mov	x21, x0
	mov	x0, x20
	bl	___buf_prepare
	cbnz	w0, LBB0_5
; %bb.7:
Lloh10:
	adrp	x8, _fill_user_buffer@GOTPAGE
Lloh11:
	ldr	x8, [x8, _fill_user_buffer@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_call_void_bufop
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_dprintk
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VB2_BUF_STATE_DEQUEUED,8,3     ; @VB2_BUF_STATE_DEQUEUED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid buffer state %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"buffer already prepared\n"

	.comm	_fill_user_buffer,4,2           ; @fill_user_buffer
l_.str.2:                               ; @.str.2
	.asciz	"prepare of buffer %d succeeded\n"

.subsections_via_symbols
