	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_handle_event
_v4l2_handle_event:                     ## @v4l2_handle_event
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_ctx_to_m2mctx
	movq	%rax, %rbx
	movups	40(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movups	96(%rax), %xmm0
	movaps	%xmm0, -80(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movl	112(%rax), %edi
	movq	_VIDIOC_DQEVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	-96(%rbp), %rax
	movq	_V4L2_EVENT_SOURCE_CHANGE@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.2:
	movl	112(%rbx), %edi
	movq	_VIDIOC_G_FMT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-80(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	88(%rbx), %ecx
	jmp	LBB0_7
LBB0_4:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r14), %ecx
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_8
LBB0_5:
	movl	112(%rbx), %edi
	movl	(%r12), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	32(%rbx), %ecx
LBB0_7:
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	xorl	%r15d, %r15d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	8(%rbx), %r13
	movq	%rbx, %r12
	addq	$64, %r12
	leaq	-80(%rbp), %rsi
	movq	%r12, %rdi
	callq	_v4l2_resolution_changed
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	callq	_v4l2_get_height
	movq	%rax, 64(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_width
	movq	%rax, 72(%rbx)
	movq	%r12, %rdi
	callq	_v4l2_get_sar
	movq	%rax, 80(%rbx)
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_v4l2_resolution_changed
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movl	$1, (%rbx)
	jmp	LBB0_15
LBB0_13:
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_v4l2_resolution_changed
	testl	%eax, %eax
	je	LBB0_9
LBB0_14:
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	callq	_v4l2_get_height
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	callq	_v4l2_get_width
	movq	%rax, 16(%rbx)
	movq	%r13, %rdi
	callq	_v4l2_get_sar
	movq	%rax, 24(%rbx)
	movl	$1, (%rbx)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
LBB0_15:
	movq	%rbx, %rdi
	callq	_ff_v4l2_m2m_codec_full_reinit
	testl	%eax, %eax
	je	LBB0_24
## %bb.16:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_22
LBB0_17:
	movq	56(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.18:
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rsi
	callq	_ff_set_dimensions
	testl	%eax, %eax
	jns	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_av_log
LBB0_20:
	movq	%rbx, %rdi
	callq	_ff_v4l2_m2m_codec_reinit
	testl	%eax, %eax
	je	LBB0_24
## %bb.21:
	movq	%r14, %rdi
	callq	_logger
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_22:
	xorl	%r15d, %r15d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_24:
	movl	$1, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDIOC_DQEVENT,4,2             ## @VIDIOC_DQEVENT
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s VIDIOC_DQEVENT\n"

	.comm	_V4L2_EVENT_SOURCE_CHANGE,8,3   ## @V4L2_EVENT_SOURCE_CHANGE
	.comm	_VIDIOC_G_FMT,4,2               ## @VIDIOC_G_FMT
L_.str.1:                               ## @.str.1
	.asciz	"%s VIDIOC_G_FMT\n"

L_.str.2:                               ## @.str.2
	.asciz	"v4l2_m2m_codec_full_reinit\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"update avcodec height and width\n"

L_.str.4:                               ## @.str.4
	.asciz	"v4l2_m2m_codec_reinit\n"

	.no_dead_strip	_v4l2_handle_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_handle_event
_v4l2_handle_event:                     ; @v4l2_handle_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x0
	bl	_ctx_to_m2mctx
	mov	x20, x0
	ldur	q1, [x0, #40]
	ldr	q0, [x0, #96]
	stp	q0, q1, [sp, #32]
	stp	xzr, xzr, [sp, #16]
	ldr	w0, [x0, #112]
Lloh0:
	adrp	x8, _VIDIOC_DQEVENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIDIOC_DQEVENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [sp, #16]
Lloh3:
	adrp	x9, _V4L2_EVENT_SOURCE_CHANGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_EVENT_SOURCE_CHANGE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.2:
	ldr	w0, [x20, #112]
Lloh6:
	adrp	x21, _VIDIOC_G_FMT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _VIDIOC_G_FMT@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #32
	bl	_ioctl
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_logger
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w8, [x20, #88]
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_logger
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_5:
	ldr	w0, [x20, #112]
	ldr	w1, [x21]
	add	x2, sp, #48
	bl	_ioctl
	cbz	w0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_logger
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w8, [x20, #32]
LBB0_7:
	str	x8, [sp]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	bl	_av_log
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	add	x21, x20, #8
	add	x23, x20, #64
	add	x1, sp, #32
	mov	x0, x23
	bl	_v4l2_resolution_changed
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.12:
	add	x0, sp, #32
	bl	_v4l2_get_height
	str	x0, [x20, #64]
	add	x0, sp, #32
	bl	_v4l2_get_width
	str	x0, [x20, #72]
	mov	x0, x23
	bl	_v4l2_get_sar
	str	x0, [x20, #80]
	add	x1, sp, #48
	mov	x0, x21
	bl	_v4l2_resolution_changed
	cbnz	w0, LBB0_15
; %bb.13:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_16
LBB0_14:
	add	x1, sp, #48
	mov	x0, x21
	bl	_v4l2_resolution_changed
	cbz	w0, LBB0_10
LBB0_15:
	add	x0, sp, #48
	bl	_v4l2_get_height
	str	x0, [x20, #8]
	add	x0, sp, #48
	bl	_v4l2_get_width
	str	x0, [x20, #16]
	mov	x0, x21
	bl	_v4l2_get_sar
	str	x0, [x20, #24]
	mov	w8, #1
	str	w8, [x20]
	cbz	w22, LBB0_18
LBB0_16:
	mov	x0, x20
	bl	_ff_v4l2_m2m_codec_full_reinit
	cbz	w0, LBB0_24
; %bb.17:
	mov	x0, x19
	bl	_logger
Lloh21:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.2@PAGE
Lloh25:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_23
LBB0_18:
	ldr	x0, [x20, #56]
	cbz	x0, LBB0_21
; %bb.19:
	ldp	x2, x1, [x20, #8]
	bl	_ff_set_dimensions
	tbz	w0, #31, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_logger
Lloh26:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.3@PAGE
Lloh30:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_av_log
LBB0_21:
	mov	x0, x20
	bl	_ff_v4l2_m2m_codec_reinit
	cbz	w0, LBB0_24
; %bb.22:
	mov	x0, x19
	bl	_logger
Lloh31:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x2, l_.str.4@PAGE
Lloh35:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_23:
	bl	_av_log
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_24:
	mov	w0, #1
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDIOC_DQEVENT,4,2             ; @VIDIOC_DQEVENT
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s VIDIOC_DQEVENT\n"

	.comm	_V4L2_EVENT_SOURCE_CHANGE,8,3   ; @V4L2_EVENT_SOURCE_CHANGE
	.comm	_VIDIOC_G_FMT,4,2               ; @VIDIOC_G_FMT
l_.str.1:                               ; @.str.1
	.asciz	"%s VIDIOC_G_FMT\n"

l_.str.2:                               ; @.str.2
	.asciz	"v4l2_m2m_codec_full_reinit\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"update avcodec height and width\n"

l_.str.4:                               ; @.str.4
	.asciz	"v4l2_m2m_codec_reinit\n"

	.no_dead_strip	_v4l2_handle_event
.subsections_via_symbols
