	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_set_fixed_rate
_ipw_set_fixed_rate:                    ## @ipw_set_fixed_rate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	movq	8(%r14), %rax
	cmpl	$128, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	_LIBIPW_OFDM_RATES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %edi
	jne	LBB0_2
## %bb.3:
	movq	_LIBIPW_OFDM_SHIFT_MASK_A@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	jmp	LBB0_8
LBB0_4:
	movq	_IEEE_B@GOTPCREL(%rip), %rcx
	movq	_LIBIPW_CCK_RATES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, (%rcx)
	jne	LBB0_6
## %bb.5:
	notl	%eax
	testl	%eax, %edi
	jne	LBB0_2
	jmp	LBB0_8
LBB0_6:
	movq	_LIBIPW_OFDM_RATES_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	testl	%eax, %edi
	je	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_WX
	xorl	%edi, %edi
LBB0_8:
	callq	_cpu_to_le16
	movl	%eax, %ebx
	movq	_IPW_MEM_FIXED_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ipw_read32
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ipw_write_reg32                ## TAILCALL
LBB0_7:
	movq	_LIBIPW_OFDM_RATE_6MB_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	andl	%edi, %edx
	movl	%ecx, %esi
	sarl	%esi
	testl	%edx, %edx
	notl	%ecx
	cmovel	%edx, %esi
	xorl	%eax, %eax
	cmpl	$1, %edx
	movl	$0, %edx
	sbbl	%edx, %edx
	orl	%ecx, %edx
	andl	%edi, %edx
	movq	_LIBIPW_OFDM_RATE_9MB_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%edx, %edi
	andl	%ebx, %edi
	movl	%ebx, %ecx
	sarl	%ecx
	testl	%edi, %edi
	notl	%ebx
	cmovel	%edi, %ecx
	orl	%esi, %ecx
	cmpl	$1, %edi
	movl	$0, %esi
	sbbl	%esi, %esi
	orl	%ebx, %esi
	andl	%edx, %esi
	movq	_LIBIPW_OFDM_RATE_12MB_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%esi, %edi
	andl	%ebx, %edi
	movl	%ebx, %edx
	sarl	%edx
	testl	%edi, %edi
	cmovel	%edi, %edx
	orl	%ecx, %edx
	cmpl	$1, %edi
	sbbl	%eax, %eax
	notl	%ebx
	orl	%ebx, %eax
	andl	%esi, %eax
	orl	%edx, %eax
	movl	%eax, %edi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBIPW_OFDM_RATES_MASK,4,2     ## @LIBIPW_OFDM_RATES_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid fixed rate mask in ipw_set_fixed_rate\n"

	.comm	_LIBIPW_OFDM_SHIFT_MASK_A,4,2   ## @LIBIPW_OFDM_SHIFT_MASK_A
	.comm	_IEEE_B,4,2                     ## @IEEE_B
	.comm	_LIBIPW_CCK_RATES_MASK,4,2      ## @LIBIPW_CCK_RATES_MASK
	.comm	_LIBIPW_OFDM_RATE_6MB_MASK,4,2  ## @LIBIPW_OFDM_RATE_6MB_MASK
	.comm	_LIBIPW_OFDM_RATE_9MB_MASK,4,2  ## @LIBIPW_OFDM_RATE_9MB_MASK
	.comm	_LIBIPW_OFDM_RATE_12MB_MASK,4,2 ## @LIBIPW_OFDM_RATE_12MB_MASK
	.comm	_IPW_MEM_FIXED_OVERRIDE,4,2     ## @IPW_MEM_FIXED_OVERRIDE
	.no_dead_strip	_ipw_set_fixed_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_set_fixed_rate
_ipw_set_fixed_rate:                    ; @ipw_set_fixed_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _LIBIPW_OFDM_RATES_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBIPW_OFDM_RATES_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w0, w8
	b.ne	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _LIBIPW_OFDM_SHIFT_MASK_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIBIPW_OFDM_SHIFT_MASK_A@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w0, w0, w8
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x8, _IEEE_B@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE_B@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
Lloh9:
	adrp	x8, _LIBIPW_CCK_RATES_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LIBIPW_CCK_RATES_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w9, w1
	b.ne	LBB0_5
; %bb.4:
	bics	wzr, w0, w8
	b.ne	LBB0_6
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x9, _LIBIPW_OFDM_RATES_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LIBIPW_OFDM_RATES_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w0, w8
	b.eq	LBB0_8
LBB0_6:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WX
	mov	w0, #0
LBB0_7:
	bl	_cpu_to_le16
	mov	x20, x0
Lloh17:
	adrp	x8, _IPW_MEM_FIXED_OVERRIDE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IPW_MEM_FIXED_OVERRIDE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipw_read32
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ipw_write_reg32
LBB0_8:
Lloh20:
	adrp	x8, _LIBIPW_OFDM_RATE_6MB_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LIBIPW_OFDM_RATE_6MB_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	asr	w9, w8, #1
	tst	w8, w0
	csel	w9, wzr, w9, eq
	mov	w10, #-1
	csinv	w8, w10, w8, eq
Lloh23:
	adrp	x11, _LIBIPW_OFDM_RATE_9MB_MASK@GOTPAGE
Lloh24:
	ldr	x11, [x11, _LIBIPW_OFDM_RATE_9MB_MASK@GOTPAGEOFF]
	and	w8, w8, w0
Lloh25:
	ldr	w11, [x11]
	asr	w12, w11, #1
	tst	w8, w11
	csel	w12, wzr, w12, eq
	orr	w9, w12, w9
	csinv	w11, w10, w11, eq
	and	w8, w11, w8
Lloh26:
	adrp	x11, _LIBIPW_OFDM_RATE_12MB_MASK@GOTPAGE
Lloh27:
	ldr	x11, [x11, _LIBIPW_OFDM_RATE_12MB_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
	asr	w12, w11, #1
	tst	w8, w11
	csel	w12, wzr, w12, eq
	orr	w9, w9, w12
	csinv	w10, w10, w11, eq
	and	w8, w10, w8
	orr	w0, w9, w8
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBIPW_OFDM_RATES_MASK,4,2     ; @LIBIPW_OFDM_RATES_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid fixed rate mask in ipw_set_fixed_rate\n"

	.comm	_LIBIPW_OFDM_SHIFT_MASK_A,4,2   ; @LIBIPW_OFDM_SHIFT_MASK_A
	.comm	_IEEE_B,4,2                     ; @IEEE_B
	.comm	_LIBIPW_CCK_RATES_MASK,4,2      ; @LIBIPW_CCK_RATES_MASK
	.comm	_LIBIPW_OFDM_RATE_6MB_MASK,4,2  ; @LIBIPW_OFDM_RATE_6MB_MASK
	.comm	_LIBIPW_OFDM_RATE_9MB_MASK,4,2  ; @LIBIPW_OFDM_RATE_9MB_MASK
	.comm	_LIBIPW_OFDM_RATE_12MB_MASK,4,2 ; @LIBIPW_OFDM_RATE_12MB_MASK
	.comm	_IPW_MEM_FIXED_OVERRIDE,4,2     ; @IPW_MEM_FIXED_OVERRIDE
	.no_dead_strip	_ipw_set_fixed_rate
.subsections_via_symbols
