	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_update_beacon         ## -- Begin function carl9170_update_beacon
	.p2align	4, 0x90
_carl9170_update_beacon:                ## @carl9170_update_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	%rbx, %rdi
	callq	_carl9170_pick_beaconing_vif
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	%rax, %r12
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movq	8(%rbx), %r14
	movq	%rax, %rdi
	callq	_carl9170_get_vif
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ieee80211_beacon_get_tim
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	8(%rax), %r14
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_31
LBB0_4:
	xorl	%r14d, %r14d
LBB0_6:
	movq	8(%r13), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_AR9170_MAC_BCN_LENGTH_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	imulq	(%r12), %rbx
	movq	%r13, %rax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	16(%r13), %rcx
	addq	%rbx, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	_FCS_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	(%rax), %rdi
	movl	$4, %esi
	callq	_roundup
	addq	%rax, %rbx
	cmpq	24(%r13), %rbx
	jle	LBB0_9
## %bb.7:
	xorl	%eax, %eax
	callq	_net_ratelimit
	movq	_EINVAL@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	je	LBB0_8
## %bb.26:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wiphy_err
	jmp	LBB0_27
LBB0_9:
	movq	%rax, %r15
	movq	_AR9170_MAC_BCN_LENGTH_MAX@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jle	LBB0_13
## %bb.10:
	xorl	%eax, %eax
	callq	_net_ratelimit
	movq	_EMSGSIZE@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_11
## %bb.12:
	movq	%rbx, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	(%rcx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_wiphy_err
	jmp	LBB0_28
LBB0_13:
	leaq	-96(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_carl9170_tx_beacon_physet
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_carl9170_async_regwrite_begin
	movq	_AR9170_MAC_REG_BCN_HT1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-96(%rbp), %rsi
	callq	_carl9170_async_regwrite
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.14:
	movq	_AR9170_MAC_REG_BCN_HT2@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_27:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_28:
	xorl	%r15d, %r15d
	subl	(%r14), %r15d
	movq	%rbx, %rdi
LBB0_30:
	callq	_spin_unlock_bh
LBB0_31:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	%r13, %rdi
	callq	_dev_kfree_skb_any
	movl	%r15d, %r14d
	jmp	LBB0_32
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_28
LBB0_15:
	movq	_AR9170_MAC_REG_BCN_PLCP@GOTPCREL(%rip), %rax
LBB0_16:
	movq	(%rax), %rdi
	movq	-80(%rbp), %rsi
	callq	_carl9170_async_regwrite
	movq	(%r13), %rdi
	movl	$4, %esi
	callq	_DIV_ROUND_UP
	testl	%eax, %eax
	jle	LBB0_22
## %bb.17:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	callq	_le32_to_cpu
	movl	%ebx, %edi
	andl	$-4, %edi
	addq	-72(%rbp), %rdi                 ## 8-byte Folded Reload
	movq	%rax, %rsi
	callq	_carl9170_async_regwrite
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r15
	movq	(%r13), %rdi
	movl	$4, %esi
	callq	_DIV_ROUND_UP
	cltq
	addq	$4, %rbx
	cmpq	%rax, %r15
	jge	LBB0_22
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,2), %rdi
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpq	(%r14,%rbx,2), %rdi
	jne	LBB0_20
	jmp	LBB0_21
LBB0_22:
	xorl	%eax, %eax
	callq	_carl9170_async_regwrite_finish
	movq	8(%r12), %rdi
	callq	_dev_kfree_skb_any
	movq	$0, 8(%r12)
	xorl	%eax, %eax
	callq	_carl9170_async_regwrite_result
	testl	%eax, %eax
	je	LBB0_23
## %bb.29:
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_30
LBB0_23:
	movq	%r13, 8(%r12)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movl	$0, %r14d
	je	LBB0_25
## %bb.24:
	movq	(%r12), %rsi
	movq	_CARL9170_BCN_CTRL_CAB_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FCS_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	addq	(%r13), %r8
	movq	%rbx, %rdi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_carl9170_bcn_ctrl
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_31
LBB0_25:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
LBB0_32:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AR9170_MAC_BCN_LENGTH_MAX,8,3  ## @AR9170_MAC_BCN_LENGTH_MAX
	.comm	_FCS_LEN,8,3                    ## @FCS_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"beacon does not fit into device memory!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"no support for beacons bigger than %d (yours:%d).\n"

	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_AR9170_MAC_REG_BCN_HT1,8,3     ## @AR9170_MAC_REG_BCN_HT1
	.comm	_AR9170_MAC_REG_BCN_HT2,8,3     ## @AR9170_MAC_REG_BCN_HT2
	.comm	_AR9170_MAC_REG_BCN_PLCP,8,3    ## @AR9170_MAC_REG_BCN_PLCP
	.comm	_CARL9170_BCN_CTRL_CAB_TRIGGER,4,2 ## @CARL9170_BCN_CTRL_CAB_TRIGGER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_update_beacon         ; -- Begin function carl9170_update_beacon
	.p2align	2
_carl9170_update_beacon:                ; @carl9170_update_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	x21, x1
	mov	x20, x0
	bl	_rcu_read_lock
	mov	x0, x20
	bl	_carl9170_pick_beaconing_vif
	cbz	x0, LBB0_30
; %bb.1:
	mov	x22, x0
	ldr	x19, [x20, #8]
	bl	_carl9170_get_vif
	mov	x1, x0
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	bl	_ieee80211_beacon_get_tim
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_spin_lock_bh
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x24, [x8, #8]
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_16
LBB0_5:
	mov	x24, #0
LBB0_6:
	ldr	x8, [x22]
Lloh3:
	adrp	x25, _AR9170_MAC_BCN_LENGTH_MAX@GOTPAGE
Lloh4:
	ldr	x25, [x25, _AR9170_MAC_BCN_LENGTH_MAX@GOTPAGEOFF]
	ldr	x9, [x25]
	mul	x27, x9, x8
	ldr	x28, [x20, #16]
	ldp	x8, x26, [x19]
Lloh5:
	adrp	x9, _FCS_LEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FCS_LEN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w1, #4
	bl	_roundup
	ldr	x8, [x20, #24]
	add	x9, x0, x27
	cmp	x9, x8
	b.le	LBB0_10
; %bb.7:
	bl	_net_ratelimit
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wiphy_err
LBB0_9:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	mov	x23, x0
	ldr	x8, [x25]
	cmp	x0, x8
	b.le	LBB0_17
; %bb.11:
	bl	_net_ratelimit
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	ldr	x8, [x25]
	stp	x8, x23, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_err
LBB0_13:
Lloh14:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_15:
	mov	x0, x20
	bl	_spin_unlock_bh
LBB0_16:
	bl	_rcu_read_unlock
	mov	x0, x19
	bl	_dev_kfree_skb_any
	b	LBB0_31
LBB0_17:
	add	x2, sp, #24
	add	x3, sp, #16
	mov	x0, x20
	mov	x1, x19
	bl	_carl9170_tx_beacon_physet
	mov	x23, x0
	mov	x0, x20
	bl	_carl9170_async_regwrite_begin
Lloh16:
	adrp	x8, _AR9170_MAC_REG_BCN_HT1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AR9170_MAC_REG_BCN_HT1@GOTPAGEOFF]
Lloh18:
	ldr	x0, [x8]
	ldr	x1, [sp, #24]
	bl	_carl9170_async_regwrite
	cbz	w23, LBB0_19
; %bb.18:
Lloh19:
	adrp	x8, _AR9170_MAC_REG_BCN_HT2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AR9170_MAC_REG_BCN_HT2@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh21:
	adrp	x8, _AR9170_MAC_REG_BCN_PLCP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR9170_MAC_REG_BCN_PLCP@GOTPAGEOFF]
LBB0_20:
	ldr	x0, [x8]
	ldr	x1, [sp, #16]
	bl	_carl9170_async_regwrite
	add	x23, x28, x27
	ldr	x0, [x19]
	mov	w1, #4
	bl	_DIV_ROUND_UP
	cmp	w0, #1
	b.lt	LBB0_26
; %bb.21:
	mov	x27, #0
	mov	x28, #0
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	bl	_le32_to_cpu
	mov	x1, x0
	and	x8, x27, #0xfffffffc
	add	x0, x23, x8
	bl	_carl9170_async_regwrite
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x28, x28, #1
	ldr	x0, [x19]
	mov	w1, #4
	bl	_DIV_ROUND_UP
	add	x27, x27, #4
	cmp	x28, w0, sxtw
	b.ge	LBB0_26
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x26, x28, lsl #3]
	cbz	x24, LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x8, [x24, x28, lsl #3]
	cmp	x0, x8
	b.ne	LBB0_22
	b	LBB0_23
LBB0_26:
	bl	_carl9170_async_regwrite_finish
	ldr	x0, [x22, #8]
	bl	_dev_kfree_skb_any
	str	xzr, [x22, #8]
	bl	_carl9170_async_regwrite_result
	cbz	w0, LBB0_28
; %bb.27:
	mov	x24, x0
	b	LBB0_15
LBB0_28:
	str	x19, [x22, #8]
	mov	x0, x20
	bl	_spin_unlock_bh
	cbz	w21, LBB0_30
; %bb.29:
	ldr	x1, [x22]
Lloh23:
	adrp	x8, _CARL9170_BCN_CTRL_CAB_TRIGGER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CARL9170_BCN_CTRL_CAB_TRIGGER@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _FCS_LEN@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FCS_LEN@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x4, x9, x8
	mov	x0, x20
	mov	x3, x23
	bl	_carl9170_bcn_ctrl
	mov	x24, x0
	cbnz	w0, LBB0_16
LBB0_30:
	bl	_rcu_read_unlock
	mov	w24, #0
LBB0_31:
	mov	x0, x24
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AR9170_MAC_BCN_LENGTH_MAX,8,3  ; @AR9170_MAC_BCN_LENGTH_MAX
	.comm	_FCS_LEN,8,3                    ; @FCS_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"beacon does not fit into device memory!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"no support for beacons bigger than %d (yours:%d).\n"

	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_AR9170_MAC_REG_BCN_HT1,8,3     ; @AR9170_MAC_REG_BCN_HT1
	.comm	_AR9170_MAC_REG_BCN_HT2,8,3     ; @AR9170_MAC_REG_BCN_HT2
	.comm	_AR9170_MAC_REG_BCN_PLCP,8,3    ; @AR9170_MAC_REG_BCN_PLCP
	.comm	_CARL9170_BCN_CTRL_CAB_TRIGGER,4,2 ; @CARL9170_BCN_CTRL_CAB_TRIGGER
.subsections_via_symbols
