	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_querybuf
_vidioc_querybuf:                       ## @vidioc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	(%rbx), %r15
	cmpq	(%rax), %r15
	jae	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	16(%r14), %rcx
	movq	%r15, %rdx
	shlq	$4, %rdx
	movq	(%rcx,%rdx), %rcx
	movq	_frame_state_ready@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_4
## %bb.3:
	movq	_V4L2_BUF_FLAG_QUEUED@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 36(%rbx)
LBB0_4:
	movq	_frame_state_done@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_6
## %bb.5:
	movq	_V4L2_BUF_FLAG_DONE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 36(%rbx)
LBB0_6:
	movq	_frame_state_unused@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.7:
	movq	_V4L2_BUF_FLAG_MAPPED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 36(%rbx)
LBB0_8:
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	movl	28(%r14), %edi
	callq	_PAGE_ALIGN
	imull	%eax, %r15d
	movl	%r15d, 32(%rbx)
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	12(%r14), %eax
	imull	8(%r14), %eax
	imull	24(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	16(%r14), %rax
	movq	(%rbx), %rcx
	shlq	$4, %rcx
	movl	12(%rax,%rcx), %edi
	callq	_ns_to_timeval
	movl	%eax, 16(%rbx)
	movq	16(%r14), %rax
	movq	(%rbx), %rcx
	shlq	$4, %rcx
	movl	8(%rax,%rcx), %eax
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ## @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.comm	_frame_state_ready,8,3          ## @frame_state_ready
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ## @V4L2_BUF_FLAG_QUEUED
	.comm	_frame_state_done,8,3           ## @frame_state_done
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ## @V4L2_BUF_FLAG_DONE
	.comm	_frame_state_unused,8,3         ## @frame_state_unused
	.comm	_V4L2_BUF_FLAG_MAPPED,4,2       ## @V4L2_BUF_FLAG_MAPPED
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.no_dead_strip	_vidioc_querybuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_querybuf
_vidioc_querybuf:                       ; @vidioc_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	x19, x2
	bl	_video_drvdata
	ldr	x21, [x19]
	ldr	x8, [x0]
	cmp	x21, x8
	b.hs	LBB0_8
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #36]
	ldr	x9, [x0, #16]
	lsl	x10, x21, #4
	ldr	x9, [x9, x10]
Lloh3:
	adrp	x10, _frame_state_ready@GOTPAGE
Lloh4:
	ldr	x10, [x10, _frame_state_ready@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_3
; %bb.2:
Lloh6:
	adrp	x10, _V4L2_BUF_FLAG_QUEUED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_BUF_FLAG_QUEUED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x19, #36]
LBB0_3:
Lloh9:
	adrp	x10, _frame_state_done@GOTPAGE
Lloh10:
	ldr	x10, [x10, _frame_state_done@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_5
; %bb.4:
Lloh12:
	adrp	x10, _V4L2_BUF_FLAG_DONE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_BUF_FLAG_DONE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w8, w8, w10
	str	w8, [x19, #36]
LBB0_5:
Lloh15:
	adrp	x10, _frame_state_unused@GOTPAGE
Lloh16:
	ldr	x10, [x10, _frame_state_unused@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.6:
Lloh18:
	adrp	x9, _V4L2_BUF_FLAG_MAPPED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_BUF_FLAG_MAPPED@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #36]
LBB0_7:
Lloh21:
	adrp	x22, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh22:
	ldr	x22, [x22, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x19, #24]
	ldr	w0, [x20, #28]
	bl	_PAGE_ALIGN
	mul	w8, w0, w21
	str	w8, [x19, #32]
	ldr	x8, [x22]
	str	x8, [x19, #24]
Lloh23:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldp	w8, w9, [x20, #8]
	mul	w8, w9, w8
	ldr	w9, [x20, #24]
	mul	w8, w8, w9
	str	w8, [x19, #8]
	ldr	x8, [x20, #16]
	ldr	x9, [x19]
	add	x8, x8, x9, lsl #4
	ldr	w0, [x8, #12]
	bl	_ns_to_timeval
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20, #16]
	ldr	x10, [x19]
	add	x9, x9, x10, lsl #4
	ldr	w9, [x9, #8]
	stp	w9, w8, [x19, #12]
	b	LBB0_9
LBB0_8:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ; @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.comm	_frame_state_ready,8,3          ; @frame_state_ready
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ; @V4L2_BUF_FLAG_QUEUED
	.comm	_frame_state_done,8,3           ; @frame_state_done
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ; @V4L2_BUF_FLAG_DONE
	.comm	_frame_state_unused,8,3         ; @frame_state_unused
	.comm	_V4L2_BUF_FLAG_MAPPED,4,2       ; @V4L2_BUF_FLAG_MAPPED
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.no_dead_strip	_vidioc_querybuf
.subsections_via_symbols
