	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbcir_tx
_wbcir_tx:                              ## @wbcir_tx
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$4, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	movl	%r15d, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r14,4), %edi
	movl	$10, %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, (%r13,%r14,4)
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	_WBCIR_TXSTATE_INACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.8:
	movq	%r13, 8(%rbx)
	movl	%r15d, 16(%rbx)
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_wbcir_irq_tx
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r13, %rdi
	callq	_kfree
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WBCIR_TXSTATE_INACTIVE,8,3     ## @WBCIR_TXSTATE_INACTIVE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_wbcir_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbcir_tx
_wbcir_tx:                              ; @wbcir_tx
	.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, x2
	mov	x22, x1
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #4
	bl	_kmalloc_array
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	cbz	w19, LBB0_4
; %bb.2:
	mov	w23, w19
	mov	x24, x21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22], #4
	mov	w1, #10
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x24], #4
	subs	x23, x23, #1
	b.ne	LBB0_3
LBB0_4:
	add	x22, x20, #20
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _WBCIR_TXSTATE_INACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WBCIR_TXSTATE_INACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	str	x21, [x20, #8]
	str	w19, [x20, #16]
	str	xzr, [x20, #24]
	mov	x0, x20
	bl	_wbcir_irq_tx
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	bl	_kfree
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	mov	x0, x19
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WBCIR_TXSTATE_INACTIVE,8,3     ; @WBCIR_TXSTATE_INACTIVE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_wbcir_tx
.subsections_via_symbols
