	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_rx_get_sample_reg
_ene_rx_get_sample_reg:                 ## @ene_rx_get_sample_reg
	.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, %rbx
	movl	(%rdi), %esi
	movl	4(%rdi), %eax
	cmpl	%eax, %esi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_verbose
	movq	%rbx, %rdi
	callq	_ene_rx_read_hw_pointer
	movl	(%rbx), %esi
	movl	4(%rbx), %eax
LBB0_2:
	cmpl	%eax, %esi
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	jmp	LBB0_11
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dbg_verbose
	movl	(%rbx), %r14d
	leal	1(%r14), %esi
	cmpl	8(%rbx), %esi
	cmovel	%r15d, %esi
	movl	%esi, (%rbx)
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_verbose
	cmpl	$7, %r14d
	jg	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	movq	_ENE_FW_SAMPLE_BUFFER@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	jmp	LBB0_11
LBB0_6:
	addl	$-8, %r14d
	movl	%r14d, %r15d
	subl	12(%rbx), %r15d
	jge	LBB0_8
## %bb.7:
	leaq	L_.str.5(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	addl	16(%rbx), %r14d
	jmp	LBB0_11
LBB0_8:
	cmpl	20(%rbx), %r15d
	jge	LBB0_10
## %bb.9:
	leaq	L_.str.6(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	addl	24(%rbx), %r15d
	movl	%r15d, %r14d
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.7(%rip), %rdi
	callq	_dbg
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %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	"RB: hit end, try update w_pointer"

L_.str.1:                               ## @.str.1
	.asciz	"RB: end of data at %d"

L_.str.2:                               ## @.str.2
	.asciz	"RB: reading at offset %d"

L_.str.3:                               ## @.str.3
	.asciz	"RB: next read will be from offset %d"

L_.str.4:                               ## @.str.4
	.asciz	"RB: read at main buffer at %d"

	.comm	_ENE_FW_SAMPLE_BUFFER,4,2       ## @ENE_FW_SAMPLE_BUFFER
L_.str.5:                               ## @.str.5
	.asciz	"RB: read at 1st extra buffer at %d"

L_.str.6:                               ## @.str.6
	.asciz	"RB: read at 2nd extra buffer at %d"

L_.str.7:                               ## @.str.7
	.asciz	"attempt to read beyond ring buffer end"

	.no_dead_strip	_ene_rx_get_sample_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_rx_get_sample_reg
_ene_rx_get_sample_reg:                 ; @ene_rx_get_sample_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_verbose
	mov	x0, x19
	bl	_ene_rx_read_hw_pointer
	ldp	w8, w9, [x19]
LBB0_2:
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	str	x9, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg_verbose
LBB0_4:
	mov	w0, #0
	b	LBB0_12
LBB0_5:
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dbg_verbose
	ldr	w20, [x19]
	add	w8, w20, #1
	ldr	w9, [x19, #8]
	cmp	w8, w9
	csinc	w8, wzr, w20, eq
	str	w8, [x19]
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg_verbose
	cmp	w20, #7
	b.gt	LBB0_7
; %bb.6:
	str	x20, [sp]
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dbg_verbose
Lloh10:
	adrp	x8, _ENE_FW_SAMPLE_BUFFER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENE_FW_SAMPLE_BUFFER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_11
LBB0_7:
	sub	w21, w20, #8
	ldr	w8, [x19, #12]
	subs	w20, w21, w8
	b.ge	LBB0_9
; %bb.8:
	str	x21, [sp]
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_dbg_verbose
	ldr	w8, [x19, #16]
	add	w0, w8, w21
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19, #20]
	cmp	w20, w8
	b.ge	LBB0_13
; %bb.10:
	str	x20, [sp]
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dbg_verbose
	ldr	w8, [x19, #24]
LBB0_11:
	add	w0, w8, w20
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_dbg
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RB: hit end, try update w_pointer"

l_.str.1:                               ; @.str.1
	.asciz	"RB: end of data at %d"

l_.str.2:                               ; @.str.2
	.asciz	"RB: reading at offset %d"

l_.str.3:                               ; @.str.3
	.asciz	"RB: next read will be from offset %d"

l_.str.4:                               ; @.str.4
	.asciz	"RB: read at main buffer at %d"

	.comm	_ENE_FW_SAMPLE_BUFFER,4,2       ; @ENE_FW_SAMPLE_BUFFER
l_.str.5:                               ; @.str.5
	.asciz	"RB: read at 1st extra buffer at %d"

l_.str.6:                               ; @.str.6
	.asciz	"RB: read at 2nd extra buffer at %d"

l_.str.7:                               ; @.str.7
	.asciz	"attempt to read beyond ring buffer end"

	.no_dead_strip	_ene_rx_get_sample_reg
.subsections_via_symbols
