	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmic_spmi_show_revid
_pmic_spmi_show_revid:                  ## @pmic_spmi_show_revid
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_PMIC_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.1:
	movl	-56(%rbp), %eax
	movq	_PMIC_TYPE_VALUE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_23
## %bb.2:
	movq	_PMIC_SUBTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.3:
	movq	_pmic_spmi_id_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	movl	$8, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %eax
	movq	(%r15), %rdi
	cmpq	%rax, (%rdi,%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_6
	jmp	LBB0_8
LBB0_4:
	xorl	%r13d, %r13d
LBB0_8:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r13d
	jne	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %r15
	jmp	LBB0_11
LBB0_10:
	movq	(%r15), %rax
	movl	%r13d, %ecx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %r15
LBB0_11:
	movq	_PMIC_REV2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	movq	%r12, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.12:
	movq	_PMIC_REV3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.13:
	movq	_PMIC_REV4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.14:
	movl	-48(%rbp), %edx
	movq	_PM8941_SUBTYPE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_15
## %bb.17:
	movl	-44(%rbp), %r8d
	cmpl	$1, %r8d
	jbe	LBB0_18
	jmp	LBB0_19
LBB0_15:
	movq	_PM8226_SUBTYPE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %r8d
	cmpl	(%rax), %edx
	jne	LBB0_19
## %bb.16:
	cmpl	$2, %r8d
	jae	LBB0_19
LBB0_18:
	incl	%r8d
	movl	%r8d, -44(%rbp)
LBB0_19:
	movq	_PM8110_SUBTYPE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_20
## %bb.21:
	movl	-60(%rbp), %r9d
	movl	%r9d, -52(%rbp)
	jmp	LBB0_22
LBB0_20:
	movl	-52(%rbp), %r9d
LBB0_22:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_dev_dbg
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown"

	.comm	_PMIC_TYPE,4,2                  ## @PMIC_TYPE
	.comm	_PMIC_TYPE_VALUE,4,2            ## @PMIC_TYPE_VALUE
	.comm	_PMIC_SUBTYPE,4,2               ## @PMIC_SUBTYPE
	.comm	_pmic_spmi_id_table,8,3         ## @pmic_spmi_id_table
	.comm	_PMIC_REV2,4,2                  ## @PMIC_REV2
	.comm	_PMIC_REV3,4,2                  ## @PMIC_REV3
	.comm	_PMIC_REV4,4,2                  ## @PMIC_REV4
	.comm	_PM8941_SUBTYPE,4,2             ## @PM8941_SUBTYPE
	.comm	_PM8226_SUBTYPE,4,2             ## @PM8226_SUBTYPE
	.comm	_PM8110_SUBTYPE,4,2             ## @PM8110_SUBTYPE
L_.str.1:                               ## @.str.1
	.asciz	"%x: %s v%d.%d\n"

	.no_dead_strip	_pmic_spmi_show_revid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmic_spmi_show_revid
_pmic_spmi_show_revid:                  ; @pmic_spmi_show_revid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PMIC_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PMIC_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.1:
	ldr	w8, [sp, #16]
Lloh3:
	adrp	x9, _PMIC_TYPE_VALUE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PMIC_TYPE_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
; %bb.2:
Lloh6:
	adrp	x8, _PMIC_SUBTYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMIC_SUBTYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.3:
Lloh9:
	adrp	x21, _pmic_spmi_id_table@GOTPAGE
Lloh10:
	ldr	x21, [x21, _pmic_spmi_id_table@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x22, #0
	mov	w23, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #12]
	ldr	x0, [x21]
	ldr	x9, [x0, x23]
	cmp	x9, x8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #16
	cmp	x22, w0, sxtw
	b.lt	LBB0_5
	b	LBB0_8
LBB0_7:
	mov	w22, #0
LBB0_8:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	b.ne	LBB0_10
; %bb.9:
Lloh11:
	adrp	x21, l_.str@PAGE
Lloh12:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	ldr	x8, [x21]
	mov	w9, w22
	lsl	x9, x9, #4
	ldr	x21, [x8, x9]
LBB0_11:
Lloh13:
	adrp	x8, _PMIC_REV2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PMIC_REV2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #28
	mov	x0, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.12:
Lloh16:
	adrp	x8, _PMIC_REV3@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PMIC_REV3@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.13:
Lloh19:
	adrp	x8, _PMIC_REV4@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PMIC_REV4@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #20
	mov	x0, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.14:
	ldr	w2, [sp, #12]
Lloh22:
	adrp	x8, _PM8941_SUBTYPE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PM8941_SUBTYPE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_19
; %bb.15:
	ldr	w4, [sp, #20]
	cmp	w4, #1
	b.hi	LBB0_17
LBB0_16:
	add	w4, w4, #1
	str	w4, [sp, #20]
LBB0_17:
Lloh25:
	adrp	x8, _PM8110_SUBTYPE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PM8110_SUBTYPE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_20
; %bb.18:
	ldr	w5, [sp, #28]
	str	w5, [sp, #24]
	b	LBB0_21
LBB0_19:
Lloh28:
	adrp	x8, _PM8226_SUBTYPE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PM8226_SUBTYPE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w4, [sp, #20]
	cmp	w2, w8
	ccmp	w4, #2, #2, eq
	b.lo	LBB0_16
	b	LBB0_17
LBB0_20:
	ldr	w5, [sp, #24]
LBB0_21:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_dev_dbg
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown"

	.comm	_PMIC_TYPE,4,2                  ; @PMIC_TYPE
	.comm	_PMIC_TYPE_VALUE,4,2            ; @PMIC_TYPE_VALUE
	.comm	_PMIC_SUBTYPE,4,2               ; @PMIC_SUBTYPE
	.comm	_pmic_spmi_id_table,8,3         ; @pmic_spmi_id_table
	.comm	_PMIC_REV2,4,2                  ; @PMIC_REV2
	.comm	_PMIC_REV3,4,2                  ; @PMIC_REV3
	.comm	_PMIC_REV4,4,2                  ; @PMIC_REV4
	.comm	_PM8941_SUBTYPE,4,2             ; @PM8941_SUBTYPE
	.comm	_PM8226_SUBTYPE,4,2             ; @PM8226_SUBTYPE
	.comm	_PM8110_SUBTYPE,4,2             ; @PM8110_SUBTYPE
l_.str.1:                               ; @.str.1
	.asciz	"%x: %s v%d.%d\n"

	.no_dead_strip	_pmic_spmi_show_revid
.subsections_via_symbols
