	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_device_register_subdev    ## -- Begin function v4l2_device_register_subdev
	.p2align	4, 0x90
_v4l2_device_register_subdev:           ## @v4l2_device_register_subdev
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	cmpq	$0, 16(%r15)
	je	LBB0_3
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	48(%r15), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.6:
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	8(%r15), %rdi
	xorl	%ecx, %ecx
	cmpq	(%rax), %rdi
	sete	%cl
	movl	%ecx, (%r15)
	jne	LBB0_10
	jmp	LBB0_12
LBB0_8:
	movl	$0, (%r15)
	movq	8(%r15), %rdi
LBB0_10:
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_11
LBB0_12:
	movq	%r14, 16(%r15)
	movl	16(%r14), %edi
	movl	40(%r15), %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_v4l2_ctrl_add_handler
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_13
LBB0_17:
	cmpl	$0, (%r15)
	jne	LBB0_19
## %bb.18:
	movq	8(%r15), %rdi
	callq	_module_put
LBB0_19:
	movq	$0, 16(%r15)
	jmp	LBB0_20
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_13:
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
LBB0_16:
	movq	%r14, %rdi
	callq	_spin_lock
	addq	$24, %r15
	leaq	4(%r14), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_spin_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_device_register_subdev    ; -- Begin function v4l2_device_register_subdev
	.p2align	2
_v4l2_device_register_subdev:           ; @v4l2_device_register_subdev
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_3
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	ldr	x8, [x19, #48]
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.7:
	mov	x20, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x0, [x19, #8]
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w8, eq
	str	w8, [x19]
	b.ne	LBB0_11
	b	LBB0_12
LBB0_10:
	str	wzr, [x19]
	ldr	x0, [x19, #8]
LBB0_11:
	bl	_try_module_get
	cbz	w0, LBB0_16
LBB0_12:
	str	x20, [x19, #16]
	ldr	w0, [x20, #16]
	ldr	w1, [x19, #40]
	mov	x2, #0
	mov	w3, #1
	bl	_v4l2_ctrl_add_handler
	mov	x21, x0
	cbz	w0, LBB0_17
LBB0_13:
	ldr	w8, [x19]
	cbnz	w8, LBB0_15
; %bb.14:
	ldr	x0, [x19, #8]
	bl	_module_put
LBB0_15:
	str	xzr, [x19, #16]
	b	LBB0_5
LBB0_16:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_4
LBB0_17:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_20
; %bb.18:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x19
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_13
LBB0_20:
	mov	x0, x20
	bl	_spin_lock
	add	x0, x19, #24
	add	x1, x20, #4
	bl	_list_add_tail
	mov	x0, x20
	bl	_spin_unlock
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
