	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_usb_phy_set_mode
_sun4i_usb_phy_set_mode:                ## @sun4i_usb_phy_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_sun4i_usb_phy_data
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	$129, %r12d
	jne	LBB0_2
	jmp	LBB0_7
LBB0_3:
	addl	$-128, %r12d
	cmpl	$3, %r12d
	jae	LBB0_2
## %bb.4:
	movq	%rax, %r14
	movslq	%r12d, %rax
	leaq	l_switch.table.sun4i_usb_phy_set_mode(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %ebx
	cmpl	(%r14), %ebx
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_info
	movl	%ebx, (%r14)
LBB0_6:
	movabsq	$8589934591, %rax               ## imm = 0x1FFFFFFFF
	movq	%rax, 4(%r14)
	movq	_system_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$12, %r14
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_queue_delayed_work
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USB_DR_MODE_HOST,4,2           ## @USB_DR_MODE_HOST
	.comm	_USB_DR_MODE_PERIPHERAL,4,2     ## @USB_DR_MODE_PERIPHERAL
	.comm	_USB_DR_MODE_OTG,4,2            ## @USB_DR_MODE_OTG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Changing dr_mode to %d\n"

	.comm	_system_wq,4,2                  ## @system_wq
	.no_dead_strip	_sun4i_usb_phy_set_mode
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sun4i_usb_phy_set_mode
l_switch.table.sun4i_usb_phy_set_mode:
	.quad	_USB_DR_MODE_OTG
	.quad	_USB_DR_MODE_HOST
	.quad	_USB_DR_MODE_PERIPHERAL

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sun4i_usb_phy_set_mode
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sun4i_usb_phy_set_mode:                ; @sun4i_usb_phy_set_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x20, x0
	bl	_phy_get_drvdata
	mov	x22, x0
	bl	_to_sun4i_usb_phy_data
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_6
	b	LBB0_7
LBB0_2:
	sub	w8, w21, #128
	cmp	w8, #3
	b.hs	LBB0_7
; %bb.3:
	mov	x19, x0
Lloh0:
	adrp	x9, l_switch.table.sun4i_usb_phy_set_mode@PAGE
Lloh1:
	add	x9, x9, l_switch.table.sun4i_usb_phy_set_mode@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w21, [x8]
	ldr	w8, [x0]
	cmp	w21, w8
	b.eq	LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_info
	str	w21, [x19]
LBB0_5:
Lloh4:
	adrp	x8, lCPI0_0@PAGE
Lloh5:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
Lloh6:
	adrp	x8, _system_wq@GOTPAGE
Lloh7:
	ldr	x8, [x8, _system_wq@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #12
	mov	w2, #0
	bl	_queue_delayed_work
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdrp	Lloh4, Lloh6
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USB_DR_MODE_HOST,4,2           ; @USB_DR_MODE_HOST
	.comm	_USB_DR_MODE_PERIPHERAL,4,2     ; @USB_DR_MODE_PERIPHERAL
	.comm	_USB_DR_MODE_OTG,4,2            ; @USB_DR_MODE_OTG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Changing dr_mode to %d\n"

	.comm	_system_wq,4,2                  ; @system_wq
	.no_dead_strip	_sun4i_usb_phy_set_mode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sun4i_usb_phy_set_mode
l_switch.table.sun4i_usb_phy_set_mode:
	.quad	_USB_DR_MODE_OTG
	.quad	_USB_DR_MODE_HOST
	.quad	_USB_DR_MODE_PERIPHERAL

.subsections_via_symbols
