	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qusb2_phy_set_tune2_param
_qusb2_phy_set_tune2_param:             ## @qusb2_phy_set_tune2_param
	.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
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.1:
	movq	16(%rbx), %r14
	movq	8(%rbx), %r12
	xorl	%esi, %esi
	callq	_nvmem_cell_read
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r15), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.3:
	cmpq	$0, 8(%r12)
	movl	(%rbx), %edi
	movq	(%r12), %rax
	movq	_HSTX_TRIM_SHIFT@GOTPCREL(%rip), %rcx
	je	LBB0_6
## %bb.4:
	movb	(%rcx), %cl
	movq	_QUSB2PHY_PORT_TUNE1@GOTPCREL(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movb	(%rcx), %cl
	movq	_QUSB2PHY_PORT_TUNE2@GOTPCREL(%rip), %rsi
LBB0_5:
	shll	%cl, %edx
	movq	(%rsi), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_HSTX_TRIM_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qusb2_write_mask               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read a valid hs-tx trim value\n"

	.comm	_QUSB2PHY_PORT_TUNE1,8,3        ## @QUSB2PHY_PORT_TUNE1
	.comm	_HSTX_TRIM_SHIFT,4,2            ## @HSTX_TRIM_SHIFT
	.comm	_HSTX_TRIM_MASK,4,2             ## @HSTX_TRIM_MASK
	.comm	_QUSB2PHY_PORT_TUNE2,8,3        ## @QUSB2PHY_PORT_TUNE2
	.no_dead_strip	_qusb2_phy_set_tune2_param
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qusb2_phy_set_tune2_param
_qusb2_phy_set_tune2_param:             ; @qusb2_phy_set_tune2_param
	.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	x19, x0
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_3
; %bb.1:
	ldp	x22, x20, [x19, #8]
	mov	x1, #0
	bl	_nvmem_cell_read
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	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
	b	_dev_dbg
LBB0_3:
	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
LBB0_4:
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.5:
	ldr	w0, [x19]
	ldp	x9, x10, [x22]
	cbz	x10, LBB0_7
; %bb.6:
Lloh2:
	adrp	x10, _QUSB2PHY_PORT_TUNE1@GOTPAGE
Lloh3:
	ldr	x10, [x10, _QUSB2PHY_PORT_TUNE1@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x10, _QUSB2PHY_PORT_TUNE2@GOTPAGE
Lloh5:
	ldr	x10, [x10, _QUSB2PHY_PORT_TUNE2@GOTPAGEOFF]
LBB0_8:
	ldr	x10, [x10]
	ldr	w1, [x9, x10, lsl #2]
Lloh6:
	adrp	x9, _HSTX_TRIM_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HSTX_TRIM_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _HSTX_TRIM_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HSTX_TRIM_MASK@GOTPAGEOFF]
	lsl	w2, w8, w9
Lloh11:
	ldr	w3, [x10]
	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
	b	_qusb2_write_mask
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read a valid hs-tx trim value\n"

	.comm	_QUSB2PHY_PORT_TUNE1,8,3        ; @QUSB2PHY_PORT_TUNE1
	.comm	_HSTX_TRIM_SHIFT,4,2            ; @HSTX_TRIM_SHIFT
	.comm	_HSTX_TRIM_MASK,4,2             ; @HSTX_TRIM_MASK
	.comm	_QUSB2PHY_PORT_TUNE2,8,3        ; @QUSB2PHY_PORT_TUNE2
	.no_dead_strip	_qusb2_phy_set_tune2_param
.subsections_via_symbols
