	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ushc_set_bus_freq
_ushc_set_bus_freq:                     ## @ushc_set_bus_freq
	.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, %r14
	testl	%esi, %esi
	movl	$400000, %ebx                   ## imm = 0x61A80
	cmovnel	%esi, %ebx
	movq	_USHC_HOST_CTRL_HIGH_SPD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%edx, %edx
	cmovnel	%esi, %edx
	callq	_ushc_hw_set_host_ctrl
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movl	4(%r14), %r15d
	xorl	%r12d, %r12d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USHC_CLK_FREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USHC_CLK_FREQ_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movzwl	%bx, %r8d
	movl	%ebx, %r9d
	shrl	$16, %r9d
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	pushq	$100
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	%ebx, (%r14)
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %r12d
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USHC_HOST_CTRL_HIGH_SPD,4,2    ## @USHC_HOST_CTRL_HIGH_SPD
	.comm	_USHC_CLK_FREQ,4,2              ## @USHC_CLK_FREQ
	.comm	_USHC_CLK_FREQ_TYPE,4,2         ## @USHC_CLK_FREQ_TYPE
	.no_dead_strip	_ushc_set_bus_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ushc_set_bus_freq
_ushc_set_bus_freq:                     ; @ushc_set_bus_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w8, #6784
	movk	w8, #6, lsl #16
	cmp	w1, #0
	csel	w21, w8, w1, eq
Lloh0:
	adrp	x8, _USHC_HOST_CTRL_HIGH_SPD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USHC_HOST_CTRL_HIGH_SPD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cmp	w2, #0
	csel	w2, wzr, w1, eq
	bl	_ushc_hw_set_host_ctrl
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w20, [x19, #4]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _USHC_CLK_FREQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USHC_CLK_FREQ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _USHC_CLK_FREQ_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USHC_CLK_FREQ_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	and	w4, w21, #0xffff
	lsr	w5, w21, #16
	mov	w8, #100
	str	w8, [sp]
	mov	x0, x20
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_3
; %bb.2:
	mov	w0, #0
	str	w21, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USHC_HOST_CTRL_HIGH_SPD,4,2    ; @USHC_HOST_CTRL_HIGH_SPD
	.comm	_USHC_CLK_FREQ,4,2              ; @USHC_CLK_FREQ
	.comm	_USHC_CLK_FREQ_TYPE,4,2         ; @USHC_CLK_FREQ_TYPE
	.no_dead_strip	_ushc_set_bus_freq
.subsections_via_symbols
