	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rj54n1_video_probe
_rj54n1_video_probe:                    ## @rj54n1_video_probe
	.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	%rsi, %r15
	movq	%rdi, %r12
	callq	_to_rj54n1
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_rj54n1_s_power
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_RJ54N1_DEV_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_reg_read
	movl	%eax, %r13d
	movq	_RJ54N1_DEV_CODE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_reg_read
	cmpl	$81, %r13d
	jne	LBB0_4
## %bb.3:
	cmpl	$16, %eax
	jne	LBB0_4
## %bb.5:
	movq	_RJ54N1_IOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	shll	$7, %edx
	movq	%r12, %rdi
	callq	_reg_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	$81, %edx
	movl	$16, %ecx
	callq	_dev_info
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_v4l2_ctrl_handler_setup
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_dev_info
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rj54n1_s_power
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RJ54N1_DEV_CODE,4,2            ## @RJ54N1_DEV_CODE
	.comm	_RJ54N1_DEV_CODE2,4,2           ## @RJ54N1_DEV_CODE2
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No RJ54N1CB0C found, read 0x%x:0x%x\n"

	.comm	_RJ54N1_IOC,4,2                 ## @RJ54N1_IOC
L_.str.1:                               ## @.str.1
	.asciz	"Detected a RJ54N1CB0C chip ID 0x%x:0x%x\n"

	.no_dead_strip	_rj54n1_video_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rj54n1_video_probe
_rj54n1_video_probe:                    ; @rj54n1_video_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	bl	_to_rj54n1
	mov	x19, x0
	mov	w1, #1
	bl	_rj54n1_s_power
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _RJ54N1_DEV_CODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RJ54N1_DEV_CODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_reg_read
	mov	x23, x0
Lloh3:
	adrp	x8, _RJ54N1_DEV_CODE2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RJ54N1_DEV_CODE2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_reg_read
	cmp	w23, #81
	ccmp	w0, #16, #0, eq
	b.eq	LBB0_4
; %bb.2:
	mov	x3, x0
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_dev_info
	b	LBB0_7
LBB0_3:
	mov	x22, x0
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _RJ54N1_IOC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RJ54N1_IOC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x21]
	lsl	w2, w8, #7
	mov	x0, x20
	bl	_reg_write
	tbnz	w0, #31, LBB0_6
; %bb.5:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #81
	mov	w3, #16
	bl	_dev_info
	add	x0, x19, #4
	bl	_v4l2_ctrl_handler_setup
LBB0_6:
	mov	x22, x0
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_rj54n1_s_power
LBB0_8:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RJ54N1_DEV_CODE,4,2            ; @RJ54N1_DEV_CODE
	.comm	_RJ54N1_DEV_CODE2,4,2           ; @RJ54N1_DEV_CODE2
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No RJ54N1CB0C found, read 0x%x:0x%x\n"

	.comm	_RJ54N1_IOC,4,2                 ; @RJ54N1_IOC
l_.str.1:                               ; @.str.1
	.asciz	"Detected a RJ54N1CB0C chip ID 0x%x:0x%x\n"

	.no_dead_strip	_rj54n1_video_probe
.subsections_via_symbols
