	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_set_rate                    ## -- Begin function il_set_rate
	.p2align	4, 0x90
_il_set_rate:                           ## @il_set_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	12(%rdi), %esi
	callq	_il_get_hw_mode
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movl	$0, (%r14)
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_2
## %bb.3:
	movq	8(%rax), %rax
	cmpl	$1, %r8d
	jne	LBB0_5
## %bb.4:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_11:
	testb	$1, %r8b
	je	LBB0_14
## %bb.12:
	movl	(%rax,%rdx,4), %eax
	movq	_RATE_COUNT_LEGACY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_14
## %bb.13:
	btsl	%eax, %esi
	movl	%esi, (%r14)
	jmp	LBB0_14
LBB0_15:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_IL_ERR                         ## TAILCALL
LBB0_2:
	xorl	%esi, %esi
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_D_RATE
	movq	_IL_CCK_BASIC_RATES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IL_FIRST_CCK_RATE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	andl	$15, %eax
	movl	%eax, 4(%r14)
	movq	_IL_OFDM_BASIC_RATES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movzbl	%al, %eax
	movl	%eax, 8(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	%r8d, %edi
	andl	$-2, %edi
	xorl	%esi, %esi
	movq	_RATE_COUNT_LEGACY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rdi
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %ebx
	cmpl	(%rcx), %ebx
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	btsl	%ebx, %esi
	movl	%esi, (%r14)
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rax,%rdx,4), %ebx
	cmpl	(%rcx), %ebx
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	btsl	%ebx, %esi
	movl	%esi, (%r14)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set rate: unable to get hw mode\n"

	.comm	_RATE_COUNT_LEGACY,4,2          ## @RATE_COUNT_LEGACY
L_.str.1:                               ## @.str.1
	.asciz	"Set active_rate = %0x\n"

	.comm	_IL_CCK_BASIC_RATES_MASK,4,2    ## @IL_CCK_BASIC_RATES_MASK
	.comm	_IL_FIRST_CCK_RATE,4,2          ## @IL_FIRST_CCK_RATE
	.comm	_IL_OFDM_BASIC_RATES_MASK,4,2   ## @IL_OFDM_BASIC_RATES_MASK
	.comm	_IL_FIRST_OFDM_RATE,4,2         ## @IL_FIRST_OFDM_RATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_set_rate                    ; -- Begin function il_set_rate
	.p2align	2
_il_set_rate:                           ; @il_set_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	w1, [x0, #12]
	bl	_il_get_hw_mode
	cbz	x0, LBB0_6
; %bb.1:
	str	wzr, [x19]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w1, #0
	ldr	x9, [x0, #8]
Lloh0:
	adrp	x10, _RATE_COUNT_LEGACY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _RATE_COUNT_LEGACY@GOTPAGEOFF]
	mov	w11, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #4
	subs	x8, x8, #1
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9]
	ldr	w13, [x10]
	cmp	w12, w13
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	w12, w11, w12
	orr	w1, w1, w12
	str	w1, [x19]
	b	LBB0_3
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_IL_ERR
LBB0_7:
	mov	w1, #0
LBB0_8:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_RATE
Lloh6:
	adrp	x8, _IL_CCK_BASIC_RATES_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IL_CCK_BASIC_RATES_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _IL_FIRST_CCK_RATE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IL_FIRST_CCK_RATE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	asr	w8, w8, w9
	and	w8, w8, #0xf
Lloh12:
	adrp	x9, _IL_OFDM_BASIC_RATES_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IL_OFDM_BASIC_RATES_MASK@GOTPAGEOFF]
Lloh14:
	adrp	x10, _IL_FIRST_OFDM_RATE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _IL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	ldr	w10, [x10]
	asr	w9, w9, w10
	and	w9, w9, #0xff
	stp	w8, w9, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set rate: unable to get hw mode\n"

	.comm	_RATE_COUNT_LEGACY,4,2          ; @RATE_COUNT_LEGACY
l_.str.1:                               ; @.str.1
	.asciz	"Set active_rate = %0x\n"

	.comm	_IL_CCK_BASIC_RATES_MASK,4,2    ; @IL_CCK_BASIC_RATES_MASK
	.comm	_IL_FIRST_CCK_RATE,4,2          ; @IL_FIRST_CCK_RATE
	.comm	_IL_OFDM_BASIC_RATES_MASK,4,2   ; @IL_OFDM_BASIC_RATES_MASK
	.comm	_IL_FIRST_OFDM_RATE,4,2         ; @IL_FIRST_OFDM_RATE
.subsections_via_symbols
