	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun6i_video_init               ## -- Begin function sun6i_video_init
	.p2align	4, 0x90
_sun6i_video_init:                      ## @sun6i_video_init
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	$0, -64(%rbp)
	movq	%rsi, 168(%rdi)
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rax
	movq	_MEDIA_PAD_FL_MUST_CONNECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	160(%rdi), %rdx
	movl	%ecx, 160(%rdi)
	leaq	16(%rdi), %r14
	movq	_sun6i_video_media_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rdi)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_media_entity_pads_init
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	80(%rbx), %r13
	movq	%rbx, %rdi
	callq	_mutex_init
	leaq	156(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	152(%rbx), %rdi
	callq	_spin_lock_init
	movq	$0, 144(%rbx)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -72(%rbp)
	movq	_supported_pixformats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movabsq	$3092376454400, %rax            ## imm = 0x2D000000500
	movq	%rax, -88(%rbp)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	leaq	-88(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sun6i_video_set_fmt
	movq	(%r12), %rax
	movq	%rax, 136(%rbx)
	movq	_VB2_MMAP@GOTPCREL(%rip), %rax
	movq	_VB2_DMABUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 80(%rbx)
	movq	%rbx, 128(%rbx)
	movl	$4, 84(%rbx)
	movq	_sun6i_csi_vb2_ops@GOTPCREL(%rip), %rax
	movq	%rax, 120(%rbx)
	movq	_vb2_dma_contig_memops@GOTPCREL(%rip), %rax
	movq	%rax, 112(%rbx)
	movq	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%rbx)
	movq	%rbx, 96(%rbx)
	movl	$3, 88(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 92(%rbx)
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_vb2_queue_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_v4l2_err
LBB0_6:
	movq	%r14, %rdi
	callq	_media_entity_cleanup
	movq	%rbx, %rdi
	callq	_mutex_destroy
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r13d
	jmp	LBB0_7
LBB0_4:
	leaq	8(%rbx), %r13
	movl	76(%rbx), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_strscpy
	movq	_video_device_release_empty@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	_sun6i_video_fops@GOTPCREL(%rip), %rax
	movq	%rax, 64(%rbx)
	movq	_sun6i_video_ioctl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 56(%rbx)
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, 52(%rbx)
	movq	_VFL_DIR_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	%r15, 40(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movq	%rbx, 24(%rbx)
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rax
	movq	_V4L2_CAP_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_video_set_drvdata
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	$-1, %edx
	callq	_video_register_device
	xorl	%r13d, %r13d
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_v4l2_err
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vb2_queue_release
	movl	%r12d, %r13d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_PAD_FL_SINK,4,2          ## @MEDIA_PAD_FL_SINK
	.comm	_MEDIA_PAD_FL_MUST_CONNECT,4,2  ## @MEDIA_PAD_FL_MUST_CONNECT
	.comm	_sun6i_video_media_ops,4,2      ## @sun6i_video_media_ops
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_supported_pixformats,8,3       ## @supported_pixformats
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_VB2_MMAP,4,2                   ## @VB2_MMAP
	.comm	_VB2_DMABUF,4,2                 ## @VB2_DMABUF
	.comm	_sun6i_csi_vb2_ops,4,2          ## @sun6i_csi_vb2_ops
	.comm	_vb2_dma_contig_memops,4,2      ## @vb2_dma_contig_memops
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ## @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vb2_queue_init failed: %d\n"

	.comm	_video_device_release_empty,4,2 ## @video_device_release_empty
	.comm	_sun6i_video_fops,4,2           ## @sun6i_video_fops
	.comm	_sun6i_video_ioctl_ops,4,2      ## @sun6i_video_ioctl_ops
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.comm	_VFL_DIR_RX,4,2                 ## @VFL_DIR_RX
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ## @V4L2_CAP_VIDEO_CAPTURE
L_.str.1:                               ## @.str.1
	.asciz	"video_register_device failed: %d\n"

.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 sun6i_video_init
lCPI0_0:
	.long	1280                            ; 0x500
	.long	720                             ; 0x2d0
lCPI0_1:
	.long	4                               ; 0x4
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_sun6i_video_init
	.p2align	2
_sun6i_video_init:                      ; @sun6i_video_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MEDIA_PAD_FL_SINK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEDIA_PAD_FL_SINK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MEDIA_PAD_FL_MUST_CONNECT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MEDIA_PAD_FL_MUST_CONNECT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x24, x0
	str	w8, [x24, #160]!
	str	xzr, [sp, #24]
	str	x1, [x24, #8]
Lloh6:
	adrp	x8, _sun6i_video_media_ops@GOTPAGE
Lloh7:
	ldr	x8, [x8, _sun6i_video_media_ops@GOTPAGEOFF]
	mov	x20, x24
	str	x8, [x20, #-144]!
	mov	x0, x20
	mov	w1, #1
	mov	x2, x24
	bl	_media_entity_pads_init
	tbnz	w0, #31, LBB0_4
; %bb.1:
	sub	x22, x24, #80
	mov	x0, x19
	bl	_mutex_init
	add	x0, x19, #156
	bl	_INIT_LIST_HEAD
	add	x0, x19, #152
	bl	_spin_lock_init
	str	xzr, [x19, #144]
Lloh8:
	adrp	x25, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh9:
	ldr	x25, [x25, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	x8, [x25]
	str	x8, [sp, #16]
Lloh10:
	adrp	x8, _supported_pixformats@GOTPAGE
Lloh11:
	ldr	x8, [x8, _supported_pixformats@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh13:
	adrp	x9, lCPI0_0@PAGE
Lloh14:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp]
Lloh15:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
	mov	x1, sp
	mov	x0, x19
	bl	_sun6i_video_set_fmt
Lloh18:
	adrp	x8, _VB2_MMAP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VB2_MMAP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _VB2_DMABUF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VB2_DMABUF@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x25]
	str	w8, [x19, #80]
	stp	x19, x9, [x19, #128]
Lloh24:
	adrp	x8, _sun6i_csi_vb2_ops@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sun6i_csi_vb2_ops@GOTPAGEOFF]
Lloh26:
	adrp	x9, _vb2_dma_contig_memops@GOTPAGE
Lloh27:
	ldr	x9, [x9, _vb2_dma_contig_memops@GOTPAGEOFF]
	stp	x9, x8, [x19, #112]
Lloh28:
	adrp	x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x19, #104]
	str	x19, [x19, #96]
Lloh31:
	adrp	x8, lCPI0_1@PAGE
Lloh32:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x19, #84]
	ldr	w8, [x21, #4]
	str	w8, [x19, #92]
	mov	x0, x22
	bl	_vb2_queue_init
	cbz	w0, LBB0_5
; %bb.2:
	mov	x25, x0
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x25
	bl	_v4l2_err
LBB0_3:
	mov	x0, x20
	bl	_media_entity_cleanup
	mov	x0, x19
	bl	_mutex_destroy
	b	LBB0_7
LBB0_4:
	mov	x25, x0
	b	LBB0_7
LBB0_5:
	sub	x24, x24, #152
	ldr	w0, [x19, #76]
	mov	x1, x23
	mov	w2, #4
	bl	_strscpy
Lloh35:
	adrp	x8, _video_device_release_empty@GOTPAGE
Lloh36:
	ldr	x8, [x8, _video_device_release_empty@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _sun6i_video_fops@GOTPAGE
Lloh39:
	ldr	x9, [x9, _sun6i_video_fops@GOTPAGEOFF]
	str	w8, [x19, #72]
Lloh40:
	adrp	x8, _sun6i_video_ioctl_ops@GOTPAGE
Lloh41:
	ldr	x8, [x8, _sun6i_video_ioctl_ops@GOTPAGEOFF]
Lloh42:
	adrp	x23, _VFL_TYPE_GRABBER@GOTPAGE
Lloh43:
	ldr	x23, [x23, _VFL_TYPE_GRABBER@GOTPAGEOFF]
	stp	x8, x9, [x19, #56]
	ldr	w8, [x23]
Lloh44:
	adrp	x9, _VFL_DIR_RX@GOTPAGE
Lloh45:
	ldr	x9, [x9, _VFL_DIR_RX@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	stp	x22, x21, [x19, #32]
	str	x19, [x19, #24]
Lloh47:
	adrp	x8, _V4L2_CAP_STREAMING@GOTPAGE
Lloh48:
	ldr	x8, [x8, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	adrp	x9, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGE
Lloh51:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x24
	mov	x1, x19
	bl	_video_set_drvdata
	ldr	w1, [x23]
	mov	x0, x24
	mov	w2, #-1
	bl	_video_register_device
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	w25, #0
LBB0_7:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	mov	x25, x0
Lloh53:
	adrp	x1, l_.str.1@PAGE
Lloh54:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x25
	bl	_v4l2_err
	mov	x0, x22
	bl	_vb2_queue_release
	b	LBB0_3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdrp	Lloh13, Lloh15
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_PAD_FL_SINK,4,2          ; @MEDIA_PAD_FL_SINK
	.comm	_MEDIA_PAD_FL_MUST_CONNECT,4,2  ; @MEDIA_PAD_FL_MUST_CONNECT
	.comm	_sun6i_video_media_ops,4,2      ; @sun6i_video_media_ops
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_supported_pixformats,8,3       ; @supported_pixformats
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_VB2_MMAP,4,2                   ; @VB2_MMAP
	.comm	_VB2_DMABUF,4,2                 ; @VB2_DMABUF
	.comm	_sun6i_csi_vb2_ops,4,2          ; @sun6i_csi_vb2_ops
	.comm	_vb2_dma_contig_memops,4,2      ; @vb2_dma_contig_memops
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ; @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vb2_queue_init failed: %d\n"

	.comm	_video_device_release_empty,4,2 ; @video_device_release_empty
	.comm	_sun6i_video_fops,4,2           ; @sun6i_video_fops
	.comm	_sun6i_video_ioctl_ops,4,2      ; @sun6i_video_ioctl_ops
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.comm	_VFL_DIR_RX,4,2                 ; @VFL_DIR_RX
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ; @V4L2_CAP_VIDEO_CAPTURE
l_.str.1:                               ; @.str.1
	.asciz	"video_register_device failed: %d\n"

.subsections_via_symbols
