	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_write_qmu
_ks_write_qmu:                          ## @ks_write_qmu
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	$0, (%rax)
	movq	%rdx, %rdi
	callq	_cpu_to_le16
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	_KS_RXQCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movzbl	(%rbx), %eax
	movq	_RXQCR_SDA@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_ks_wrreg8
	movq	8(%rbx), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_ks_outblk
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_ALIGN
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_ks_outblk
	movl	(%r12), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ks_wrreg8
	movq	_KS_TXQCR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_TXQCR_METFE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_ks_wrreg16
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ks_rdreg16
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS_RXQCR,4,2                   ## @KS_RXQCR
	.comm	_RXQCR_SDA,4,2                  ## @RXQCR_SDA
	.comm	_KS_TXQCR,4,2                   ## @KS_TXQCR
	.comm	_TXQCR_METFE,4,2                ## @TXQCR_METFE
	.no_dead_strip	_ks_write_qmu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_write_qmu
_ks_write_qmu:                          ; @ks_write_qmu
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	str	xzr, [x8]
	mov	x0, x2
	bl	_cpu_to_le16
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
Lloh0:
	adrp	x22, _KS_RXQCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KS_RXQCR@GOTPAGEOFF]
	ldr	w1, [x22]
	ldrb	w8, [x19]
Lloh2:
	adrp	x9, _RXQCR_SDA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RXQCR_SDA@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ks_wrreg8
	ldr	x1, [x19, #8]
	mov	x0, x19
	mov	w2, #4
	bl	_ks_outblk
	mov	x0, x20
	mov	w1, #4
	bl	_ALIGN
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ks_outblk
	ldr	w1, [x22]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_ks_wrreg8
Lloh4:
	adrp	x20, _KS_TXQCR@GOTPAGE
Lloh5:
	ldr	x20, [x20, _KS_TXQCR@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh6:
	adrp	x21, _TXQCR_METFE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TXQCR_METFE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ks_wrreg16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ks_rdreg16
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.2:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KS_RXQCR,4,2                   ; @KS_RXQCR
	.comm	_RXQCR_SDA,4,2                  ; @RXQCR_SDA
	.comm	_KS_TXQCR,4,2                   ; @KS_TXQCR
	.comm	_TXQCR_METFE,4,2                ; @TXQCR_METFE
	.no_dead_strip	_ks_write_qmu
.subsections_via_symbols
