	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ene_rx_enable_hw
_ene_rx_enable_hw:                      ## @ene_rx_enable_hw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_ENE_HW_C@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	movq	_ENEB_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	addl	%edx, %edx
	movq	%rbx, %rdi
	callq	_ene_write_reg
	movl	$1, %edx
	movq	_ENEB_IRQ_UNK1@GOTPCREL(%rip), %r14
	jmp	LBB0_3
LBB0_2:
	movq	_ENE_IRQ@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ene_read_reg
	andl	$240, %eax
	movq	_ENE_IRQ_UNK_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_ENE_IRQ_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_ENE_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	8(%rbx), %edx
	orl	%ecx, %edx
LBB0_3:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ene_write_reg
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ene_rx_enable_fan_input
	xorl	%esi, %esi
	cmpl	$0, 16(%rbx)
	sete	%sil
	movq	%rbx, %rdi
	callq	_ene_rx_enable_cir_engine
	movq	%rbx, %rdi
	callq	_ene_irq_status
	movq	_ENE_FW1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ENE_FW1_ENABLE@GOTPCREL(%rip), %rax
	movq	_ENE_FW1_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ene_set_reg_mask
	movl	12(%rbx), %edi
	movl	$1, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ir_raw_event_set_idle          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENE_HW_C,8,3                   ## @ENE_HW_C
	.comm	_ENEB_IRQ,4,2                   ## @ENEB_IRQ
	.comm	_ENEB_IRQ_UNK1,4,2              ## @ENEB_IRQ_UNK1
	.comm	_ENE_IRQ,4,2                    ## @ENE_IRQ
	.comm	_ENE_IRQ_UNK_EN,4,2             ## @ENE_IRQ_UNK_EN
	.comm	_ENE_IRQ_STATUS,4,2             ## @ENE_IRQ_STATUS
	.comm	_ENE_IRQ_MASK,4,2               ## @ENE_IRQ_MASK
	.comm	_ENE_FW1,4,2                    ## @ENE_FW1
	.comm	_ENE_FW1_ENABLE,4,2             ## @ENE_FW1_ENABLE
	.comm	_ENE_FW1_IRQ,4,2                ## @ENE_FW1_IRQ
	.no_dead_strip	_ene_rx_enable_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ene_rx_enable_hw
_ene_rx_enable_hw:                      ; @ene_rx_enable_hw
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ENE_HW_C@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENE_HW_C@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENEB_IRQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENEB_IRQ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w8, [x19, #8]
	lsl	w2, w8, #1
	mov	x0, x19
	bl	_ene_write_reg
	mov	w2, #1
Lloh6:
	adrp	x20, _ENEB_IRQ_UNK1@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ENEB_IRQ_UNK1@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x20, _ENE_IRQ@GOTPAGE
Lloh9:
	ldr	x20, [x20, _ENE_IRQ@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ene_read_reg
	and	w8, w0, #0xf0
Lloh10:
	adrp	x9, _ENE_IRQ_UNK_EN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ENE_IRQ_UNK_EN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh13:
	adrp	x9, _ENE_IRQ_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ENE_IRQ_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	bic	w8, w8, w9
	ldr	w9, [x19, #8]
Lloh16:
	adrp	x10, _ENE_IRQ_MASK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ENE_IRQ_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w2, w9, w8
LBB0_3:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ene_write_reg
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_ene_rx_enable_fan_input
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w1, eq
	mov	x0, x19
	bl	_ene_rx_enable_cir_engine
	mov	x0, x19
	bl	_ene_irq_status
Lloh19:
	adrp	x8, _ENE_FW1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENE_FW1@GOTPAGEOFF]
Lloh21:
	adrp	x9, _ENE_FW1_ENABLE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ENE_FW1_ENABLE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	ldr	w8, [x9]
Lloh25:
	adrp	x9, _ENE_FW1_IRQ@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ENE_FW1_IRQ@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ene_set_reg_mask
	ldr	w0, [x19, #12]
	mov	w1, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ir_raw_event_set_idle
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ENE_HW_C,8,3                   ; @ENE_HW_C
	.comm	_ENEB_IRQ,4,2                   ; @ENEB_IRQ
	.comm	_ENEB_IRQ_UNK1,4,2              ; @ENEB_IRQ_UNK1
	.comm	_ENE_IRQ,4,2                    ; @ENE_IRQ
	.comm	_ENE_IRQ_UNK_EN,4,2             ; @ENE_IRQ_UNK_EN
	.comm	_ENE_IRQ_STATUS,4,2             ; @ENE_IRQ_STATUS
	.comm	_ENE_IRQ_MASK,4,2               ; @ENE_IRQ_MASK
	.comm	_ENE_FW1,4,2                    ; @ENE_FW1
	.comm	_ENE_FW1_ENABLE,4,2             ; @ENE_FW1_ENABLE
	.comm	_ENE_FW1_IRQ,4,2                ; @ENE_FW1_IRQ
	.no_dead_strip	_ene_rx_enable_hw
.subsections_via_symbols
