	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_write_reg_pairs        ## -- Begin function mt7601u_write_reg_pairs
	.p2align	4, 0x90
_mt7601u_write_reg_pairs:               ## @mt7601u_write_reg_pairs
	.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
	movq	%rdi, -64(%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	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, %r13d
	leal	(,%r13,8), %eax
	cltq
	movq	(%r12), %rcx
	leaq	(%rcx,%rax), %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	%rax, %r12
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_MT_DMA_HDR_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_skb_reserve
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	testl	%r13d, %r13d
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	shlq	$4, %r14
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx,%r13), %rsi
	addq	%r15, %rsi
	movq	%r12, %rdi
	callq	_skb_put_le32
	movq	(%rbx,%r13), %rsi
	movq	%r12, %rdi
	callq	_skb_put_le32
	addq	$16, %r13
	cmpq	%r13, %r14
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_CMD_RANDOM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	cmpl	%r13d, %r14d
	sete	%cl
	movq	-64(%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
	movslq	%r13d, %rax
	shlq	$4, %rax
	addq	%rax, %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	$24, %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	_CMD_RANDOM_WRITE,4,2           ## @CMD_RANDOM_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_write_reg_pairs        ; -- Begin function mt7601u_write_reg_pairs
	.p2align	2
_mt7601u_write_reg_pairs:               ; @mt7601u_write_reg_pairs
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x26, _MT_DMA_HDR_LEN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MT_DMA_HDR_LEN@GOTPAGEOFF]
Lloh2:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
Lloh4:
	adrp	x8, _INBAND_PACKET_MAX_LEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INBAND_PACKET_MAX_LEN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	mov	x1, x19
	bl	_min
	mov	x23, x0
	lsl	w8, w0, #3
	ldr	x9, [x26]
	add	x8, x9, w8, sxtw
	add	x0, x8, #4
	ldr	w1, [x27]
	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
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w28, w23
	add	x25, x20, #8
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25]
	add	x1, x8, x21
	mov	x0, x24
	bl	_skb_put_le32
	ldur	x1, [x25, #-8]
	mov	x0, x24
	bl	_skb_put_le32
	add	x25, x25, #16
	subs	x28, x28, #1
	b.ne	LBB0_5
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh7:
	adrp	x8, _CMD_RANDOM_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CMD_RANDOM_WRITE@GOTPAGEOFF]
Lloh9:
	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	x20, x20, w23, sxtw #4
	subs	w19, w19, w23
	b.ne	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.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	_CMD_RANDOM_WRITE,4,2           ; @CMD_RANDOM_WRITE
.subsections_via_symbols
