	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_set_tx_carrier
_ene_set_tx_carrier:                    ## @ene_set_tx_carrier
	.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
	movl	%esi, %ebx
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dbg
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	movl	$2000000, %eax                  ## imm = 0x1E8480
	xorl	%edx, %edx
	idivl	%ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_ENE_CIRMOD_PRD_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_ENE_CIRMOD_PRD_MIN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	cmpl	%ecx, %eax
	jg	LBB0_5
## %bb.4:
	cmpl	%esi, %eax
	jl	LBB0_5
LBB0_6:
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_ene_tx_set_carrier
	jmp	LBB0_7
LBB0_5:
	xorl	%r15d, %r15d
	movl	$2000, %eax                     ## imm = 0x7D0
	xorl	%edx, %edx
	idivl	%esi
	movl	%eax, %esi
	movl	$2000, %eax                     ## imm = 0x7D0
	xorl	%edx, %edx
	idivl	%ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dbg
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX: attempt to set tx carrier to %d kHz"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENE_CIRMOD_PRD_MAX,4,2         ## @ENE_CIRMOD_PRD_MAX
	.comm	_ENE_CIRMOD_PRD_MIN,4,2         ## @ENE_CIRMOD_PRD_MIN
L_.str.1:                               ## @.str.1
	.asciz	"TX: out of range %d-%d kHz carrier"

	.no_dead_strip	_ene_set_tx_carrier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_set_tx_carrier
_ene_set_tx_carrier:                    ; @ene_set_tx_carrier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	cbz	w20, LBB0_4
; %bb.1:
	mov	w8, #33920
	movk	w8, #30, lsl #16
	sdiv	w8, w8, w20
	cbz	w8, LBB0_5
; %bb.2:
Lloh2:
	adrp	x9, _ENE_CIRMOD_PRD_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ENE_CIRMOD_PRD_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _ENE_CIRMOD_PRD_MIN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ENE_CIRMOD_PRD_MIN@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #8, le
	b.ge	LBB0_5
; %bb.3:
	mov	w8, #2000
	sdiv	w1, w8, w10
	sdiv	w8, w8, w9
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	str	w8, [x19]
	mov	x0, x19
	bl	_ene_tx_set_carrier
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX: attempt to set tx carrier to %d kHz"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENE_CIRMOD_PRD_MAX,4,2         ; @ENE_CIRMOD_PRD_MAX
	.comm	_ENE_CIRMOD_PRD_MIN,4,2         ; @ENE_CIRMOD_PRD_MIN
l_.str.1:                               ; @.str.1
	.asciz	"TX: out of range %d-%d kHz carrier"

	.no_dead_strip	_ene_set_tx_carrier
.subsections_via_symbols
