	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_restore_settings            ## -- Begin function zd_restore_settings
	.p2align	4, 0x90
_zd_restore_settings:                   ## @zd_restore_settings
	.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, %r13
	callq	_zd_mac_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_dbg_f
	leaq	4(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	44(%r13), %eax
	movl	%eax, -48(%rbp)
	movl	(%r13), %r12d
	movl	8(%r13), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	12(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	40(%r13), %r15d
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	movq	%r13, %rdi
	callq	_set_mac_and_bssid
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	leaq	24(%r13), %r12
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_zd_chip_set_channel
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_set_rts_cts
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_zd_chip_set_multicast_hash
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	20(%r13), %eax
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.8:
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.9:
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
LBB0_10:
	movq	32(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.11:
	movl	28(%r13), %edi
	callq	_ieee80211_beacon_get
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	28(%r13), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_zd_mac_config_beacon
LBB0_13:
	movl	20(%r13), %ecx
	movq	%r12, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_zd_set_beacon_interval
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_14
LBB0_1:
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_zd_mac_dev
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movl	%eax, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg_f
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"set_mac_and_bssid failed, %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"zd_chip_set_channel failed, %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"zd_chip_set_multicast_hash failed, %d\n"

	.comm	_NL80211_IFTYPE_MESH_POINT,4,2  ## @NL80211_IFTYPE_MESH_POINT
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ## @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_AP,4,2          ## @NL80211_IFTYPE_AP
	.comm	_jiffies,4,2                    ## @jiffies
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_restore_settings            ; -- Begin function zd_restore_settings
	.p2align	2
_zd_restore_settings:                   ; @zd_restore_settings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	bl	_zd_mac_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg_f
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irq
	ldp	w25, w8, [x19, #40]
	str	w8, [sp, #8]
	ldr	w24, [x19]
	ldp	w22, w21, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_set_mac_and_bssid
	tbnz	w0, #31, LBB0_9
; %bb.1:
	add	x23, x19, #24
	mov	x0, x23
	mov	x1, x25
	bl	_zd_chip_set_channel
	tbnz	w0, #31, LBB0_10
; %bb.2:
	mov	x0, x19
	mov	x1, x24
	bl	_set_rts_cts
	add	x1, sp, #8
	mov	x0, x23
	bl	_zd_chip_set_multicast_hash
	tbnz	w0, #31, LBB0_11
; %bb.3:
	ldr	w8, [x19, #20]
Lloh2:
	adrp	x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _NL80211_IFTYPE_AP@GOTPAGE
Lloh9:
	ldr	x11, [x11, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_8
; %bb.4:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_7
; %bb.5:
	ldr	w0, [x19, #28]
	bl	_ieee80211_beacon_get
	cbz	x0, LBB0_7
; %bb.6:
	mov	x1, x0
	ldr	w0, [x19, #28]
	mov	w2, #0
	bl	_zd_mac_config_beacon
LBB0_7:
	ldr	w3, [x19, #20]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_zd_set_beacon_interval
	mov	x0, x20
	bl	_spin_lock_irq
Lloh11:
	adrp	x8, _jiffies@GOTPAGE
Lloh12:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x20
	bl	_spin_unlock_irq
LBB0_8:
	mov	w23, #0
	b	LBB0_12
LBB0_9:
	mov	x23, x0
	mov	x0, x19
	bl	_zd_mac_dev
	str	x23, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg_f
	b	LBB0_12
LBB0_10:
	mov	x25, x0
	mov	x0, x19
	bl	_zd_mac_dev
	str	x25, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg_f
	mov	x23, x25
	b	LBB0_12
LBB0_11:
	mov	x24, x0
	mov	x0, x19
	bl	_zd_mac_dev
	str	x24, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg_f
	mov	x23, x24
LBB0_12:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"set_mac_and_bssid failed, %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"zd_chip_set_channel failed, %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"zd_chip_set_multicast_hash failed, %d\n"

	.comm	_NL80211_IFTYPE_MESH_POINT,4,2  ; @NL80211_IFTYPE_MESH_POINT
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ; @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_AP,4,2          ; @NL80211_IFTYPE_AP
	.comm	_jiffies,4,2                    ; @jiffies
.subsections_via_symbols
