	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_rx_sense_carrier
_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ENE_CIRCAR_PRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ene_read_reg
	movl	%eax, %ebx
	movq	_ENE_CIRCAR_HPRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ene_read_reg
	movl	%eax, %r15d
	movq	_ENE_CIRCAR_PRD_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	je	LBB0_4
## %bb.1:
	notl	%eax
	andl	%eax, %ebx
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dbg
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dbg
	movl	$2000000, %eax                  ## imm = 0x1E8480
	xorl	%edx, %edx
	idivl	%ebx
	movl	%eax, %r12d
	imull	$100, %r15d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dbg
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.3:
	movl	$1, -48(%rbp)
	movl	%r12d, -44(%rbp)
	movl	%ebx, -40(%rbp)
	movl	(%r14), %edi
	leaq	-48(%rbp), %rsi
	callq	_ir_raw_event_store
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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%%"

	.no_dead_strip	_ene_rx_sense_carrier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_rx_sense_carrier
_ene_rx_sense_carrier:                  ; @ene_rx_sense_carrier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _ENE_CIRCAR_PRD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENE_CIRCAR_PRD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ene_read_reg
	mov	x21, x0
Lloh3:
	adrp	x8, _ENE_CIRCAR_HPRD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENE_CIRCAR_HPRD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ene_read_reg
Lloh6:
	adrp	x8, _ENE_CIRCAR_PRD_VALID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENE_CIRCAR_PRD_VALID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w9, w8, w21
	cmp	w9, #0
	bic	w21, w21, w8
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_dbg
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_dbg
	mov	w8, #33920
	movk	w8, #30, lsl #16
	sdiv	w22, w8, w21
	mov	w8, #100
	mul	w8, w20, w8
	sdiv	w20, w8, w21
	str	x20, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_dbg
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w8, #1
	stp	w8, w22, [sp, #16]
	str	w20, [sp, #24]
	ldr	w0, [x19]
	add	x1, sp, #16
	bl	_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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.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%%"

	.no_dead_strip	_ene_rx_sense_carrier
.subsections_via_symbols
