	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwlagn_alloc_bcast_station     ## -- Begin function iwlagn_alloc_bcast_station
	.p2align	4, 0x90
_iwlagn_alloc_bcast_station:            ## @iwlagn_alloc_bcast_station
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_spin_lock_bh
	movq	_iwl_bcast_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_iwl_prep_station
	movq	%rax, %rbx
	movq	_IWL_INVALID_STATION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_ERR
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %r12
	movq	_IWL_STA_DRIVER_ACTIVE@GOTPCREL(%rip), %rax
	movq	8(%r15), %rcx
	shlq	$4, %rbx
	movl	8(%rcx,%rbx), %edx
	orl	(%rax), %edx
	movl	%edx, 8(%rcx,%rbx)
	movq	_IWL_STA_BCAST@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, 8(%rcx,%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_iwl_sta_alloc_lq
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	8(%r15), %rax
	movq	%r14, (%rax,%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_5:
	subl	(%rax), %r12d
LBB0_6:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_iwl_bcast_addr,4,2             ## @iwl_bcast_addr
	.comm	_IWL_INVALID_STATION,8,3        ## @IWL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to prepare broadcast station\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IWL_STA_DRIVER_ACTIVE,4,2      ## @IWL_STA_DRIVER_ACTIVE
	.comm	_IWL_STA_BCAST,4,2              ## @IWL_STA_BCAST
L_.str.1:                               ## @.str.1
	.asciz	"Unable to initialize rate scaling for bcast station.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwlagn_alloc_bcast_station     ; -- Begin function iwlagn_alloc_bcast_station
	.p2align	2
_iwlagn_alloc_bcast_station:            ; @iwlagn_alloc_bcast_station
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_spin_lock_bh
Lloh0:
	adrp	x8, _iwl_bcast_addr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iwl_bcast_addr@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	x4, #0
	bl	_iwl_prep_station
Lloh3:
	adrp	x8, _IWL_INVALID_STATION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_INVALID_STATION@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
	mov	x0, x19
	bl	_spin_unlock_bh
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x21, x0
Lloh10:
	adrp	x8, _IWL_STA_DRIVER_ACTIVE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IWL_STA_DRIVER_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	add	x9, x9, x0, lsl #4
	ldr	w10, [x9, #8]
	orr	w8, w10, w8
	str	w8, [x9, #8]
Lloh13:
	adrp	x10, _IWL_STA_BCAST@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IWL_STA_BCAST@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x9, #8]
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_iwl_sta_alloc_lq
	cbz	x0, LBB0_4
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	x8, [x19, #8]
	lsl	x9, x21, #4
	str	x20, [x8, x9]
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_iwl_bcast_addr,4,2             ; @iwl_bcast_addr
	.comm	_IWL_INVALID_STATION,8,3        ; @IWL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to prepare broadcast station\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IWL_STA_DRIVER_ACTIVE,4,2      ; @IWL_STA_DRIVER_ACTIVE
	.comm	_IWL_STA_BCAST,4,2              ; @IWL_STA_BCAST
l_.str.1:                               ; @.str.1
	.asciz	"Unable to initialize rate scaling for bcast station.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
