	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd_mac_config_beacon
_zd_mac_config_beacon:                  ## @zd_mac_config_beacon
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	callq	_zd_hw_mac
	movq	%rax, %r15
	movl	(%rbx), %r13d
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_zd_mac_match_cur_beacon
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_40
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_zd_chip_is_zd1211b
                                        ## kill: def $eax killed $eax def $rax
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	leal	(%rax,%r13), %ebx
	addl	$5, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$16, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r13
	movl	%ebx, -84(%rbp)                 ## 4-byte Spill
	movq	_CR_BCN_FIFO_SEMAPHORE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_zd_iowrite32_locked
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_zd_ioread32_locked
	testl	%eax, %eax
	js	LBB0_29
## %bb.4:
	movl	-44(%rbp), %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.5:
	testb	$2, %al
	je	LBB0_10
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_30
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_39
LBB0_8:
	movl	%eax, %r12d
	jmp	LBB0_38
LBB0_9:
	testb	$2, %al
	jne	LBB0_16
LBB0_10:
	movq	_CR_BCN_FIFO@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%rax, 8(%r13)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	3(%rax), %r12d
	movl	%r12d, (%r13)
	movq	%r15, %rdi
	callq	_zd_chip_is_zd1211b
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	_CR_BCN_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r13)
	movl	%r12d, 16(%r13)
	movl	$2, %r10d
	jmp	LBB0_13
LBB0_12:
	movl	$1, %r10d
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_28
## %bb.14:
	movq	8(%rax), %r8
	movl	%r10d, %r10d
	cmpl	$1, %r9d
	jne	LBB0_23
## %bb.15:
	xorl	%esi, %esi
	jmp	LBB0_26
LBB0_16:
	movq	_jiffies@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	addl	%eax, %edx
	movslq	%edx, %rdx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %r12
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	$20, %edi
	callq	_msleep
	testb	$2, -44(%rbp)
	je	LBB0_10
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	_CR_BCN_FIFO_SEMAPHORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	leaq	-44(%rbp), %rsi
	callq	_zd_ioread32_locked
	testl	%eax, %eax
	js	LBB0_29
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r12, %rdi
	callq	_time_is_before_eq_jiffies
	testq	%rax, %rax
	je	LBB0_17
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movslq	(%r14), %r13
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_zd_mac_dev
	movl	%eax, %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_time_is_before_eq_jiffies
	testq	%rax, %rax
	jne	LBB0_46
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	imulq	$1717986919, %rbx, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movslq	%eax, %r12
	addq	%r13, %r12
	jmp	LBB0_17
LBB0_23:
	movq	%r10, %rcx
	shlq	$4, %rcx
	leaq	(%rcx,%r13), %rdi
	addq	$24, %rdi
	movl	%r9d, %edx
	andl	$-2, %edx
	negq	%rdx
	xorl	%esi, %esi
	movq	%r8, %rcx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	%rax, -16(%rdi)
	movl	(%rcx), %eax
	movl	%eax, -24(%rdi)
	movq	(%rbx), %rax
	movq	%rax, (%rdi)
	movl	1(%rcx), %eax
	movl	%eax, -8(%rdi)
	addq	$-2, %rsi
	addq	$32, %rdi
	addq	$2, %rcx
	cmpq	%rsi, %rdx
	jne	LBB0_24
## %bb.25:
	subq	%rsi, %r10
	negq	%rsi
LBB0_26:
	testb	$1, %r9b
	je	LBB0_28
## %bb.27:
	movq	(%rbx), %rcx
	movq	%r10, %rdx
	shlq	$4, %rdx
	movq	%rcx, 8(%r13,%rdx)
	movl	(%r8,%rsi), %ecx
	movl	%ecx, (%r13,%rdx)
	incq	%r10
LBB0_28:
	movl	%r10d, %ecx
	movq	(%rbx), %rdx
	shlq	$4, %rcx
	movq	%rdx, 8(%r13,%rcx)
	movl	$0, (%r13,%rcx)
	movq	(%rbx), %rdx
	movq	%rdx, 24(%r13,%rcx)
	movl	$0, 16(%r13,%rcx)
	movq	(%rbx), %rdx
	movq	%rdx, 40(%r13,%rcx)
	movl	$0, 32(%r13,%rcx)
	movq	(%rbx), %rdx
	movq	%rdx, 56(%r13,%rcx)
	movl	$0, 48(%r13,%rcx)
	addl	$4, %r10d
	xorl	%edi, %edi
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r10d
	setne	%dil
	callq	_BUG_ON
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_zd_iowrite32a_locked
LBB0_29:
	movl	%eax, %r13d
LBB0_30:
	movq	%r15, %rdi
	movq	_jiffies@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CR_BCN_FIFO_SEMAPHORE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rdi, %r14
	movl	$1, %esi
	callq	_zd_iowrite32_locked
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_33
LBB0_31:
	testl	%r13d, %r13d
	js	LBB0_36
## %bb.32:
	movq	%r14, %rdi
	callq	_zd_mac_free_cur_beacon_locked
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r14)
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	shll	$19, %esi
	addl	$2098176, %esi                  ## imm = 0x200400
	movq	_CR_BCN_PLCP_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_zd_iowrite32_locked
	movl	%eax, %r12d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_37
LBB0_33:
	movq	%r15, %rcx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	_CR_BCN_FIFO_SEMAPHORE@GOTPCREL(%rip), %r15
	je	LBB0_42
LBB0_34:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r12d
	negl	%r12d
	testl	%eax, %eax
	jle	LBB0_31
## %bb.35:
	movq	%r14, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_36:
	testl	%r13d, %r13d
	cmovsl	%r13d, %r12d
	movq	%r14, %rdi
	callq	_zd_mac_free_cur_beacon_locked
LBB0_37:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_38:
	movq	%r13, %rdi
	callq	_kfree
LBB0_39:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_40:
	movq	%rbx, %rdi
	callq	_kfree_skb
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_41:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_42:
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	movslq	%eax, %rbx
	addq	%rcx, %rbx
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_time_is_before_eq_jiffies
	testq	%rax, %rax
	jne	LBB0_34
## %bb.44:                              ##   in Loop: Header=BB0_43 Depth=1
	movl	$20, %edi
	callq	_msleep
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_zd_iowrite32_locked
	testl	%eax, %eax
	js	LBB0_43
## %bb.45:
	movl	%eax, %r12d
	jmp	LBB0_31
LBB0_46:
	movq	%r15, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_zd_mac_free_cur_beacon_locked
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree_skb
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movq	%r15, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
	movl	(%r15), %edi
	callq	_usb_queue_reset_device
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CR_BCN_FIFO_SEMAPHORE,4,2      ## @CR_BCN_FIFO_SEMAPHORE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CR_BCN_FIFO_SEMAPHORE not ready\n"

L_.str.1:                               ## @.str.1
	.asciz	"Giving up beacon config.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CR_BCN_FIFO,8,3                ## @CR_BCN_FIFO
	.comm	_CR_BCN_LENGTH,8,3              ## @CR_BCN_LENGTH
L_.str.2:                               ## @.str.2
	.asciz	"Could not release CR_BCN_FIFO_SEMAPHORE!\n"

	.comm	_CR_BCN_PLCP_CFG,4,2            ## @CR_BCN_PLCP_CFG
L_.str.3:                               ## @.str.3
	.asciz	"CR_BCN_FIFO_SEMAPHORE stuck, resetting device..."

	.no_dead_strip	_zd_mac_config_beacon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd_mac_config_beacon
_zd_mac_config_beacon:                  ; @zd_mac_config_beacon
	.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	x23, x2
	mov	x20, x1
	bl	_zd_hw_mac
	mov	x21, x0
	ldr	w27, [x20]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x20
	bl	_zd_mac_match_cur_beacon
	cbz	x0, LBB0_2
; %bb.1:
	mov	w25, #0
	b	LBB0_29
LBB0_2:
	mov	x0, x21
	bl	_zd_chip_is_zd1211b
	add	w8, w27, w0
	add	w24, w8, #5
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x24
	mov	w1, #16
	bl	_kmalloc_array
	cbz	x0, LBB0_8
; %bb.3:
	mov	x22, x0
Lloh3:
	adrp	x26, _CR_BCN_FIFO_SEMAPHORE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _CR_BCN_FIFO_SEMAPHORE@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x21
	mov	w1, #0
	bl	_zd_iowrite32_locked
	tbnz	w0, #31, LBB0_9
; %bb.4:
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	ldr	w2, [x26]
	add	x1, sp, #28
	mov	x0, x21
	bl	_zd_ioread32_locked
Lloh5:
	adrp	x22, _jiffies@GOTPAGE
Lloh6:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
Lloh7:
	adrp	x8, _HZ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_10
; %bb.5:
	ldr	w9, [sp, #28]
	cbz	w23, LBB0_11
; %bb.6:
	tbz	w9, #1, LBB0_12
; %bb.7:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_19
LBB0_8:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_29
LBB0_9:
	mov	x25, x0
	b	LBB0_28
LBB0_10:
	mov	x25, x0
	b	LBB0_20
LBB0_11:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w10, w8, lt
	tbnz	w9, #1, LBB0_35
LBB0_12:
	mov	x28, x22
Lloh15:
	adrp	x25, _CR_BCN_FIFO@GOTPAGE
Lloh16:
	ldr	x25, [x25, _CR_BCN_FIFO@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	str	x8, [x22, #8]
	add	w26, w27, #3
	str	w26, [x22]
	mov	x0, x21
	bl	_zd_chip_is_zd1211b
	cbz	w0, LBB0_14
; %bb.13:
Lloh17:
	adrp	x8, _CR_BCN_LENGTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CR_BCN_LENGTH@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x22, #24]
	str	w26, [x22, #16]
	mov	w8, #2
	b	LBB0_15
LBB0_14:
	mov	w8, #1
LBB0_15:
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.16:
	ldr	x10, [x20, #8]
	add	x11, x22, w8, uxtw #4
	add	x11, x11, #8
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x25]
	str	x12, [x11]
	ldr	w12, [x10], #1
	stur	w12, [x11, #-8]
	add	x11, x11, #16
	add	w8, w8, #1
	subs	x9, x9, #1
	b.ne	LBB0_17
LBB0_18:
	ldr	x9, [x25]
	add	x10, x22, w8, uxtw #4
	str	x9, [x10, #8]
	str	wzr, [x10]
	ldr	x9, [x25]
	str	x9, [x10, #24]
	str	wzr, [x10, #16]
	ldr	x9, [x25]
	str	x9, [x10, #40]
	str	wzr, [x10, #32]
	ldr	x9, [x25]
	str	x9, [x10, #56]
	str	wzr, [x10, #48]
	add	w8, w8, #4
	cmp	w8, w24
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_zd_iowrite32a_locked
	mov	x25, x0
	mov	x22, x28
LBB0_19:
Lloh20:
	adrp	x8, _HZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
LBB0_20:
	ldrsw	x28, [x22]
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w26, w8, lt
Lloh22:
	adrp	x22, _CR_BCN_FIFO_SEMAPHORE@GOTPAGE
Lloh23:
	ldr	x22, [x22, _CR_BCN_FIFO_SEMAPHORE@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #1
	bl	_zd_iowrite32_locked
	mov	x24, x0
	tbnz	w0, #31, LBB0_23
LBB0_21:
	tbnz	w25, #31, LBB0_26
; %bb.22:
	mov	x0, x21
	bl	_zd_mac_free_cur_beacon_locked
	str	x20, [x21, #8]
	mov	w8, #1024
	movk	w8, #32, lsl #16
	add	w1, w8, w27, lsl #19
Lloh24:
	adrp	x8, _CR_BCN_PLCP_CFG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CR_BCN_PLCP_CFG@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_zd_iowrite32_locked
	mov	x25, x0
	mov	x20, #0
	b	LBB0_27
LBB0_23:
	cbz	w23, LBB0_31
LBB0_24:
Lloh27:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w24, w8
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.25:
	mov	x0, x21
	bl	_zd_mac_dev
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_26:
	cmp	w25, #0
	csel	w25, w25, w24, lt
	mov	x0, x21
	bl	_zd_mac_free_cur_beacon_locked
LBB0_27:
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
LBB0_28:
	mov	x0, x22
	bl	_kfree
LBB0_29:
	mov	x0, x20
	bl	_kfree_skb
	mov	x0, x19
	bl	_mutex_unlock
LBB0_30:
	mov	x0, x25
	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_31:
	asr	w8, w26, #1
	add	x23, x28, w8, sxtw
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_time_is_before_eq_jiffies
	cbnz	x0, LBB0_24
; %bb.33:                               ;   in Loop: Header=BB0_32 Depth=1
	mov	w0, #20
	bl	_msleep
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #1
	bl	_zd_iowrite32_locked
	tbnz	w0, #31, LBB0_32
; %bb.34:
	mov	x24, x0
	b	LBB0_21
LBB0_35:
	ldr	w9, [x22]
	add	w10, w9, w10, asr #1
	sxtw	x10, w10
	str	x10, [sp, #8]                   ; 8-byte Folded Spill
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w10
	add	w8, w8, w9
	sxtw	x28, w8
	b	LBB0_37
LBB0_36:                                ;   in Loop: Header=BB0_37 Depth=1
	mov	w0, #20
	bl	_msleep
	ldrb	w8, [sp, #28]
	tbz	w8, #1, LBB0_12
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x26]
	add	x1, sp, #28
	mov	x0, x21
	bl	_zd_ioread32_locked
	tbnz	w0, #31, LBB0_41
; %bb.38:                               ;   in Loop: Header=BB0_37 Depth=1
	mov	x0, x28
	bl	_time_is_before_eq_jiffies
	cbz	x0, LBB0_36
; %bb.39:                               ;   in Loop: Header=BB0_37 Depth=1
	ldrsw	x25, [x22]
Lloh32:
	adrp	x8, _HZ@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh34:
	ldrsw	x28, [x8]
	mov	x0, x21
	bl	_zd_mac_dev
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_time_is_before_eq_jiffies
	cbnz	x0, LBB0_42
; %bb.40:                               ;   in Loop: Header=BB0_37 Depth=1
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	mul	x8, x28, x8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	add	x28, x25, w8, sxtw
	b	LBB0_36
LBB0_41:
	mov	x25, x0
	b	LBB0_19
LBB0_42:
	mov	x0, x21
	bl	_zd_mac_dev
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh39:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w25, w8
	mov	x0, x21
	bl	_zd_mac_free_cur_beacon_locked
	mov	x0, x20
	bl	_kfree_skb
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_kfree
	mov	x0, x21
	bl	_zd_mac_dev
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
	ldr	w0, [x21]
	bl	_usb_queue_reset_device
	b	LBB0_30
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CR_BCN_FIFO_SEMAPHORE,4,2      ; @CR_BCN_FIFO_SEMAPHORE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CR_BCN_FIFO_SEMAPHORE not ready\n"

l_.str.1:                               ; @.str.1
	.asciz	"Giving up beacon config.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CR_BCN_FIFO,8,3                ; @CR_BCN_FIFO
	.comm	_CR_BCN_LENGTH,8,3              ; @CR_BCN_LENGTH
l_.str.2:                               ; @.str.2
	.asciz	"Could not release CR_BCN_FIFO_SEMAPHORE!\n"

	.comm	_CR_BCN_PLCP_CFG,4,2            ; @CR_BCN_PLCP_CFG
l_.str.3:                               ; @.str.3
	.asciz	"CR_BCN_FIFO_SEMAPHORE stuck, resetting device..."

	.no_dead_strip	_zd_mac_config_beacon
.subsections_via_symbols
