	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_isr
_ene_isr:                               ## @ene_isr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	$0, -48(%rbp)
	leaq	4(%rsi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_verbose
	movq	%r15, %rdi
	callq	_ene_rx_read_hw_pointer
	movq	%r15, %rdi
	callq	_ene_irq_status
	testl	%eax, %eax
	je	LBB0_22
## %bb.1:
	movl	%eax, %ebx
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ENE_IRQ_TX@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_verbose
	cmpq	$0, 32(%r15)
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_ene_tx_sample
LBB0_5:
	movq	_ENE_IRQ_RX@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_22
## %bb.6:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_verbose
	cmpq	$0, 32(%r15)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_ene_rx_sense_carrier
LBB0_8:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 20(%r15)
	jne	LBB0_12
## %bb.9:
	xorl	%eax, %eax
	cmpl	$0, 12(%r15)
	jne	LBB0_11
## %bb.10:
	movq	_ENE_FW_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	movl	%eax, 16(%r15)
LBB0_12:
	movq	%r15, %rdi
	callq	_ene_rx_get_sample_reg
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.13:
	leaq	L_.str.4(%rip), %r14
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	12(%r15), %eax
	movl	%eax, 16(%r15)
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	callq	_ene_rx_get_sample_reg
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dbg_verbose
	testl	%r12d, %r12d
	je	LBB0_21
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ene_read_reg
	movl	%eax, %r13d
	cmpq	$0, 24(%r15)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_ENE_FW_SMPL_BUF_FAN@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movq	_ENE_FW_SAMPLE_BUFFER@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ene_read_reg
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r13d, %ebx
	movq	_ENE_FW_SMPL_BUF_FAN_PLS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ebx, %r12d
	movq	_ENE_FW_SMPL_BUF_FAN_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_ENE_FW_SAMPLE_PERIOD_FAN@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_ENE_FW_SAMPLE_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	testl	%r13d, %ebx
	sete	%r12b
	notl	%ebx
	andl	%r13d, %ebx
	movq	_sample_period@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	imull	$100, %ebx, %eax
	addl	$100, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	20(%r15), %eax
	orl	%ebx, %eax
	je	LBB0_19
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	testl	%r12d, %r12d
	leaq	L_.str.6(%rip), %rdx
	leaq	L_.str.7(%rip), %rax
	cmoveq	%rax, %rdx
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dbg
	movl	%ebx, %edi
	callq	_US_TO_NS
	movl	%eax, -44(%rbp)
	movl	%r12d, -48(%rbp)
	movl	8(%r15), %edi
	leaq	-48(%rbp), %rsi
	callq	_ir_raw_event_store_with_filter
	jmp	LBB0_20
LBB0_21:
	movl	8(%r15), %edi
	callq	_ir_raw_event_handle
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
LBB0_22:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ISR called"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_ENE_IRQ_TX,4,2                 ## @ENE_IRQ_TX
L_.str.1:                               ## @.str.1
	.asciz	"TX interrupt"

L_.str.2:                               ## @.str.2
	.asciz	"TX interrupt on unsupported device!"

	.comm	_ENE_IRQ_RX,4,2                 ## @ENE_IRQ_RX
L_.str.3:                               ## @.str.3
	.asciz	"RX interrupt"

	.comm	_ENE_FW_PACKET_SIZE,4,2         ## @ENE_FW_PACKET_SIZE
L_.str.4:                               ## @.str.4
	.asciz	"next sample to read at: %04x"

	.comm	_ENE_FW_SMPL_BUF_FAN,4,2        ## @ENE_FW_SMPL_BUF_FAN
	.comm	_ENE_FW_SAMPLE_BUFFER,4,2       ## @ENE_FW_SAMPLE_BUFFER
	.comm	_ENE_FW_SMPL_BUF_FAN_PLS,4,2    ## @ENE_FW_SMPL_BUF_FAN_PLS
	.comm	_ENE_FW_SMPL_BUF_FAN_MSK,4,2    ## @ENE_FW_SMPL_BUF_FAN_MSK
	.comm	_ENE_FW_SAMPLE_PERIOD_FAN,4,2   ## @ENE_FW_SAMPLE_PERIOD_FAN
	.comm	_ENE_FW_SAMPLE_SPACE,4,2        ## @ENE_FW_SAMPLE_SPACE
	.comm	_sample_period,4,2              ## @sample_period
L_.str.5:                               ## @.str.5
	.asciz	"RX: %d (%s)"

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

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

	.no_dead_strip	_ene_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_isr
_ene_isr:                               ; @ene_isr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	str	xzr, [sp, #40]
	add	x20, x1, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_verbose
	mov	x0, x21
	bl	_ene_rx_read_hw_pointer
	mov	x0, x21
	bl	_ene_irq_status
	cbz	w0, LBB0_21
; %bb.1:
	mov	x22, x0
Lloh5:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh7:
	ldr	w19, [x8]
Lloh8:
	adrp	x8, _ENE_IRQ_TX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENE_IRQ_TX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg_verbose
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_20
; %bb.3:
	mov	x0, x21
	bl	_ene_tx_sample
LBB0_4:
Lloh13:
	adrp	x8, _ENE_IRQ_RX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENE_IRQ_RX@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_21
; %bb.5:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg_verbose
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_ene_rx_sense_carrier
LBB0_7:
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	str	w19, [sp, #36]                  ; 4-byte Folded Spill
	ldr	w8, [x21, #20]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	w8, [x21, #12]
Lloh18:
	adrp	x9, _ENE_FW_PACKET_SIZE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ENE_FW_PACKET_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, wzr, eq
	str	w8, [x21, #16]
LBB0_9:
	mov	x0, x21
	bl	_ene_rx_get_sample_reg
	mov	x24, x0
	str	x24, [sp]
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dbg_verbose
	cbz	w24, LBB0_19
; %bb.10:
Lloh23:
	adrp	x27, _ENE_FW_SMPL_BUF_FAN@GOTPAGE
Lloh24:
	ldr	x27, [x27, _ENE_FW_SMPL_BUF_FAN@GOTPAGEOFF]
Lloh25:
	adrp	x19, _ENE_FW_SAMPLE_BUFFER@GOTPAGE
Lloh26:
	ldr	x19, [x19, _ENE_FW_SAMPLE_BUFFER@GOTPAGEOFF]
Lloh27:
	adrp	x28, _ENE_FW_SMPL_BUF_FAN_PLS@GOTPAGE
Lloh28:
	ldr	x28, [x28, _ENE_FW_SMPL_BUF_FAN_PLS@GOTPAGEOFF]
Lloh29:
	adrp	x26, _ENE_FW_SMPL_BUF_FAN_MSK@GOTPAGE
Lloh30:
	ldr	x26, [x26, _ENE_FW_SMPL_BUF_FAN_MSK@GOTPAGEOFF]
Lloh31:
	adrp	x22, _ENE_FW_SAMPLE_PERIOD_FAN@GOTPAGE
Lloh32:
	ldr	x22, [x22, _ENE_FW_SAMPLE_PERIOD_FAN@GOTPAGEOFF]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
Lloh33:
	adrp	x23, l_.str.4@PAGE
Lloh34:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x21, #12]
	str	w8, [x21, #16]
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x21
	bl	_ene_rx_get_sample_reg
	mov	x24, x0
	str	x24, [sp]
	mov	x0, x23
	bl	_dbg_verbose
	cbz	w24, LBB0_19
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_ene_read_reg
	mov	x25, x0
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x19]
	add	w8, w8, w24
	sub	w1, w8, w9
	mov	x0, x21
	bl	_ene_read_reg
	orr	w8, w25, w0, lsl #8
	ldr	w9, [x28]
	and	w20, w8, w9
	ldr	w9, [x26]
	and	w8, w8, w9
	ldr	w9, [x22]
	mul	w24, w8, w9
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
Lloh35:
	adrp	x8, _ENE_FW_SAMPLE_SPACE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENE_FW_SAMPLE_SPACE@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w25
	cset	w20, eq
	bic	w8, w25, w8
Lloh38:
	adrp	x9, _sample_period@GOTPAGE
Lloh39:
	ldr	x9, [x9, _sample_period@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	mul	w24, w8, w9
	ldr	w8, [x21]
	cbz	w8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w9, #100
	mul	w9, w24, w9
	add	w8, w8, #100
	sdiv	w24, w9, w8
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x21, #20]
	orr	w8, w8, w24
	cbz	w8, LBB0_11
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	cmp	w20, #0
Lloh41:
	adrp	x8, l_.str.6@PAGE
Lloh42:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh43:
	adrp	x9, l_.str.7@PAGE
Lloh44:
	add	x9, x9, l_.str.7@PAGEOFF
	csel	x8, x9, x8, eq
	stp	x24, x8, [sp]
Lloh45:
	adrp	x0, l_.str.5@PAGE
Lloh46:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_dbg
	mov	x0, x24
	bl	_US_TO_NS
	stp	w20, w0, [sp, #40]
	ldr	w0, [x21, #8]
	add	x1, sp, #40
	bl	_ir_raw_event_store_with_filter
	b	LBB0_12
LBB0_19:
	ldr	w0, [x21, #8]
	bl	_ir_raw_event_handle
	ldr	w19, [sp, #36]                  ; 4-byte Folded Reload
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_21
LBB0_20:
Lloh47:
	adrp	x0, l_.str.2@PAGE
Lloh48:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dbg
LBB0_21:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ISR called"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_ENE_IRQ_TX,4,2                 ; @ENE_IRQ_TX
l_.str.1:                               ; @.str.1
	.asciz	"TX interrupt"

l_.str.2:                               ; @.str.2
	.asciz	"TX interrupt on unsupported device!"

	.comm	_ENE_IRQ_RX,4,2                 ; @ENE_IRQ_RX
l_.str.3:                               ; @.str.3
	.asciz	"RX interrupt"

	.comm	_ENE_FW_PACKET_SIZE,4,2         ; @ENE_FW_PACKET_SIZE
l_.str.4:                               ; @.str.4
	.asciz	"next sample to read at: %04x"

	.comm	_ENE_FW_SMPL_BUF_FAN,4,2        ; @ENE_FW_SMPL_BUF_FAN
	.comm	_ENE_FW_SAMPLE_BUFFER,4,2       ; @ENE_FW_SAMPLE_BUFFER
	.comm	_ENE_FW_SMPL_BUF_FAN_PLS,4,2    ; @ENE_FW_SMPL_BUF_FAN_PLS
	.comm	_ENE_FW_SMPL_BUF_FAN_MSK,4,2    ; @ENE_FW_SMPL_BUF_FAN_MSK
	.comm	_ENE_FW_SAMPLE_PERIOD_FAN,4,2   ; @ENE_FW_SAMPLE_PERIOD_FAN
	.comm	_ENE_FW_SAMPLE_SPACE,4,2        ; @ENE_FW_SAMPLE_SPACE
	.comm	_sample_period,4,2              ; @sample_period
l_.str.5:                               ; @.str.5
	.asciz	"RX: %d (%s)"

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

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

	.no_dead_strip	_ene_isr
.subsections_via_symbols
