	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ene_rx_sense_carrier           ## -- Begin function ene_rx_sense_carrier
	.p2align	4, 0x90
_ene_rx_sense_carrier:                  ## @ene_rx_sense_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	%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
	movq	%rdi, %r15
	movq	_ev@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movl	8(%r14), %esi
	callq	_DEFINE_IR_RAW_EVENT
	movq	_ENE_CIRCAR_PRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ene_read_reg
	movl	%eax, %ebx
	movq	_ENE_CIRCAR_HPRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ene_read_reg
	movl	%eax, %r12d
	movq	_ENE_CIRCAR_PRD_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	je	LBB0_3
## %bb.1:
	notl	%eax
	andl	%eax, %ebx
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dbg
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg
	movl	$2000000, %eax                  ## imm = 0x1E8480
	xorl	%edx, %edx
	idivl	%ebx
	movl	%eax, %r13d
	imull	$100, %r12d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dbg
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.4:
	movl	$1, (%r14)
	movl	%r13d, 4(%r14)
	movl	%ebx, 8(%r14)
	movl	(%r15), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ir_raw_event_store             ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ev,12,2                        ## @ev
	.comm	_ENE_CIRCAR_PRD,4,2             ## @ENE_CIRCAR_PRD
	.comm	_ENE_CIRCAR_HPRD,4,2            ## @ENE_CIRCAR_HPRD
	.comm	_ENE_CIRCAR_PRD_VALID,4,2       ## @ENE_CIRCAR_PRD_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RX: hardware carrier period = %02x"

L_.str.1:                               ## @.str.1
	.asciz	"RX: hardware carrier pulse period = %02x"

L_.str.2:                               ## @.str.2
	.asciz	"RX: sensed carrier = %d Hz, duty cycle %d%%"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ene_rx_sense_carrier           ; -- Begin function ene_rx_sense_carrier
	.p2align	2
_ene_rx_sense_carrier:                  ; @ene_rx_sense_carrier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
Lloh0:
	adrp	x19, _ev@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ev@GOTPAGEOFF]
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	bl	_DEFINE_IR_RAW_EVENT
Lloh2:
	adrp	x8, _ENE_CIRCAR_PRD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENE_CIRCAR_PRD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ene_read_reg
	mov	x22, x0
Lloh5:
	adrp	x8, _ENE_CIRCAR_HPRD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENE_CIRCAR_HPRD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ene_read_reg
Lloh8:
	adrp	x8, _ENE_CIRCAR_PRD_VALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENE_CIRCAR_PRD_VALID@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w9, w8, w22
	cmp	w9, #0
	bic	w22, w22, w8
	ccmp	w22, #0, #4, ne
	b.eq	LBB0_3
; %bb.1:
	mov	x21, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_dbg
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_dbg
	mov	w8, #33920
	movk	w8, #30, lsl #16
	sdiv	w23, w8, w22
	mov	w8, #100
	mul	w8, w21, w8
	sdiv	w21, w8, w22
	str	x21, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_dbg
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w8, #1
	stp	w8, w23, [x19]
	str	w21, [x19, #8]
	ldr	w0, [x20]
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ir_raw_event_store
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ev,12,2                        ; @ev
	.comm	_ENE_CIRCAR_PRD,4,2             ; @ENE_CIRCAR_PRD
	.comm	_ENE_CIRCAR_HPRD,4,2            ; @ENE_CIRCAR_HPRD
	.comm	_ENE_CIRCAR_PRD_VALID,4,2       ; @ENE_CIRCAR_PRD_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RX: hardware carrier period = %02x"

l_.str.1:                               ; @.str.1
	.asciz	"RX: hardware carrier pulse period = %02x"

l_.str.2:                               ; @.str.2
	.asciz	"RX: sensed carrier = %d Hz, duty cycle %d%%"

.subsections_via_symbols
