	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_hw_rf2425_channel
_ath5k_hw_rf2425_channel:               ## @ath5k_hw_rf2425_channel
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %edi
	cmpl	$4799, %edi                     ## imm = 0x12BF
	jg	LBB0_2
## %bb.1:
	addl	$-2272, %edi                    ## imm = 0xF720
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$8, %esi
	callq	_ath5k_hw_bitswap
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_2:
	movl	%edi, %ecx
	movl	$3435973837, %edx               ## imm = 0xCCCCCCCD
	movq	%rcx, %rax
	imulq	%rdx, %rax
	shrq	$34, %rax
	leal	(%rax,%rax,4), %esi
	movl	%edi, %eax
	subl	%esi, %eax
	cmpl	$5435, %edi                     ## imm = 0x153B
	ja	LBB0_4
## %bb.3:
	cmpl	$2, %eax
	jne	LBB0_4
## %bb.12:
	leal	(%rdi,%rdi,4), %eax
	addl	%eax, %eax
	addl	$17516, %eax                    ## imm = 0x446C
	cwtl
	imull	$5243, %eax, %eax               ## imm = 0x147B
	movl	%eax, %ecx
	sarl	$17, %ecx
	shrl	$31, %eax
	addl	%ecx, %eax
	incl	%eax
	movzwl	%ax, %edi
	movl	$8, %esi
	callq	_ath5k_hw_bitswap
	movl	%eax, %r15d
	xorl	%edi, %edi
	jmp	LBB0_13
LBB0_4:
	cmpl	$5119, %edi                     ## imm = 0x13FF
	ja	LBB0_7
## %bb.5:
	imulq	%rdx, %rcx
	shrq	$36, %rcx
	shll	$2, %ecx
	leal	(%rcx,%rcx,4), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	jne	LBB0_7
## %bb.6:
	addl	$-4800, %edi                    ## imm = 0xED40
	movzwl	%di, %eax
	imull	$52429, %eax, %eax              ## imm = 0xCCCD
	shrl	$18, %eax
	andl	$-4, %eax
	jmp	LBB0_11
LBB0_7:
	imull	$-858993459, %edi, %ecx         ## imm = 0xCCCCCCCD
	rorl	%ecx
	cmpl	$429496729, %ecx                ## imm = 0x19999999
	jbe	LBB0_8
## %bb.9:
	testl	%eax, %eax
	je	LBB0_10
## %bb.16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_8:
	addl	$-4800, %edi                    ## imm = 0xED40
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%rdi, %rax
	shrq	$34, %rax
	andl	$-2, %eax
	jmp	LBB0_11
LBB0_10:
	addl	$-4800, %edi                    ## imm = 0xED40
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%rdi, %rax
	shrq	$34, %rax
LBB0_11:
	movl	%eax, %edi
	movl	$8, %esi
	callq	_ath5k_hw_bitswap
	movl	%eax, %r15d
	movl	$1, %edi
LBB0_13:
	movl	$2, %esi
	callq	_ath5k_hw_bitswap
	movl	%eax, %ebx
LBB0_14:
	shll	$4, %r15d
	shll	$2, %ebx
	orl	%r15d, %ebx
	orl	$4097, %ebx                     ## imm = 0x1001
	movzbl	%bl, %esi
	movq	_AR5K_RF_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ath5k_hw_reg_write
	shrl	$8, %ebx
	andl	$127, %ebx
	movq	_AR5K_RF_BUFFER_CONTROL_5@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ath5k_hw_reg_write
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR5K_RF_BUFFER,4,2             ## @AR5K_RF_BUFFER
	.comm	_AR5K_RF_BUFFER_CONTROL_5,4,2   ## @AR5K_RF_BUFFER_CONTROL_5
	.no_dead_strip	_ath5k_hw_rf2425_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_hw_rf2425_channel
_ath5k_hw_rf2425_channel:               ; @ath5k_hw_rf2425_channel
	.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	w8, [x1]
	mov	w9, #4799
	cmp	w8, w9
	b.gt	LBB0_2
; %bb.1:
	sub	w0, w8, #2272
	mov	w1, #8
	bl	_ath5k_hw_bitswap
	mov	x20, x0
	mov	w0, #0
	b	LBB0_14
LBB0_2:
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x10, w8, w9
	lsr	x9, x10, #34
	add	w9, w9, w9, lsl #2
	sub	w9, w8, w9
	lsr	w11, w8, #2
	cmp	w11, #1358
	ccmp	w9, #2, #0, ls
	b.eq	LBB0_6
; %bb.3:
	lsr	w11, w8, #10
	cmp	w11, #4
	b.hi	LBB0_7
; %bb.4:
	lsr	x10, x10, #36
	mov	w11, #20
	msub	w10, w10, w11, w8
	cbnz	w10, LBB0_7
; %bb.5:
	mov	w9, #-4800
	add	w8, w8, w9
	and	w8, w8, #0xffff
	mov	w9, #52429
	mul	w8, w8, w9
	lsr	w8, w8, #18
	and	w0, w8, #0x3ffc
	b	LBB0_12
LBB0_6:
	mov	w9, #10
	mov	w10, #17516
	madd	w8, w8, w9, w10
	sxth	w8, w8
	mov	w9, #5243
	mul	w8, w8, w9
	asr	w9, w8, #17
	add	w8, w9, w8, lsr #31
	add	w8, w8, #1
	and	w0, w8, #0xffff
	mov	w1, #8
	bl	_ath5k_hw_bitswap
	mov	x20, x0
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	mov	w10, #52429
	movk	w10, #52428, lsl #16
	mul	w11, w8, w10
	ror	w11, w11, #1
	mov	w12, #39321
	movk	w12, #6553, lsl #16
	cmp	w11, w12
	b.ls	LBB0_10
; %bb.8:
	cbz	w9, LBB0_11
; %bb.9:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_10:
	mov	w9, #-4800
	add	w8, w8, w9
	umull	x8, w8, w10
	lsr	x8, x8, #34
	and	w0, w8, #0x3ffffffe
	b	LBB0_12
LBB0_11:
	mov	w9, #-4800
	add	w8, w8, w9
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #34
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #8
	bl	_ath5k_hw_bitswap
	mov	x20, x0
	mov	w0, #1
LBB0_13:
	mov	w1, #2
	bl	_ath5k_hw_bitswap
LBB0_14:
	lsl	w8, w20, #4
	orr	w8, w8, w0, lsl #2
	mov	w9, #4097
	orr	w20, w8, w9
	and	w1, w20, #0xff
Lloh3:
	adrp	x8, _AR5K_RF_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5K_RF_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	ubfx	w1, w20, #8, #7
Lloh6:
	adrp	x8, _AR5K_RF_BUFFER_CONTROL_5@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR5K_RF_BUFFER_CONTROL_5@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR5K_RF_BUFFER,4,2             ; @AR5K_RF_BUFFER
	.comm	_AR5K_RF_BUFFER_CONTROL_5,4,2   ; @AR5K_RF_BUFFER_CONTROL_5
	.no_dead_strip	_ath5k_hw_rf2425_channel
.subsections_via_symbols
