	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function register_csis_entity
_register_csis_entity:                  ## @register_csis_entity
	.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	%rdx, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	___of_get_csis_id
	jmp	LBB0_3
LBB0_2:
	movl	(%rsi), %esi
	xorl	%edi, %edi
	callq	_max
LBB0_3:
	movl	%eax, %r12d
	testl	%eax, %eax
	sets	%al
	movq	_CSIS_MAX_ENTITIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	setge	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	8(%r15), %rax
	movslq	%r12d, %r13
	movl	(%rax,%r13,4), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_GRP_ID_CSIS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_v4l2_device_register_subdev
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_v4l2_err
	jmp	LBB0_11
LBB0_9:
	movq	8(%r15), %rax
	movl	%r14d, (%rax,%r13,4)
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_CSIS_MAX_ENTITIES,4,2          ## @CSIS_MAX_ENTITIES
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GRP_ID_CSIS,4,2                ## @GRP_ID_CSIS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to register MIPI-CSIS.%d (%d)\n"

	.no_dead_strip	_register_csis_entity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_csis_entity
_register_csis_entity:                  ; @register_csis_entity
	.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
	mov	x20, x2
	mov	x19, x0
	ldr	x0, [x1, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	___of_get_csis_id
	b	LBB0_3
LBB0_2:
	ldr	w1, [x1]
	bl	_max
LBB0_3:
	mov	x21, x0
	cmp	w0, #0
Lloh0:
	adrp	x8, _CSIS_MAX_ENTITIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSIS_MAX_ENTITIES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w0, w8, #0, ge
	cset	w0, ge
	bl	_WARN_ON
	cbz	x0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, w21, sxtw #2]
	bl	_WARN_ON
	cbz	x0, LBB0_9
; %bb.6:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	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_9:
Lloh7:
	adrp	x8, _GRP_ID_CSIS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GRP_ID_CSIS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_v4l2_device_register_subdev
	mov	x22, x0
	cbz	w0, LBB0_11
; %bb.10:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	bl	_v4l2_err
	b	LBB0_8
LBB0_11:
	sxtw	x8, w21
	ldr	x9, [x19, #8]
	str	w20, [x9, x8, lsl #2]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CSIS_MAX_ENTITIES,4,2          ; @CSIS_MAX_ENTITIES
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GRP_ID_CSIS,4,2                ; @GRP_ID_CSIS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to register MIPI-CSIS.%d (%d)\n"

	.no_dead_strip	_register_csis_entity
.subsections_via_symbols
