	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl3501_get_tx_buffer
_wl3501_get_tx_buffer:                  ## @wl3501_get_tx_buffer
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	$0, -48(%rbp)
	addl	$4, %ebx
	movl	(%rdi), %eax
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	subl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %ebx
	jg	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movl	4(%rdi), %esi
	xorl	%r13d, %r13d
	leaq	-52(%rbp), %r12
	xorl	%r15d, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$254, %ebx
	leal	-254(%rbx), %eax
	movl	%eax, %ebx
	cmovll	%r13d, %ebx
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	$4, %ecx
	callq	_wl3501_get_from_wla
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r14), %esi
	movq	%r14, %rdi
	leaq	-48(%rbp), %rdx
	movl	$4, %ecx
	callq	_wl3501_set_to_wla
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %esi
	movl	%esi, 4(%r14)
	decl	%r15d
	testl	%esi, %esi
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	addl	%r15d, (%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wl3501_get_tx_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl3501_get_tx_buffer
_wl3501_get_tx_buffer:                  ; @wl3501_get_tx_buffer
	.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	w19, #0
	str	wzr, [sp, #8]
	add	w21, w1, #4
	ldr	w8, [x0]
	mov	w9, #254
	mul	w8, w8, w9
	cmp	w21, w8
	b.gt	LBB0_9
; %bb.1:
	mov	x20, x0
	mov	w22, #0
	ldr	w19, [x0, #4]
	mov	x1, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w21, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w8, w21, #254
	csel	w21, wzr, w8, lt
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_wl3501_get_from_wla
	cbnz	w21, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x20, #4]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #4
	bl	_wl3501_set_to_wla
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #12]
	str	w1, [x20, #4]
	sub	w22, w22, #1
	cbnz	w1, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w21, LBB0_2
; %bb.7:
	str	w19, [x20, #4]
	mov	w19, #0
	b	LBB0_9
LBB0_8:
	ldr	w8, [x20]
	add	w8, w8, w22
	str	w8, [x20]
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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wl3501_get_tx_buffer
.subsections_via_symbols
