	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_tx_sample
_ene_tx_sample:                         ## @ene_tx_sample
	.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	40(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movl	4(%rdi), %edi
	testl	%edi, %edi
	jne	LBB0_7
## %bb.2:
	movq	8(%rbx), %rcx
	cmpq	16(%rbx), %rcx
	jne	LBB0_6
## %bb.3:
	cmpl	$0, 24(%rbx)
	je	LBB0_4
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	%rbx, %rdi
	callq	_ene_tx_disable
	addq	$48, %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_complete                       ## TAILCALL
LBB0_15:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
LBB0_6:
	leaq	1(%rcx), %rdx
	movq	%rdx, 8(%rbx)
	movl	(%rax,%rcx,4), %edi
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	movl	%eax, (%rbx)
	movq	_sample_period@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_CLOSEST
	testl	%eax, %eax
	movl	$1, %edi
	cmovnel	%eax, %edi
	movl	%edi, 4(%rbx)
LBB0_7:
	movq	_ENE_CIRRLC_OUT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %r15d
	subl	%eax, 4(%rbx)
	movq	_sample_period@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imull	%r15d, %esi
	testl	%r14d, %r14d
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	movq	_ENE_CIRRLC_OUT_PULSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_9:
	orl	%r15d, %r14d
	cmpl	$0, 28(%rbx)
	jne	LBB0_10
## %bb.11:
	movq	_ENE_CIRRLC_OUT0@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_ENE_CIRRLC_OUT1@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_ene_write_reg
	xorl	%eax, %eax
	cmpl	$0, 28(%rbx)
	sete	%al
	movl	%eax, 28(%rbx)
LBB0_13:
	movq	_txsim@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.16:
	addq	$32, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mod_timer                      ## TAILCALL
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movl	$1, 24(%rbx)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX: BUG: attempt to transmit NULL buffer\n"

L_.str.1:                               ## @.str.1
	.asciz	"TX: no more data to send"

L_.str.2:                               ## @.str.2
	.asciz	"TX: last sample sent by hardware"

	.comm	_sample_period,4,2              ## @sample_period
	.comm	_ENE_CIRRLC_OUT_MASK,8,3        ## @ENE_CIRRLC_OUT_MASK
L_.str.3:                               ## @.str.3
	.asciz	"TX: sample %8d (%s)"

L_.str.4:                               ## @.str.4
	.asciz	"pulse"

L_.str.5:                               ## @.str.5
	.asciz	"space"

	.comm	_ENE_CIRRLC_OUT_PULSE,4,2       ## @ENE_CIRRLC_OUT_PULSE
	.comm	_ENE_CIRRLC_OUT1,4,2            ## @ENE_CIRRLC_OUT1
	.comm	_ENE_CIRRLC_OUT0,4,2            ## @ENE_CIRRLC_OUT0
	.comm	_txsim,8,3                      ## @txsim
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_ene_tx_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_tx_sample
_ene_tx_sample:                         ; @ene_tx_sample
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldp	w21, w0, [x0]
Lloh0:
	adrp	x22, _sample_period@GOTPAGE
Lloh1:
	ldr	x22, [x22, _sample_period@GOTPAGEOFF]
	cbnz	w0, LBB0_7
; %bb.2:
	ldp	x9, x10, [x19, #8]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_11
; %bb.4:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dbg
	mov	x0, x19
	bl	_ene_tx_disable
	add	x0, x19, #48
	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
	b	_complete
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_pr_warn
LBB0_6:
	add	x10, x9, #1
	str	x10, [x19, #8]
	ldr	w0, [x8, x9, lsl #2]
	cmp	w21, #0
	cset	w8, eq
	str	w8, [x19]
	ldr	w1, [x22]
	bl	_DIV_ROUND_CLOSEST
	cmp	w0, #0
	csinc	w0, w0, wzr, ne
	str	w0, [x19, #4]
LBB0_7:
Lloh6:
	adrp	x8, _ENE_CIRRLC_OUT_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENE_CIRRLC_OUT_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_min
	mov	x20, x0
	ldr	w8, [x19, #4]
	sub	w8, w8, w0
	str	w8, [x19, #4]
	ldr	w8, [x22]
	mul	w8, w8, w0
Lloh9:
	adrp	x9, l_.str.4@PAGE
Lloh10:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh11:
	adrp	x10, l_.str.5@PAGE
Lloh12:
	add	x10, x10, l_.str.5@PAGEOFF
	cmp	w21, #0
	csel	x9, x10, x9, eq
	stp	x8, x9, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg
Lloh15:
	adrp	x8, _ENE_CIRRLC_OUT_PULSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENE_CIRRLC_OUT_PULSE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w20
Lloh18:
	adrp	x8, _ENE_CIRRLC_OUT1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENE_CIRRLC_OUT1@GOTPAGEOFF]
	ldr	w9, [x19, #28]
Lloh20:
	adrp	x10, _ENE_CIRRLC_OUT0@GOTPAGE
Lloh21:
	ldr	x10, [x10, _ENE_CIRRLC_OUT0@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x10, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ene_write_reg
	ldr	w8, [x19, #28]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x19, #28]
LBB0_8:
Lloh22:
	adrp	x8, _txsim@GOTPAGE
Lloh23:
	ldr	x8, [x8, _txsim@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	add	x0, x19, #32
Lloh25:
	adrp	x8, _jiffies@GOTPAGE
Lloh26:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _HZ@GOTPAGE
Lloh29:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh30:
	ldrsw	x9, [x9]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #5
	add	x1, x8, w9, sxtw
	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
	b	_mod_timer
LBB0_10:
	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_11:
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg
	mov	w8, #1
	str	w8, [x19, #24]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX: BUG: attempt to transmit NULL buffer\n"

l_.str.1:                               ; @.str.1
	.asciz	"TX: no more data to send"

l_.str.2:                               ; @.str.2
	.asciz	"TX: last sample sent by hardware"

	.comm	_sample_period,4,2              ; @sample_period
	.comm	_ENE_CIRRLC_OUT_MASK,8,3        ; @ENE_CIRRLC_OUT_MASK
l_.str.3:                               ; @.str.3
	.asciz	"TX: sample %8d (%s)"

l_.str.4:                               ; @.str.4
	.asciz	"pulse"

l_.str.5:                               ; @.str.5
	.asciz	"space"

	.comm	_ENE_CIRRLC_OUT_PULSE,4,2       ; @ENE_CIRRLC_OUT_PULSE
	.comm	_ENE_CIRRLC_OUT1,4,2            ; @ENE_CIRRLC_OUT1
	.comm	_ENE_CIRRLC_OUT0,4,2            ; @ENE_CIRRLC_OUT0
	.comm	_txsim,8,3                      ; @txsim
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_ene_tx_sample
.subsections_via_symbols
