	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc13783_check_revision
_mc13783_check_revision:                ## @mc13783_check_revision
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_MC13783_REG_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_mc13783_read
	movl	-12(%rbp), %r8d
	movl	%r8d, %eax
	shrl	$3, %eax
	andl	$3, %eax
	movl	%r8d, %ecx
	andl	$7, %ecx
	movl	%ecx, %edx
	xorl	$2, %edx
	orl	%eax, %edx
	movl	$3, %edx
	cmovnel	%eax, %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movl	%r8d, %eax
	andl	$448, %eax                      ## imm = 0x1C0
	cmpl	$128, %eax
	jne	LBB0_2
## %bb.3:
	shrl	$9, %r8d
	andl	$15, %r8d
	leal	(%rdx,%rdx,4), %eax
	leal	(%rcx,%rax,2), %eax
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC13783_REG_REVISION,4,2       ## @MC13783_REG_REVISION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No MC13783 detected.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"MC13783 Rev %d.%d FinVer %x detected\n"

	.no_dead_strip	_mc13783_check_revision
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc13783_check_revision
_mc13783_check_revision:                ; @mc13783_check_revision
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _MC13783_REG_REVISION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MC13783_REG_REVISION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_mc13783_read
	ldr	w8, [sp, #12]
	ubfx	w9, w8, #3, #2
	and	w3, w8, #0x7
	cmp	w3, #2
	ccmp	w9, #0, #0, eq
	mov	w10, #3
	csel	w2, w10, w9, eq
	cbz	w2, LBB0_3
; %bb.1:
	and	w9, w8, #0x1c0
	cmp	w9, #128
	b.ne	LBB0_3
; %bb.2:
	ubfx	w4, w8, #9, #4
	mov	w8, #10
	madd	w8, w2, w8, w3
	str	w8, [x19]
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	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
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MC13783_REG_REVISION,4,2       ; @MC13783_REG_REVISION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No MC13783 detected.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"MC13783 Rev %d.%d FinVer %x detected\n"

	.no_dead_strip	_mc13783_check_revision
.subsections_via_symbols
