	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_burst_write_regs       ## -- Begin function mt7601u_burst_write_regs
	.p2align	4, 0x90
_mt7601u_burst_write_regs:              ## @mt7601u_burst_write_regs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.1:
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	_MT_DMA_HDR_LEN@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	_INBAND_PACKET_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	decl	%edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, %r13d
	leal	(,%r13,4), %eax
	movslq	%eax, %rcx
	movq	(%r12), %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx), %rdi
	addq	$4, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_alloc_skb
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rcx
	movq	%rax, %r12
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_skb_reserve
	movq	_MT_MCU_MEMMAP_WLAN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	addq	%r15, %rsi
	movq	%r12, %rdi
	callq	_skb_put_le32
	testl	%r13d, %r13d
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%r14,8), %rsi
	movq	%r12, %rdi
	callq	_skb_put_le32
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_CMD_BURST_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r13d, %r14d
	sete	%cl
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_mt7601u_mcu_msg_send
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	addq	-72(%rbp), %r15                 ## 8-byte Folded Reload
	movslq	%r13d, %rax
	leaq	(%rbx,%rax,8), %rbx
	subl	%r13d, %r14d
	movq	_MT_DMA_HDR_LEN@GOTPCREL(%rip), %r12
	jne	LBB0_2
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INBAND_PACKET_MAX_LEN,4,2      ## @INBAND_PACKET_MAX_LEN
	.comm	_MT_DMA_HDR_LEN,8,3             ## @MT_DMA_HDR_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MT_MCU_MEMMAP_WLAN,8,3         ## @MT_MCU_MEMMAP_WLAN
	.comm	_CMD_BURST_WRITE,4,2            ## @CMD_BURST_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_burst_write_regs       ; -- Begin function mt7601u_burst_write_regs
	.p2align	2
_mt7601u_burst_write_regs:              ; @mt7601u_burst_write_regs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	w3, LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x27, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x26, _MT_DMA_HDR_LEN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MT_DMA_HDR_LEN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
Lloh2:
	adrp	x8, _INBAND_PACKET_MAX_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INBAND_PACKET_MAX_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	sub	w0, w8, #1
	mov	x1, x19
	bl	_min
	mov	x23, x0
	lsl	w8, w0, #2
	sxtw	x25, w8
	ldr	x8, [x26]
	add	x8, x8, x25
	add	x0, x8, #4
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_alloc_skb
	cbz	x0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
	ldr	x1, [x26]
	bl	_skb_reserve
Lloh8:
	adrp	x8, _MT_MCU_MEMMAP_WLAN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MT_MCU_MEMMAP_WLAN@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	x0, x24
	bl	_skb_put_le32
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w28, w23
	mov	x20, x27
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x20], #8
	mov	x0, x24
	bl	_skb_put_le32
	subs	x28, x28, #1
	b.ne	LBB0_5
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh11:
	adrp	x8, _CMD_BURST_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CMD_BURST_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	cmp	w19, w23
	cset	w3, eq
	mov	x0, x22
	mov	x1, x24
	bl	_mt7601u_mcu_msg_send
	cbnz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, x25
	add	x27, x27, w23, sxtw #3
	subs	w19, w19, w23
	b.ne	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_INBAND_PACKET_MAX_LEN,4,2      ; @INBAND_PACKET_MAX_LEN
	.comm	_MT_DMA_HDR_LEN,8,3             ; @MT_DMA_HDR_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MT_MCU_MEMMAP_WLAN,8,3         ; @MT_MCU_MEMMAP_WLAN
	.comm	_CMD_BURST_WRITE,4,2            ; @CMD_BURST_WRITE
.subsections_via_symbols
