	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qmkusbDataTransmitted          ## -- Begin function qmkusbDataTransmitted
	.p2align	4, 0x90
_qmkusbDataTransmitted:                 ## @qmkusbDataTransmitted
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	16(%rdi), %rax
	leal	-1(%r14), %ecx
	movq	(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_osalSysLockFromISR
	movq	_CHN_OUTPUT_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chnAddFlagsI
	movq	8(%r15), %rax
	movl	%r14d, %r12d
	movq	(%rax,%r12,8), %rax
	movq	8(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	8(%rbx), %rdi
	callq	_obqReleaseEmptyBufferI
LBB0_3:
	leaq	8(%rbx), %rdi
	leaq	-40(%rbp), %rsi
	callq	_obqGetFullBufferI
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-40(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rax, %rdx
LBB0_9:
	callq	_usbStartTransmitI
LBB0_10:
	xorl	%eax, %eax
	callq	_osalSysUnlockFromISR
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rcx
	movq	8(%rcx), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	(%rcx), %ecx
	decl	%ecx
	testl	%eax, %ecx
	jne	LBB0_10
## %bb.7:
	movq	(%rbx), %rax
	cmpl	$0, (%rax)
	jne	LBB0_10
## %bb.8:
	movq	(%r15), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_CHN_OUTPUT_EMPTY,4,2           ## @CHN_OUTPUT_EMPTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qmkusbDataTransmitted          ; -- Begin function qmkusbDataTransmitted
	.p2align	2
_qmkusbDataTransmitted:                 ; @qmkusbDataTransmitted
	.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
	ldr	x8, [x0, #16]
	sub	w9, w1, #1
	ldr	x21, [x8, w9, uxtw #3]
	cbz	x21, LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_osalSysLockFromISR
Lloh0:
	adrp	x8, _CHN_OUTPUT_EMPTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHN_OUTPUT_EMPTY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_chnAddFlagsI
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.2:
	add	x0, x21, #8
	bl	_obqReleaseEmptyBufferI
LBB0_3:
	add	x0, x21, #8
	add	x1, sp, #8
	bl	_obqGetFullBufferI
	cbz	x0, LBB0_8
; %bb.4:
	mov	x2, x0
	ldr	x3, [sp, #8]
	mov	x0, x20
	mov	x1, x19
LBB0_5:
	bl	_usbStartTransmitI
LBB0_6:
	bl	_osalSysUnlockFromISR
LBB0_7:
	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
LBB0_8:
	mov	w8, w19
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x8, lsl #3]
	ldr	x8, [x9, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.9:
	ldr	w9, [x9]
	sub	w9, w9, #1
	tst	x9, x8
	b.ne	LBB0_6
; %bb.10:
	ldr	x8, [x21]
	ldr	w8, [x8]
	cbnz	w8, LBB0_6
; %bb.11:
	ldr	x2, [x20]
	mov	x0, x20
	mov	x1, x19
	mov	x3, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHN_OUTPUT_EMPTY,4,2           ; @CHN_OUTPUT_EMPTY
.subsections_via_symbols
