	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks959_submit_tx_fragment
_ks959_submit_tx_fragment:              ## @ks959_submit_tx_fragment
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_KINGSUN_SND_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	-16(%rcx), %r14d
	andl	$-8, %r14d
	movl	(%rdi), %eax
	movl	16(%rdi), %edx
	cmpl	%eax, %r14d
	cmovael	%eax, %r14d
	movl	36(%rdi), %edi
	movl	%r14d, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_obfuscate_tx_buffer
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movq	24(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movq	24(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	8(%rbx), %r12
	movl	32(%rbx), %r13d
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	24(%rbx), %rcx
	movl	16(%rbx), %r8d
	movq	_ks959_send_irq@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r10d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%r15d, %r9d
	pushq	%rbx
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movq	8(%rbx), %rdi
	movq	$0, (%rdi)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	movl	$0, %ecx
	cmovnel	%ecx, %r14d
	movl	%r14d, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KINGSUN_SND_PACKET_SIZE,4,2    ## @KINGSUN_SND_PACKET_SIZE
	.comm	_ks959_send_irq,4,2             ## @ks959_send_irq
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.no_dead_strip	_ks959_submit_tx_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks959_submit_tx_fragment
_ks959_submit_tx_fragment:              ; @ks959_submit_tx_fragment
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _KINGSUN_SND_PACKET_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KINGSUN_SND_PACKET_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	sub	w8, w3, #16
	and	w8, w8, #0xfffffff8
	ldr	w9, [x0]
	cmp	w8, w9
	csel	w20, w8, w9, lo
	ldr	w0, [x0, #36]
	ldr	w2, [x19, #16]
	mov	x1, x20
	bl	_obfuscate_tx_buffer
	mov	x21, x0
	mov	x0, x20
	bl	_cpu_to_le16
	ldr	x8, [x19, #24]
	str	x0, [x8, #8]
	mov	x0, x21
	bl	_cpu_to_le16
	ldr	x8, [x19, #24]
	str	x0, [x8]
	ldr	x22, [x19, #8]
	ldr	w23, [x19, #32]
	mov	x0, x23
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
	ldr	x3, [x19, #24]
	ldr	w4, [x19, #16]
Lloh3:
	adrp	x8, _ks959_send_irq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ks959_send_irq@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	x5, x21
	mov	x7, x19
	bl	_usb_fill_control_urb
	ldr	x0, [x19, #8]
	str	xzr, [x0]
Lloh6:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	cmp	w0, #0
	csel	w8, w20, wzr, eq
	str	w8, [x19, #4]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_KINGSUN_SND_PACKET_SIZE,4,2    ; @KINGSUN_SND_PACKET_SIZE
	.comm	_ks959_send_irq,4,2             ; @ks959_send_irq
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.no_dead_strip	_ks959_submit_tx_fragment
.subsections_via_symbols
