	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_speed
_change_speed:                          ## @change_speed
	.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	%esi, %r12d
	movq	%rdi, %r14
	movq	_stir_modes@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	%r12d, (%rdi,%rbx,8)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_4:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_5:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %edx
	callq	_pr_debug
	movq	_REG_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_CTRL1_SRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movq	_REG_DPLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$21, %edx
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.7:
	movq	_REG_PDCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rax
	movl	4(%rax,%rbx,8), %edx
	movq	%r14, %rdi
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.8:
	movq	_MODE_NRESET@GOTPCREL(%rip), %rax
	movq	_MODE_FASTRX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_isfir
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:
	movq	_MODE_SIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_11
LBB0_9:
	movq	_MODE_FIR@GOTPCREL(%rip), %rax
	movq	_MODE_FFRSTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
LBB0_11:
	xorl	%eax, %eax
	cmpl	$2400, %r12d                    ## imm = 0x960
	jne	LBB0_13
## %bb.12:
	movq	_MODE_2400@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	orl	%eax, %ebx
	orl	%ebx, %edx
	movq	_REG_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.14:
	movl	(%r15), %esi
	movq	_CTRL1_SDMODE@GOTPCREL(%rip), %rax
	movq	_tx_power@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	addl	%edx, %edx
	andl	$6, %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:
	movl	(%r15), %esi
	movl	(%rbx), %edx
	addl	%edx, %edx
	andl	$6, %edx
	movq	%r14, %rdi
	callq	_write_reg
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	movq	_REG_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_rx_sensitivity@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$5, %eax
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	_write_reg
LBB0_17:
	movl	%r12d, (%r14)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stir_modes,8,3                 ## @stir_modes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid speed %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"speed change from %d to %d\n"

	.comm	_REG_CTRL1,4,2                  ## @REG_CTRL1
	.comm	_CTRL1_SRESET,4,2               ## @CTRL1_SRESET
	.comm	_REG_DPLL,4,2                   ## @REG_DPLL
	.comm	_REG_PDCLK,4,2                  ## @REG_PDCLK
	.comm	_MODE_NRESET,4,2                ## @MODE_NRESET
	.comm	_MODE_FASTRX,4,2                ## @MODE_FASTRX
	.comm	_MODE_FIR,4,2                   ## @MODE_FIR
	.comm	_MODE_FFRSTEN,4,2               ## @MODE_FFRSTEN
	.comm	_MODE_SIR,4,2                   ## @MODE_SIR
	.comm	_MODE_2400,4,2                  ## @MODE_2400
	.comm	_REG_MODE,4,2                   ## @REG_MODE
	.comm	_CTRL1_SDMODE,4,2               ## @CTRL1_SDMODE
	.comm	_tx_power,4,2                   ## @tx_power
	.comm	_REG_CTRL2,4,2                  ## @REG_CTRL2
	.comm	_rx_sensitivity,4,2             ## @rx_sensitivity
	.no_dead_strip	_change_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_speed
_change_speed:                          ; @change_speed
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _stir_modes@GOTPAGE
Lloh1:
	ldr	x22, [x22, _stir_modes@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x23]
	cmp	w8, w19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #8
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	ldr	x0, [x20, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_5:
	ldr	w1, [x20]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_pr_debug
Lloh9:
	adrp	x21, _REG_CTRL1@GOTPAGE
Lloh10:
	ldr	x21, [x21, _REG_CTRL1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh11:
	adrp	x8, _CTRL1_SRESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CTRL1_SRESET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.6:
Lloh14:
	adrp	x8, _REG_DPLL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_DPLL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #21
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.7:
Lloh17:
	adrp	x8, _REG_PDCLK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_PDCLK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w2, [x8, #4]
	mov	x0, x20
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.8:
Lloh20:
	adrp	x8, _MODE_NRESET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MODE_NRESET@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _MODE_FASTRX@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MODE_FASTRX@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w22, w9, w8
	mov	x0, x19
	bl	_isfir
Lloh26:
	adrp	x8, _MODE_FIR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MODE_FIR@GOTPAGEOFF]
Lloh28:
	adrp	x9, _MODE_FFRSTEN@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MODE_FFRSTEN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh32:
	adrp	x9, _MODE_SIR@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MODE_SIR@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	cmp	x0, #0
	csel	w8, w9, w8, eq
	orr	w8, w22, w8
Lloh35:
	adrp	x9, _MODE_2400@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MODE_2400@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmp	w19, #2400
	csel	w9, w9, wzr, eq
	orr	w2, w8, w9
Lloh38:
	adrp	x8, _REG_MODE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _REG_MODE@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.9:
	ldr	w1, [x21]
Lloh41:
	adrp	x8, _CTRL1_SDMODE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CTRL1_SDMODE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x22, _tx_power@GOTPAGE
Lloh45:
	ldr	x22, [x22, _tx_power@GOTPAGEOFF]
	ldr	w9, [x22]
	ubfiz	w9, w9, #1, #2
	orr	w2, w9, w8
	mov	x0, x20
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	w1, [x21]
	ldr	w8, [x22]
	ubfiz	w2, w8, #1, #2
	mov	x0, x20
	bl	_write_reg
	cbnz	w0, LBB0_12
; %bb.11:
Lloh46:
	adrp	x8, _REG_CTRL2@GOTPAGE
Lloh47:
	ldr	x8, [x8, _REG_CTRL2@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x8, _rx_sensitivity@GOTPAGE
Lloh50:
	ldr	x8, [x8, _rx_sensitivity@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	ubfiz	w2, w8, #5, #3
	mov	x0, x20
	bl	_write_reg
LBB0_12:
	str	w19, [x20]
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_stir_modes,8,3                 ; @stir_modes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid speed %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"speed change from %d to %d\n"

	.comm	_REG_CTRL1,4,2                  ; @REG_CTRL1
	.comm	_CTRL1_SRESET,4,2               ; @CTRL1_SRESET
	.comm	_REG_DPLL,4,2                   ; @REG_DPLL
	.comm	_REG_PDCLK,4,2                  ; @REG_PDCLK
	.comm	_MODE_NRESET,4,2                ; @MODE_NRESET
	.comm	_MODE_FASTRX,4,2                ; @MODE_FASTRX
	.comm	_MODE_FIR,4,2                   ; @MODE_FIR
	.comm	_MODE_FFRSTEN,4,2               ; @MODE_FFRSTEN
	.comm	_MODE_SIR,4,2                   ; @MODE_SIR
	.comm	_MODE_2400,4,2                  ; @MODE_2400
	.comm	_REG_MODE,4,2                   ; @REG_MODE
	.comm	_CTRL1_SDMODE,4,2               ; @CTRL1_SDMODE
	.comm	_tx_power,4,2                   ; @tx_power
	.comm	_REG_CTRL2,4,2                  ; @REG_CTRL2
	.comm	_rx_sensitivity,4,2             ; @rx_sensitivity
	.no_dead_strip	_change_speed
.subsections_via_symbols
