	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x02_dfs_create_sequence
_mt76x02_dfs_create_sequence:           ## @mt76x02_dfs_create_sequence
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	cmpl	$2, (%rsi)
	sete	%bl
	movq	24(%rdi), %r14
	shlq	$4, %rbx
	movl	(%r14,%rbx), %edi
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mt76_decr
	movl	%eax, %r12d
	movl	4(%r14,%rbx), %edi
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mt76_decr
	movl	%r12d, %r9d
	movl	%eax, %r12d
	xorl	%eax, %eax
	cmpl	%r12d, %r9d
	je	LBB0_25
## %bb.1:
	movq	%r15, %rcx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	leaq	(%r14,%rbx), %rax
	addq	$8, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	8(%rcx), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %r15d
	movl	(%rbx), %esi
	movl	%r9d, %edi
	callq	_mt76_decr
	movl	%eax, %r9d
	cmpl	%r12d, %eax
	je	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r8
	movslq	%r9d, %rcx
	movl	4(%r13), %edx
	leaq	(%rcx,%rcx,2), %r10
	movl	4(%r8,%r10,4), %esi
	leal	(%rsi,%rdx), %ebx
	movl	(%r14), %edi
	leal	-129(%rdi), %eax
	cmpl	$2, %eax
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	sarl	$3, %edi
	cmpl	$600, %ebx                      ## imm = 0x258
	movl	$8, %eax
	cmovll	%eax, %edi
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rbx
	movl	%r15d, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$131, %edi
	jne	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$2, (%r13)
	movl	%r15d, %ecx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	sarl	$6, %ebx
	movl	%ebx, %edi
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	cmpl	$620, %ebx                      ## imm = 0x26C
	setl	%dil
	shll	$4, %edi
	orl	$8, %edi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rbx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	subl	%esi, %edx
	movl	%edx, %eax
	negl	%eax
	cmovsl	%edx, %eax
	cmpl	%edi, %eax
	jg	LBB0_2
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r13), %eax
	movl	8(%r8,%r10,4), %edx
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	subl	%edx, %eax
	cmpl	12(%r14), %eax
	jl	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	16(%r14), %eax
	jg	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r13), %r14d
	movl	(%rbx), %esi
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r9d, %edi
	callq	_mt76_decr
	movl	%r12d, %ecx
	movl	$2, %r15d
	cmpl	%r12d, %eax
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	jne	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r15d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	jle	LBB0_2
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_mt76x02_dfs_seq_pool_get
	testq	%rax, %rax
	je	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%rbx)
	movl	%r15d, 16(%rbx)
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rbx
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_2
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r12d
	movl	$2, %r15d
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=2
	movq	%r14, %r13
	movq	_MT_DFS_EVENT_BUFLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_mt76_decr
	movl	%eax, %r12d
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_14
LBB0_19:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	movslq	%r12d, %rax
	movq	%r13, %r14
	movl	8(%r13), %edi
	leaq	(%rax,%rax,2), %r13
	subl	8(%rbx,%r13,4), %edi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	20(%rax), %edx
	callq	_mt76x02_dfs_get_multiple
	testl	%eax, %eax
	jle	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	leaq	(%rbx,%r13,4), %rax
	addq	$8, %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	incl	%r15d
	jmp	LBB0_18
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_24
LBB0_23:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_24:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_DFS_EVENT_BUFLEN,4,2        ## @MT_DFS_EVENT_BUFLEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mt76x02_dfs_create_sequence
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x02_dfs_create_sequence
_mt76x02_dfs_create_sequence:           ; @mt76x02_dfs_create_sequence
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x26, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x1]
	cmp	w8, #2
	cset	w19, eq
	ldr	x23, [x0, #24]
	add	x22, x23, w19, uxtw #4
	ldr	w0, [x22]
Lloh0:
	adrp	x25, _MT_DFS_EVENT_BUFLEN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MT_DFS_EVENT_BUFLEN@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_mt76_decr
	mov	x24, x0
	ldr	w0, [x22, #4]
	ldr	w1, [x25]
	bl	_mt76_decr
	cmp	w24, w0
	b.ne	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_3:
	mov	x22, x0
	add	x8, x23, x19, lsl #4
	add	x28, x8, #8
	add	x8, x21, #8
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	x23, x25
	str	w26, [sp, #8]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x23]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_mt76_decr
	mov	x24, x0
	cmp	w0, w22
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	ldr	x8, [x28]
	ldr	w9, [x20, #4]
	mov	w10, #12
	smaddl	x10, w24, w10, x8
	ldr	w10, [x10, #4]
	add	w11, w10, w9
	ldr	w12, [x21]
	sub	w13, w12, #129
	cmp	w13, #2
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	asr	w12, w11, #3
	cmp	w11, #600
	mov	w11, #8
	csel	w11, w11, w12, lt
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w12, #131
	b.ne	LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x20]
	cmp	w11, #620
	mov	w13, #8
	mov	w14, #24
	csel	w13, w14, w13, lt
	asr	w11, w11, #6
	cmp	w12, #2
	csel	w11, w13, w11, ne
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x0, w24
	subs	w9, w9, w10
	cneg	w9, w9, mi
	cmp	w9, w11
	b.gt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x20, #8]
	mov	w9, #12
	madd	x8, x0, x9, x8
	ldr	w19, [x8, #8]
	ldr	w8, [x21, #12]
	str	w10, [sp, #28]                  ; 4-byte Folded Spill
	sub	w25, w10, w19
	cmp	w25, w8
	b.lt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #16]
	cmp	w25, w8
	b.gt	LBB0_1
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x20]
	ldr	w1, [x23]
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_mt76_decr
	cmp	w0, w22
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	b.ne	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #2
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w26, [sp, #8]                   ; 4-byte Folded Reload
	cmp	w27, w26
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	b.le	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_mt76x02_dfs_seq_pool_get
	cbz	x0, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	stp	w25, w19, [x0]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	stp	w9, w8, [x0, #8]
	add	x25, x0, #20
	str	w27, [x0, #16]
	mov	x0, x25
	bl	_INIT_LIST_HEAD
	mov	x0, x25
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	bl	_list_add
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
	mov	w27, #2
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	mov	x23, x24
	ldr	w1, [x24]
	mov	x0, x26
	bl	_mt76_decr
	mov	x26, x0
	cmp	w0, w22
	b.eq	LBB0_14
LBB0_19:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x24, x23
	ldr	x8, [x28]
	ldr	w9, [x20, #8]
	mov	w10, #12
	smaddl	x23, w26, w10, x8
	ldr	w8, [x23, #8]!
	sub	w0, w9, w8
	ldr	w2, [x21, #20]
	mov	x1, x25
	bl	_mt76x02_dfs_get_multiple
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	ldr	w19, [x23]
	add	w27, w27, #1
	b	LBB0_18
LBB0_21:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_DFS_EVENT_BUFLEN,4,2        ; @MT_DFS_EVENT_BUFLEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mt76x02_dfs_create_sequence
.subsections_via_symbols
