	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_open
_video_open:                            ## @video_open
	.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, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rbx
	movabsq	$1236950581632, %rax            ## imm = 0x12000000180
	movq	%rax, 8(%rbx)
	movq	_V4L2_PIX_FMT_BGR24@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 20(%rbx)
	movq	$0, 32(%rbx)
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	callq	_saa7146_format_by_fourcc
	movl	12(%rbx), %ecx
	imull	8(%rbx), %ecx
	imull	(%rax), %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movl	%eax, 16(%rbx)
	movq	8(%r15), %rdx
	leaq	4(%r15), %rcx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	_video_qops@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	pushq	%r15
	pushq	%r14
	pushq	$4
	callq	_videobuf_queue_sg_init
	addq	$32, %rsp
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_BGR24,4,2         ## @V4L2_PIX_FMT_BGR24
	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
	.comm	_video_qops,4,2                 ## @video_qops
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.no_dead_strip	_video_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function video_open
lCPI0_0:
	.long	384                             ; 0x180
	.long	288                             ; 0x120
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_video_open:                            ; @video_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21, #8]
Lloh2:
	adrp	x8, _V4L2_PIX_FMT_BGR24@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_PIX_FMT_BGR24@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	str	xzr, [x21, #32]
Lloh5:
	adrp	x8, _V4L2_FIELD_ANY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w1, w8, [x21, #20]
	bl	_saa7146_format_by_fourcc
	ldp	w8, w9, [x21, #8]
	mul	w8, w9, w8
	ldr	w9, [x0]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x21, #16]
	ldr	x2, [x20, #8]
	add	x3, x20, #4
Lloh8:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
Lloh11:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh13:
	ldr	w5, [x8]
	str	x20, [sp]
Lloh14:
	adrp	x1, _video_qops@GOTPAGE
Lloh15:
	ldr	x1, [x1, _video_qops@GOTPAGEOFF]
	mov	x0, x21
	mov	w6, #4
	mov	x7, x19
	bl	_videobuf_queue_sg_init
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_BGR24,4,2         ; @V4L2_PIX_FMT_BGR24
	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
	.comm	_video_qops,4,2                 ; @video_qops
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.no_dead_strip	_video_open
.subsections_via_symbols
