	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_enable_te                ## -- Begin function mdfld_enable_te
	.p2align	4, 0x90
_mdfld_enable_te:                       ## @mdfld_enable_te
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movl	%esi, %edi
	callq	_mid_pipeconf
	movl	%eax, %r13d
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gma_power_begin
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%r13d, %edi
	callq	_REG_READ
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_gma_power_end
LBB0_2:
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mid_enable_pipe_event
	movq	_PIPE_TE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_psb_enable_pipestat
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPEACONF_ENABLE,4,2           ## @PIPEACONF_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PIPE_TE_ENABLE,4,2             ## @PIPE_TE_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_enable_te                ; -- Begin function mdfld_enable_te
	.p2align	2
_mdfld_enable_te:                       ; @mdfld_enable_te
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0]
	mov	x0, x1
	bl	_mid_pipeconf
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	bl	_gma_power_begin
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_REG_READ
	mov	x22, x0
	mov	x0, x21
	bl	_gma_power_end
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
Lloh0:
	adrp	x8, _PIPEACONF_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIPEACONF_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	bl	_mid_enable_pipe_event
Lloh3:
	adrp	x8, _PIPE_TE_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIPE_TE_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_psb_enable_pipestat
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPEACONF_ENABLE,4,2           ; @PIPEACONF_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PIPE_TE_ENABLE,4,2             ; @PIPE_TE_ENABLE
.subsections_via_symbols
