	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_get_raw_format
_v4l2_get_raw_format:                   ## @v4l2_get_raw_format
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	(%rdi), %r12d
	leaq	-56(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	4(%r13), %eax
	movl	%eax, -48(%rbp)
	movq	_AV_PIX_FMT_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_v4l2_try_raw_format
	testl	%eax, %eax
	je	LBB0_8
LBB0_2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_ctx_to_m2mctx
	movl	(%rax), %edi
	movq	_VIDIOC_ENUM_FMT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-56(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_AV_CODEC_ID_RAWVIDEO@GOTPCREL(%rip), %r15
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %edi
	movl	(%r15), %esi
	callq	_ff_v4l2_format_v4l2_to_avfmt
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_v4l2_try_raw_format
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	-56(%rbp)
	movq	%r13, %rdi
	callq	_ctx_to_m2mctx
	movl	(%rax), %edi
	movl	(%r14), %esi
	movq	%r12, %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_NONE,4,2            ## @AV_PIX_FMT_NONE
	.comm	_VIDIOC_ENUM_FMT,4,2            ## @VIDIOC_ENUM_FMT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_CODEC_ID_RAWVIDEO,4,2       ## @AV_CODEC_ID_RAWVIDEO
	.no_dead_strip	_v4l2_get_raw_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_get_raw_format
_v4l2_get_raw_format:                   ; @v4l2_get_raw_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x20, x0
	ldr	w21, [x0]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w8, [x20, #4]
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _AV_PIX_FMT_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PIX_FMT_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_v4l2_try_raw_format
	cbz	w0, LBB0_8
LBB0_2:
	mov	x0, x20
	bl	_ctx_to_m2mctx
	ldr	w0, [x0]
Lloh3:
	adrp	x22, _VIDIOC_ENUM_FMT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _VIDIOC_ENUM_FMT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, sp
	bl	_ioctl
	cbnz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x23, _AV_CODEC_ID_RAWVIDEO@GOTPAGE
Lloh6:
	ldr	x23, [x23, _AV_CODEC_ID_RAWVIDEO@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #4]
	ldr	w1, [x23]
	bl	_ff_v4l2_format_v4l2_to_avfmt
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_v4l2_try_raw_format
	cbz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp]
	add	w8, w8, #1
	str	w8, [sp]
	mov	x0, x20
	bl	_ctx_to_m2mctx
	ldr	w0, [x0]
	ldr	w1, [x22]
	mov	x2, sp
	bl	_ioctl
	cbz	w0, LBB0_4
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_8
LBB0_7:
	str	w21, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_NONE,4,2            ; @AV_PIX_FMT_NONE
	.comm	_VIDIOC_ENUM_FMT,4,2            ; @VIDIOC_ENUM_FMT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_CODEC_ID_RAWVIDEO,4,2       ; @AV_CODEC_ID_RAWVIDEO
	.no_dead_strip	_v4l2_get_raw_format
.subsections_via_symbols
