	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_querybuf              ## -- Begin function videobuf_querybuf
	.p2align	4, 0x90
_videobuf_querybuf:                     ## @videobuf_querybuf
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	callq	_videobuf_queue_lock
	movq	(%r15), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	8(%r15), %rax
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movq	8(%r14), %rax
	movq	8(%r15), %rcx
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rcx,8)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movl	$1, %edi
	callq	_dprintk
LBB0_8:
	movq	%r14, %rdi
	callq	_videobuf_queue_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r14), %rcx
	movq	8(%r14), %rax
	movq	8(%r15), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_videobuf_status
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"querybuf: Wrong type.\n"

	.comm	_VIDEO_MAX_FRAME,8,3            ## @VIDEO_MAX_FRAME
L_.str.1:                               ## @.str.1
	.asciz	"querybuf: index out of range.\n"

L_.str.2:                               ## @.str.2
	.asciz	"querybuf: buffer is null.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_querybuf              ; -- Begin function videobuf_querybuf
	.p2align	2
_videobuf_querybuf:                     ; @videobuf_querybuf
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	bl	_videobuf_queue_lock
	ldr	x8, [x21]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _VIDEO_MAX_FRAME@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, hs
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.5:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	w0, #1
	bl	_dprintk
LBB0_7:
	mov	x0, x19
	bl	_videobuf_queue_unlock
	mov	x0, x20
	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
LBB0_8:
	ldr	x8, [x21, #8]
	ldp	x3, x9, [x19]
	ldr	x2, [x9, x8, lsl #3]
	mov	x0, x19
	mov	x1, x21
	bl	_videobuf_status
	mov	w20, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"querybuf: Wrong type.\n"

	.comm	_VIDEO_MAX_FRAME,8,3            ; @VIDEO_MAX_FRAME
l_.str.1:                               ; @.str.1
	.asciz	"querybuf: index out of range.\n"

l_.str.2:                               ; @.str.2
	.asciz	"querybuf: buffer is null.\n"

.subsections_via_symbols
