	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda_register_device
_coda_register_device:                  ## @coda_register_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	16(%rdi), %r13
	movslq	%esi, %rcx
	imulq	$56, %rcx, %rbx
	leaq	(%rbx,%r13), %r12
	movq	8(%rax), %rax
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %r15d
	movl	4(%rax), %esi
	movl	48(%r13,%rbx), %edi
	movl	$4, %edx
	callq	_strscpy
	movq	_coda_fops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r13,%rbx)
	movq	_coda_ioctl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r13,%rbx)
	movq	_video_device_release_empty@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13,%rbx)
	leaq	4(%r14), %rax
	movq	%rax, 16(%r13,%rbx)
	movq	%r14, 8(%r13,%rbx)
	movq	_VFL_DIR_M2M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13,%rbx)
	movq	_V4L2_CAP_VIDEO_M2M@GOTPCREL(%rip), %rax
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_video_set_drvdata
	movq	_VIDIOC_CROPCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_v4l2_disable_ioctl
	movq	_VIDIOC_G_CROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_v4l2_disable_ioctl
	movq	_VIDIOC_S_CROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_v4l2_disable_ioctl
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_video_register_device
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_CODA_INST_ENCODER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r15
	cmoveq	%rax, %r15
	movq	%r12, %rdi
	callq	_video_device_node_name
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_v4l2_info
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_coda_fops,4,2                  ## @coda_fops
	.comm	_coda_ioctl_ops,4,2             ## @coda_ioctl_ops
	.comm	_video_device_release_empty,4,2 ## @video_device_release_empty
	.comm	_VFL_DIR_M2M,4,2                ## @VFL_DIR_M2M
	.comm	_V4L2_CAP_VIDEO_M2M,4,2         ## @V4L2_CAP_VIDEO_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_VIDIOC_CROPCAP,4,2             ## @VIDIOC_CROPCAP
	.comm	_VIDIOC_G_CROP,4,2              ## @VIDIOC_G_CROP
	.comm	_VIDIOC_S_CROP,4,2              ## @VIDIOC_S_CROP
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s registered as %s\n"

	.comm	_CODA_INST_ENCODER,4,2          ## @CODA_INST_ENCODER
L_.str.1:                               ## @.str.1
	.asciz	"encoder"

L_.str.2:                               ## @.str.2
	.asciz	"decoder"

	.no_dead_strip	_coda_register_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda_register_device
_coda_register_device:                  ; @coda_register_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
	cmp	w9, w1
	b.le	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #16]
	sxtw	x10, w1
	mov	w11, #56
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x10, lsl #3]
	smaddl	x20, w1, w11, x9
	mov	w11, #56
	madd	x22, x10, x11, x9
	ldr	w0, [x22, #48]
	ldp	w21, w1, [x8]
	mov	w2, #4
	bl	_strscpy
Lloh0:
	adrp	x8, _coda_fops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _coda_fops@GOTPAGEOFF]
Lloh2:
	adrp	x9, _coda_ioctl_ops@GOTPAGE
Lloh3:
	ldr	x9, [x9, _coda_ioctl_ops@GOTPAGEOFF]
Lloh4:
	adrp	x10, _video_device_release_empty@GOTPAGE
Lloh5:
	ldr	x10, [x10, _video_device_release_empty@GOTPAGEOFF]
	stp	x9, x8, [x22, #32]
Lloh6:
	ldr	w8, [x10]
	str	w8, [x22, #24]
	add	x8, x19, #4
	stp	x19, x8, [x22, #8]
Lloh7:
	adrp	x8, _VFL_DIR_M2M@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VFL_DIR_M2M@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x22, #4]
Lloh10:
	adrp	x8, _V4L2_CAP_VIDEO_M2M@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_CAP_VIDEO_M2M@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _V4L2_CAP_STREAMING@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	mov	x1, x19
	bl	_video_set_drvdata
Lloh16:
	adrp	x8, _VIDIOC_CROPCAP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VIDIOC_CROPCAP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_disable_ioctl
Lloh19:
	adrp	x8, _VIDIOC_G_CROP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VIDIOC_G_CROP@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_disable_ioctl
Lloh22:
	adrp	x8, _VIDIOC_S_CROP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VIDIOC_S_CROP@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_disable_ioctl
Lloh25:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_video_register_device
	cbnz	w0, LBB0_4
; %bb.2:
Lloh28:
	adrp	x8, _CODA_INST_ENCODER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CODA_INST_ENCODER@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, l_.str.2@PAGE
Lloh32:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh33:
	adrp	x10, l_.str.1@PAGE
Lloh34:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w21, w8
	csel	x21, x10, x9, eq
	mov	x0, x20
	bl	_video_device_node_name
	mov	x3, x0
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_v4l2_info
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_coda_fops,4,2                  ; @coda_fops
	.comm	_coda_ioctl_ops,4,2             ; @coda_ioctl_ops
	.comm	_video_device_release_empty,4,2 ; @video_device_release_empty
	.comm	_VFL_DIR_M2M,4,2                ; @VFL_DIR_M2M
	.comm	_V4L2_CAP_VIDEO_M2M,4,2         ; @V4L2_CAP_VIDEO_M2M
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_VIDIOC_CROPCAP,4,2             ; @VIDIOC_CROPCAP
	.comm	_VIDIOC_G_CROP,4,2              ; @VIDIOC_G_CROP
	.comm	_VIDIOC_S_CROP,4,2              ; @VIDIOC_S_CROP
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s registered as %s\n"

	.comm	_CODA_INST_ENCODER,4,2          ; @CODA_INST_ENCODER
l_.str.1:                               ; @.str.1
	.asciz	"encoder"

l_.str.2:                               ; @.str.2
	.asciz	"decoder"

	.no_dead_strip	_coda_register_device
.subsections_via_symbols
