	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77843_muic_get_cable_type
_max77843_muic_get_cable_type:          ## @max77843_muic_get_cable_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%esi, %r8d
	movq	(%rdi), %r9
	movq	_MAX77843_MUIC_STATUS1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MAX77843_MUIC_STATUS1_ADC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r9,%rsi,4), %eax
	movq	_MAX77843_MUIC_STATUS1_ADC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cmpl	$128, %r8d
	je	LBB0_7
## %bb.1:
	cmpl	$129, %r8d
	je	LBB0_5
## %bb.2:
	cmpl	$130, %r8d
	jne	LBB0_11
## %bb.3:
	movq	_MAX77843_MUIC_ADC_OPEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.4:
	movl	$0, (%rdx)
	movl	8(%rdi), %eax
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rdi)
	popq	%rbp
	retq
LBB0_5:
	movq	_MAX77843_MUIC_ADC_OPEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.6:
	movl	$0, (%rdx)
	movl	16(%rdi), %eax
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rdi)
	popq	%rbp
	retq
LBB0_7:
	movq	_MAX77843_MUIC_STATUS2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_MAX77843_MUIC_STATUS2_CHGTYP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r9,%rsi,4), %ecx
	movq	_MAX77843_MUIC_ADC_GROUND@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jne	LBB0_14
## %bb.8:
	movq	_MAX77843_MUIC_CHG_NONE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	jne	LBB0_17
## %bb.9:
	movl	$0, (%rdx)
	movl	12(%rdi), %eax
	movl	(%rsi), %ecx
	jmp	LBB0_10
LBB0_11:
	movl	20(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r8d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_12:
	movl	$1, (%rdx)
	movq	_MAX77843_MUIC_STATUS1_ADC1K_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	(%r9,%rsi,4), %ecx
	movq	_MAX77843_MUIC_STATUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_MAX77843_MUIC_STATUS2_VBVOLT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r9,%rdx,4), %eax
	orl	%ecx, %eax
	movq	_MAX77843_MUIC_STATUS2_VBVOLT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_MAX77843_MUIC_GND_USB_HOST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 16(%rdi)
	popq	%rbp
	retq
LBB0_13:
	movl	$1, (%rdx)
	movl	%eax, 8(%rdi)
	popq	%rbp
	retq
LBB0_14:
	movq	_MAX77843_MUIC_ADC_RESERVED_ACC_3@GOTPCREL(%rip), %r9
	movq	_MAX77843_MUIC_CHG_NONE@GOTPCREL(%rip), %r8
	movl	(%r8), %esi
	cmpl	(%r9), %eax
	jne	LBB0_19
## %bb.15:
	cmpl	%esi, %ecx
	je	LBB0_20
## %bb.16:
	movl	$1, (%rdx)
	movq	_MAX77843_MUIC_CHG_DOCK@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movl	$1, (%rdx)
	movq	_MAX77843_MUIC_CHG_GND@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	movl	%eax, 12(%rdi)
	popq	%rbp
	retq
LBB0_19:
	cmpl	%esi, %ecx
	jne	LBB0_21
LBB0_20:
	movl	$0, (%rdx)
	movl	12(%rdi), %eax
	movl	(%r8), %ecx
LBB0_10:
	movl	%ecx, 12(%rdi)
	popq	%rbp
	retq
LBB0_21:
	movl	$1, (%rdx)
	movl	%ecx, 12(%rdi)
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX77843_MUIC_STATUS1,8,3      ## @MAX77843_MUIC_STATUS1
	.comm	_MAX77843_MUIC_STATUS1_ADC_MASK,4,2 ## @MAX77843_MUIC_STATUS1_ADC_MASK
	.comm	_MAX77843_MUIC_STATUS1_ADC_SHIFT,4,2 ## @MAX77843_MUIC_STATUS1_ADC_SHIFT
	.comm	_MAX77843_MUIC_ADC_OPEN,4,2     ## @MAX77843_MUIC_ADC_OPEN
	.comm	_MAX77843_MUIC_STATUS2,8,3      ## @MAX77843_MUIC_STATUS2
	.comm	_MAX77843_MUIC_STATUS2_CHGTYP_MASK,4,2 ## @MAX77843_MUIC_STATUS2_CHGTYP_MASK
	.comm	_MAX77843_MUIC_ADC_GROUND,4,2   ## @MAX77843_MUIC_ADC_GROUND
	.comm	_MAX77843_MUIC_CHG_NONE,4,2     ## @MAX77843_MUIC_CHG_NONE
	.comm	_MAX77843_MUIC_CHG_GND,8,3      ## @MAX77843_MUIC_CHG_GND
	.comm	_MAX77843_MUIC_ADC_RESERVED_ACC_3,4,2 ## @MAX77843_MUIC_ADC_RESERVED_ACC_3
	.comm	_MAX77843_MUIC_CHG_DOCK,8,3     ## @MAX77843_MUIC_CHG_DOCK
	.comm	_MAX77843_MUIC_STATUS1_ADC1K_MASK,4,2 ## @MAX77843_MUIC_STATUS1_ADC1K_MASK
	.comm	_MAX77843_MUIC_STATUS2_VBVOLT_MASK,4,2 ## @MAX77843_MUIC_STATUS2_VBVOLT_MASK
	.comm	_MAX77843_MUIC_STATUS2_VBVOLT_SHIFT,4,2 ## @MAX77843_MUIC_STATUS2_VBVOLT_SHIFT
	.comm	_MAX77843_MUIC_GND_USB_HOST,4,2 ## @MAX77843_MUIC_GND_USB_HOST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown cable group (%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max77843_muic_get_cable_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77843_muic_get_cable_type
_max77843_muic_get_cable_type:          ; @max77843_muic_get_cable_type
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x10, [x0]
Lloh0:
	adrp	x8, _MAX77843_MUIC_STATUS1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX77843_MUIC_STATUS1@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x8]
	ldr	w8, [x10, x11, lsl #2]
Lloh3:
	adrp	x12, _MAX77843_MUIC_STATUS1_ADC_MASK@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MAX77843_MUIC_STATUS1_ADC_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	and	w8, w12, w8
Lloh6:
	adrp	x12, _MAX77843_MUIC_STATUS1_ADC_SHIFT@GOTPAGE
Lloh7:
	ldr	x12, [x12, _MAX77843_MUIC_STATUS1_ADC_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	asr	w8, w8, w12
	cmp	w1, #128
	b.eq	LBB0_7
; %bb.1:
	mov	x9, x1
	cmp	w1, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #130
	b.ne	LBB0_10
; %bb.3:
Lloh9:
	adrp	x9, _MAX77843_MUIC_ADC_OPEN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX77843_MUIC_ADC_OPEN@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w8, w10
	b.ne	LBB0_12
; %bb.4:
	str	wzr, [x2]
	ldr	w8, [x0, #8]
	ldr	w9, [x9]
	str	w9, [x0, #8]
	b	LBB0_20
LBB0_5:
Lloh11:
	adrp	x9, _MAX77843_MUIC_ADC_OPEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX77843_MUIC_ADC_OPEN@GOTPAGEOFF]
	ldr	w12, [x9]
	cmp	w8, w12
	b.ne	LBB0_11
; %bb.6:
	str	wzr, [x2]
	ldr	w8, [x0, #16]
	ldr	w9, [x9]
	str	w9, [x0, #16]
	b	LBB0_20
LBB0_7:
Lloh13:
	adrp	x9, _MAX77843_MUIC_STATUS2@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MAX77843_MUIC_STATUS2@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	w9, [x10, x9, lsl #2]
Lloh16:
	adrp	x10, _MAX77843_MUIC_STATUS2_CHGTYP_MASK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MAX77843_MUIC_STATUS2_CHGTYP_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh19:
	adrp	x10, _MAX77843_MUIC_ADC_GROUND@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MAX77843_MUIC_ADC_GROUND@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ne	LBB0_13
; %bb.8:
Lloh22:
	adrp	x10, _MAX77843_MUIC_CHG_NONE@GOTPAGE
Lloh23:
	ldr	x10, [x10, _MAX77843_MUIC_CHG_NONE@GOTPAGEOFF]
	ldr	w8, [x10]
	cmp	w9, w8
	b.eq	LBB0_18
; %bb.9:
	mov	w8, #1
	str	w8, [x2]
Lloh24:
	adrp	x8, _MAX77843_MUIC_CHG_GND@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAX77843_MUIC_CHG_GND@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	ldr	w0, [x0, #20]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x9
	bl	_dev_err
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_20
LBB0_11:
	mov	w8, #1
	str	w8, [x2]
	ldr	w8, [x10, x11, lsl #2]
Lloh31:
	adrp	x9, _MAX77843_MUIC_STATUS1_ADC1K_MASK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MAX77843_MUIC_STATUS1_ADC1K_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x11, _MAX77843_MUIC_STATUS2@GOTPAGE
Lloh35:
	ldr	x11, [x11, _MAX77843_MUIC_STATUS2@GOTPAGEOFF]
	and	w8, w9, w8
Lloh36:
	ldr	x9, [x11]
	ldr	w9, [x10, x9, lsl #2]
Lloh37:
	adrp	x10, _MAX77843_MUIC_STATUS2_VBVOLT_MASK@GOTPAGE
Lloh38:
	ldr	x10, [x10, _MAX77843_MUIC_STATUS2_VBVOLT_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w8, w9, w8
Lloh40:
	adrp	x9, _MAX77843_MUIC_STATUS2_VBVOLT_SHIFT@GOTPAGE
Lloh41:
	ldr	x9, [x9, _MAX77843_MUIC_STATUS2_VBVOLT_SHIFT@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh43:
	adrp	x9, _MAX77843_MUIC_GND_USB_HOST@GOTPAGE
Lloh44:
	ldr	x9, [x9, _MAX77843_MUIC_GND_USB_HOST@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0, #16]
	b	LBB0_20
LBB0_12:
	mov	w9, #1
	str	w9, [x2]
	str	w8, [x0, #8]
	b	LBB0_20
LBB0_13:
Lloh46:
	adrp	x10, _MAX77843_MUIC_ADC_RESERVED_ACC_3@GOTPAGE
Lloh47:
	ldr	x10, [x10, _MAX77843_MUIC_ADC_RESERVED_ACC_3@GOTPAGEOFF]
Lloh48:
	ldr	w12, [x10]
Lloh49:
	adrp	x10, _MAX77843_MUIC_CHG_NONE@GOTPAGE
Lloh50:
	ldr	x10, [x10, _MAX77843_MUIC_CHG_NONE@GOTPAGEOFF]
	ldr	w11, [x10]
	cmp	w8, w12
	b.ne	LBB0_17
; %bb.14:
	cmp	w9, w11
	b.eq	LBB0_18
; %bb.15:
	mov	w8, #1
	str	w8, [x2]
Lloh51:
	adrp	x8, _MAX77843_MUIC_CHG_DOCK@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MAX77843_MUIC_CHG_DOCK@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	str	w8, [x0, #12]
	b	LBB0_20
LBB0_17:
	cmp	w9, w11
	b.ne	LBB0_19
LBB0_18:
	str	wzr, [x2]
	ldr	w8, [x0, #12]
	ldr	w9, [x10]
	str	w9, [x0, #12]
	b	LBB0_20
LBB0_19:
	mov	w8, #1
	str	w8, [x2]
	str	w9, [x0, #12]
	mov	x8, x9
LBB0_20:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX77843_MUIC_STATUS1,8,3      ; @MAX77843_MUIC_STATUS1
	.comm	_MAX77843_MUIC_STATUS1_ADC_MASK,4,2 ; @MAX77843_MUIC_STATUS1_ADC_MASK
	.comm	_MAX77843_MUIC_STATUS1_ADC_SHIFT,4,2 ; @MAX77843_MUIC_STATUS1_ADC_SHIFT
	.comm	_MAX77843_MUIC_ADC_OPEN,4,2     ; @MAX77843_MUIC_ADC_OPEN
	.comm	_MAX77843_MUIC_STATUS2,8,3      ; @MAX77843_MUIC_STATUS2
	.comm	_MAX77843_MUIC_STATUS2_CHGTYP_MASK,4,2 ; @MAX77843_MUIC_STATUS2_CHGTYP_MASK
	.comm	_MAX77843_MUIC_ADC_GROUND,4,2   ; @MAX77843_MUIC_ADC_GROUND
	.comm	_MAX77843_MUIC_CHG_NONE,4,2     ; @MAX77843_MUIC_CHG_NONE
	.comm	_MAX77843_MUIC_CHG_GND,8,3      ; @MAX77843_MUIC_CHG_GND
	.comm	_MAX77843_MUIC_ADC_RESERVED_ACC_3,4,2 ; @MAX77843_MUIC_ADC_RESERVED_ACC_3
	.comm	_MAX77843_MUIC_CHG_DOCK,8,3     ; @MAX77843_MUIC_CHG_DOCK
	.comm	_MAX77843_MUIC_STATUS1_ADC1K_MASK,4,2 ; @MAX77843_MUIC_STATUS1_ADC1K_MASK
	.comm	_MAX77843_MUIC_STATUS2_VBVOLT_MASK,4,2 ; @MAX77843_MUIC_STATUS2_VBVOLT_MASK
	.comm	_MAX77843_MUIC_STATUS2_VBVOLT_SHIFT,4,2 ; @MAX77843_MUIC_STATUS2_VBVOLT_SHIFT
	.comm	_MAX77843_MUIC_GND_USB_HOST,4,2 ; @MAX77843_MUIC_GND_USB_HOST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown cable group (%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max77843_muic_get_cable_type
.subsections_via_symbols
