	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_rs_get_adjacent_rate
_il4965_rs_get_adjacent_rate:           ## @il4965_rs_get_adjacent_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	_RATE_INVALID@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movl	%ecx, %edi
	callq	_is_a_band
	testq	%rax, %rax
	je	LBB0_6
LBB0_1:
	movl	%r12d, %ebx
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.2:
	leal	-1(%r15), %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r14d, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	sarl	%eax
	decl	%ebx
	jg	LBB0_3
## %bb.5:
	movl	%r12d, %ebx
	jmp	LBB0_10
LBB0_6:
	movl	%ebx, %edi
	callq	_is_legacy
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	movl	(%r13), %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_17
## %bb.8:
	movl	%r15d, %ebx
	jmp	LBB0_16
LBB0_9:
	decl	%ebx
LBB0_10:
	incl	%r15d
	movq	_RATE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jge	LBB0_15
## %bb.11:
	movl	$1, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	testl	%r14d, %edx
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%r15d
	addl	%edx, %edx
	cmpl	%r15d, %eax
	jne	LBB0_12
LBB0_15:
	movl	%r12d, %r15d
LBB0_16:
	shll	$8, %r15d
	orl	%ebx, %r15d
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	leaq	L_.str(%rip), %r12
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	_il_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rdx
	movl	(%rax,%rdx,8), %ebx
	cmpl	%ecx, %ebx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	btl	%ebx, %r14d
	jb	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_D_RATE
	movl	(%r13), %ecx
	movl	%ebx, %eax
	cmpl	%ecx, %ebx
	jne	LBB0_18
	jmp	LBB0_22
LBB0_21:
	movl	%ecx, %eax
	movl	%ecx, %ebx
LBB0_22:
	cmpl	%r15d, %eax
	je	LBB0_16
	jmp	LBB0_24
LBB0_23:
	movl	%ecx, %eax
	cmpl	%r15d, %eax
	je	LBB0_16
LBB0_24:
	leaq	L_.str.1(%rip), %r12
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	_il_rates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r15d, %rdx
	movl	4(%rcx,%rdx,8), %r15d
	cmpl	%eax, %r15d
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	btl	%r15d, %r14d
	jb	LBB0_16
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_D_RATE
	movl	(%r13), %eax
	cmpl	%eax, %r15d
	jne	LBB0_25
	jmp	LBB0_16
LBB0_28:
	movl	%eax, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_INVALID,4,2               ## @RATE_INVALID
	.comm	_RATE_COUNT,4,2                 ## @RATE_COUNT
	.comm	_il_rates,8,3                   ## @il_rates
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skipping masked lower rate: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Skipping masked higher rate: %d\n"

	.no_dead_strip	_il4965_rs_get_adjacent_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_rs_get_adjacent_rate
_il4965_rs_get_adjacent_rate:           ; @il4965_rs_get_adjacent_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x23, _RATE_INVALID@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RATE_INVALID@GOTPAGEOFF]
	ldr	w22, [x23]
	mov	x0, x3
	bl	_is_a_band
	cbz	x0, LBB0_6
LBB0_1:
	mov	x21, x22
	subs	w8, w19, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	x9, x19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tst	w8, w20
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	asr	w8, w8, #1
	sub	w9, w9, #1
	cmp	w9, #0
	b.gt	LBB0_3
; %bb.5:
	mov	x21, x22
	b	LBB0_10
LBB0_6:
	mov	x0, x21
	bl	_is_legacy
	cbz	w0, LBB0_1
; %bb.7:
	ldr	w8, [x23]
	cmp	w8, w19
	b.ne	LBB0_16
; %bb.8:
	mov	x21, x19
	b	LBB0_15
LBB0_9:
	sub	w21, w9, #1
LBB0_10:
	add	w19, w19, #1
Lloh2:
	adrp	x8, _RATE_COUNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RATE_COUNT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ge	LBB0_14
; %bb.11:
	mov	w9, #1
	lsl	w9, w9, w19
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	tst	w9, w20
	b.ne	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w19, w19, #1
	lsl	w9, w9, #1
	cmp	w8, w19
	b.ne	LBB0_12
LBB0_14:
	mov	x19, x22
LBB0_15:
	orr	w0, w21, w19, lsl #8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh5:
	adrp	x24, _il_rates@GOTPAGE
Lloh6:
	ldr	x24, [x24, _il_rates@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
	mov	x21, x19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	sbfiz	x10, x21, #3, #32
	ldr	w21, [x9, x10]
	cmp	w21, w8
	b.eq	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	lsr	w9, w20, w21
	tbnz	w9, #0, LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_D_RATE
	ldr	w8, [x23]
	mov	x9, x21
	cmp	w21, w8
	b.ne	LBB0_17
	b	LBB0_21
LBB0_20:
	mov	x9, x8
	mov	x21, x8
LBB0_21:
	cmp	w9, w19
	b.eq	LBB0_15
	b	LBB0_23
LBB0_22:
	mov	x9, x8
	cmp	w9, w19
	b.eq	LBB0_15
LBB0_23:
Lloh9:
	adrp	x22, l_.str.1@PAGE
Lloh10:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x8, x8, w19, sxtw #3
	ldr	w19, [x8, #4]
	cmp	w19, w9
	b.eq	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	lsr	w8, w20, w19
	tbnz	w8, #0, LBB0_15
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x22
	mov	x1, x19
	bl	_D_RATE
	ldr	w9, [x23]
	cmp	w19, w9
	b.ne	LBB0_24
	b	LBB0_15
LBB0_27:
	mov	x19, x9
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_INVALID,4,2               ; @RATE_INVALID
	.comm	_RATE_COUNT,4,2                 ; @RATE_COUNT
	.comm	_il_rates,8,3                   ; @il_rates
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skipping masked lower rate: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Skipping masked higher rate: %d\n"

	.no_dead_strip	_il4965_rs_get_adjacent_rate
.subsections_via_symbols
