	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_prepare_decoder
_v4l2_prepare_decoder:                  ## @v4l2_prepare_decoder
	.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	%rdi, %rbx
	leaq	-32(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_V4L2_EVENT_SOURCE_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	4(%rbx), %edi
	movq	_VIDIOC_SUBSCRIBE_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_ioctl
	testl	%eax, %eax
	jns	LBB0_4
## %bb.1:
	movl	%eax, %r15d
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.2:
	cmpq	$0, 16(%rbx)
	jne	LBB0_4
LBB0_3:
	movl	(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movl	%r15d, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_EVENT_SOURCE_CHANGE,4,2   ## @V4L2_EVENT_SOURCE_CHANGE
	.comm	_VIDIOC_SUBSCRIBE_EVENT,4,2     ## @VIDIOC_SUBSCRIBE_EVENT
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"the v4l2 driver does not support VIDIOC_SUBSCRIBE_EVENT\nyou must provide codec_height and codec_width on input\n"

	.no_dead_strip	_v4l2_prepare_decoder
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_prepare_decoder
_v4l2_prepare_decoder:                  ; @v4l2_prepare_decoder
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _V4L2_EVENT_SOURCE_CHANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_EVENT_SOURCE_CHANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x8, _VIDIOC_SUBSCRIBE_EVENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDIOC_SUBSCRIBE_EVENT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	mov	x20, x0
	mov	w0, #0
	tbz	w20, #31, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	mov	x0, x20
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_EVENT_SOURCE_CHANGE,4,2   ; @V4L2_EVENT_SOURCE_CHANGE
	.comm	_VIDIOC_SUBSCRIBE_EVENT,4,2     ; @VIDIOC_SUBSCRIBE_EVENT
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"the v4l2 driver does not support VIDIOC_SUBSCRIBE_EVENT\nyou must provide codec_height and codec_width on input\n"

	.no_dead_strip	_v4l2_prepare_decoder
.subsections_via_symbols
