	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_usb_set_mode
_twl4030_usb_set_mode:                  ## @twl4030_usb_set_mode
	.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
	movl	%esi, (%rdi)
	cmpl	$-1, %esi
	je	LBB0_3
## %bb.1:
	movl	%esi, %edx
	movq	%rdi, %rbx
	cmpl	$128, %esi
	jne	LBB0_2
## %bb.4:
	movq	_ULPI_IFC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ULPI_IFC_CTRL_CARKITMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_twl4030_usb_clear_bits
	movq	_POWER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_POWER_CTRL_OTG_ENAB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_twl4030_usb_set_bits
	movq	_ULPI_FUNC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ULPI_FUNC_CTRL_XCVRSEL_MASK@GOTPCREL(%rip), %rax
	movq	_ULPI_FUNC_CTRL_OPMODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_twl4030_usb_clear_bits         ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ULPI_IFC_CTRL,4,2              ## @ULPI_IFC_CTRL
	.comm	_ULPI_IFC_CTRL_CARKITMODE,4,2   ## @ULPI_IFC_CTRL_CARKITMODE
	.comm	_POWER_CTRL,4,2                 ## @POWER_CTRL
	.comm	_POWER_CTRL_OTG_ENAB,4,2        ## @POWER_CTRL_OTG_ENAB
	.comm	_ULPI_FUNC_CTRL,4,2             ## @ULPI_FUNC_CTRL
	.comm	_ULPI_FUNC_CTRL_XCVRSEL_MASK,4,2 ## @ULPI_FUNC_CTRL_XCVRSEL_MASK
	.comm	_ULPI_FUNC_CTRL_OPMODE_MASK,4,2 ## @ULPI_FUNC_CTRL_OPMODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported T2 transceiver mode %d\n"

	.no_dead_strip	_twl4030_usb_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_usb_set_mode
_twl4030_usb_set_mode:                  ; @twl4030_usb_set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	w1, [x0]
	cmn	w1, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x2, x1
	mov	x19, x0
	cmp	w1, #128
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ULPI_IFC_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ULPI_IFC_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ULPI_IFC_CTRL_CARKITMODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ULPI_IFC_CTRL_CARKITMODE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_twl4030_usb_clear_bits
Lloh6:
	adrp	x8, _POWER_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _POWER_CTRL_OTG_ENAB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_CTRL_OTG_ENAB@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_twl4030_usb_set_bits
Lloh12:
	adrp	x8, _ULPI_FUNC_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ULPI_FUNC_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _ULPI_FUNC_CTRL_XCVRSEL_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ULPI_FUNC_CTRL_XCVRSEL_MASK@GOTPAGEOFF]
Lloh17:
	adrp	x9, _ULPI_FUNC_CTRL_OPMODE_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ULPI_FUNC_CTRL_OPMODE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_twl4030_usb_clear_bits
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x19, #4]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ULPI_IFC_CTRL,4,2              ; @ULPI_IFC_CTRL
	.comm	_ULPI_IFC_CTRL_CARKITMODE,4,2   ; @ULPI_IFC_CTRL_CARKITMODE
	.comm	_POWER_CTRL,4,2                 ; @POWER_CTRL
	.comm	_POWER_CTRL_OTG_ENAB,4,2        ; @POWER_CTRL_OTG_ENAB
	.comm	_ULPI_FUNC_CTRL,4,2             ; @ULPI_FUNC_CTRL
	.comm	_ULPI_FUNC_CTRL_XCVRSEL_MASK,4,2 ; @ULPI_FUNC_CTRL_XCVRSEL_MASK
	.comm	_ULPI_FUNC_CTRL_OPMODE_MASK,4,2 ; @ULPI_FUNC_CTRL_OPMODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported T2 transceiver mode %d\n"

	.no_dead_strip	_twl4030_usb_set_mode
.subsections_via_symbols
