	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucs1002_get_usb_type
_ucs1002_get_usb_type:                  ## @ucs1002_get_usb_type
	.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	%rsi, %rbx
	movl	(%rdi), %edi
	movq	_UCS1002_REG_PIN_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_F_ACTIVE_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-12(%rbp), %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_2
## %bb.3:
	movslq	%ecx, %rcx
	leaq	l_switch.table.ucs1002_get_usb_type(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_POWER_SUPPLY_USB_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UCS1002_REG_PIN_STATUS,4,2     ## @UCS1002_REG_PIN_STATUS
	.comm	_F_ACTIVE_MODE_MASK,4,2         ## @F_ACTIVE_MODE_MASK
	.comm	_POWER_SUPPLY_USB_TYPE_UNKNOWN,4,2 ## @POWER_SUPPLY_USB_TYPE_UNKNOWN
	.comm	_POWER_SUPPLY_USB_TYPE_PD,4,2   ## @POWER_SUPPLY_USB_TYPE_PD
	.comm	_POWER_SUPPLY_USB_TYPE_SDP,4,2  ## @POWER_SUPPLY_USB_TYPE_SDP
	.comm	_POWER_SUPPLY_USB_TYPE_DCP,4,2  ## @POWER_SUPPLY_USB_TYPE_DCP
	.comm	_POWER_SUPPLY_USB_TYPE_CDP,4,2  ## @POWER_SUPPLY_USB_TYPE_CDP
	.no_dead_strip	_ucs1002_get_usb_type
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ucs1002_get_usb_type
l_switch.table.ucs1002_get_usb_type:
	.quad	_POWER_SUPPLY_USB_TYPE_PD
	.quad	_POWER_SUPPLY_USB_TYPE_SDP
	.quad	_POWER_SUPPLY_USB_TYPE_DCP
	.quad	_POWER_SUPPLY_USB_TYPE_CDP

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucs1002_get_usb_type
_ucs1002_get_usb_type:                  ; @ucs1002_get_usb_type
	.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, x1
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _UCS1002_REG_PIN_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UCS1002_REG_PIN_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _F_ACTIVE_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _F_ACTIVE_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.2:
Lloh6:
	adrp	x9, l_switch.table.ucs1002_get_usb_type@PAGE
Lloh7:
	add	x9, x9, l_switch.table.ucs1002_get_usb_type@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _POWER_SUPPLY_USB_TYPE_UNKNOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_USB_TYPE_UNKNOWN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_5:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_UCS1002_REG_PIN_STATUS,4,2     ; @UCS1002_REG_PIN_STATUS
	.comm	_F_ACTIVE_MODE_MASK,4,2         ; @F_ACTIVE_MODE_MASK
	.comm	_POWER_SUPPLY_USB_TYPE_UNKNOWN,4,2 ; @POWER_SUPPLY_USB_TYPE_UNKNOWN
	.comm	_POWER_SUPPLY_USB_TYPE_PD,4,2   ; @POWER_SUPPLY_USB_TYPE_PD
	.comm	_POWER_SUPPLY_USB_TYPE_SDP,4,2  ; @POWER_SUPPLY_USB_TYPE_SDP
	.comm	_POWER_SUPPLY_USB_TYPE_DCP,4,2  ; @POWER_SUPPLY_USB_TYPE_DCP
	.comm	_POWER_SUPPLY_USB_TYPE_CDP,4,2  ; @POWER_SUPPLY_USB_TYPE_CDP
	.no_dead_strip	_ucs1002_get_usb_type
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ucs1002_get_usb_type
l_switch.table.ucs1002_get_usb_type:
	.quad	_POWER_SUPPLY_USB_TYPE_PD
	.quad	_POWER_SUPPLY_USB_TYPE_SDP
	.quad	_POWER_SUPPLY_USB_TYPE_DCP
	.quad	_POWER_SUPPLY_USB_TYPE_CDP

.subsections_via_symbols
