	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mes_v10_1_enable
_mes_v10_1_enable:                      ## @mes_v10_1_enable
	.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, %ebx
	movq	%rdi, %r15
	movq	_GC@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_mmCP_MES_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_CP_MES_CNTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_MES_PIPE0_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %edi
	movq	_mmCP_MES_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%esi, %esi
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r12), %edi
	movq	_mmCP_MES_PRGRM_CNTR_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	sarl	$2, %ecx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	movl	(%r12), %edi
	movq	_mmCP_MES_DC_OP_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_CP_MES_DC_OP_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BYPASS_UNCACHED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movq	_MES_PIPE0_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_MES_PIPE0_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r13), %esi
	movq	_MES_INVALIDATE_ICACHE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r13), %esi
	movq	_MES_PIPE0_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %r14d
	movq	_MES_HALT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%r13), %esi
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %edi
	movq	_mmCP_MES_CNTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%esi, %esi
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32_SOC15                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GC,4,2                         ## @GC
	.comm	_mmCP_MES_CNTL,4,2              ## @mmCP_MES_CNTL
	.comm	_CP_MES_CNTL,4,2                ## @CP_MES_CNTL
	.comm	_MES_PIPE0_RESET,4,2            ## @MES_PIPE0_RESET
	.comm	_mmCP_MES_PRGRM_CNTR_START,4,2  ## @mmCP_MES_PRGRM_CNTR_START
	.comm	_mmCP_MES_DC_OP_CNTL,4,2        ## @mmCP_MES_DC_OP_CNTL
	.comm	_CP_MES_DC_OP_CNTL,4,2          ## @CP_MES_DC_OP_CNTL
	.comm	_BYPASS_UNCACHED,4,2            ## @BYPASS_UNCACHED
	.comm	_MES_PIPE0_ACTIVE,4,2           ## @MES_PIPE0_ACTIVE
	.comm	_MES_INVALIDATE_ICACHE,4,2      ## @MES_INVALIDATE_ICACHE
	.comm	_MES_HALT,4,2                   ## @MES_HALT
	.no_dead_strip	_mes_v10_1_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mes_v10_1_enable
_mes_v10_1_enable:                      ; @mes_v10_1_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _GC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GC@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _mmCP_MES_CNTL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mmCP_MES_CNTL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh4:
	adrp	x23, _CP_MES_CNTL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CP_MES_CNTL@GOTPAGEOFF]
	ldr	w1, [x23]
	cbz	w20, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MES_PIPE0_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MES_PIPE0_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x3, x0
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_WREG32_SOC15
	ldr	w0, [x21]
Lloh9:
	adrp	x8, _mmCP_MES_PRGRM_CNTR_START@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mmCP_MES_PRGRM_CNTR_START@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	w8, [x19]
	asr	w3, w8, #2
	mov	w1, #0
	bl	_WREG32_SOC15
	ldr	w0, [x21]
Lloh12:
	adrp	x19, _mmCP_MES_DC_OP_CNTL@GOTPAGE
Lloh13:
	ldr	x19, [x19, _mmCP_MES_DC_OP_CNTL@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh14:
	adrp	x8, _CP_MES_DC_OP_CNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CP_MES_DC_OP_CNTL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _BYPASS_UNCACHED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BYPASS_UNCACHED@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x3, x0
	ldr	w0, [x21]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_WREG32_SOC15
	mov	w0, #0
Lloh20:
	adrp	x8, _MES_PIPE0_ACTIVE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MES_PIPE0_ACTIVE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x8, _MES_PIPE0_ACTIVE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MES_PIPE0_ACTIVE@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh25:
	adrp	x8, _MES_INVALIDATE_ICACHE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MES_INVALIDATE_ICACHE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh28:
	adrp	x8, _MES_PIPE0_RESET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MES_PIPE0_RESET@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
Lloh31:
	adrp	x8, _MES_HALT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MES_HALT@GOTPAGEOFF]
LBB0_3:
	ldr	w1, [x23]
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x3, x0
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	w1, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WREG32_SOC15
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GC,4,2                         ; @GC
	.comm	_mmCP_MES_CNTL,4,2              ; @mmCP_MES_CNTL
	.comm	_CP_MES_CNTL,4,2                ; @CP_MES_CNTL
	.comm	_MES_PIPE0_RESET,4,2            ; @MES_PIPE0_RESET
	.comm	_mmCP_MES_PRGRM_CNTR_START,4,2  ; @mmCP_MES_PRGRM_CNTR_START
	.comm	_mmCP_MES_DC_OP_CNTL,4,2        ; @mmCP_MES_DC_OP_CNTL
	.comm	_CP_MES_DC_OP_CNTL,4,2          ; @CP_MES_DC_OP_CNTL
	.comm	_BYPASS_UNCACHED,4,2            ; @BYPASS_UNCACHED
	.comm	_MES_PIPE0_ACTIVE,4,2           ; @MES_PIPE0_ACTIVE
	.comm	_MES_INVALIDATE_ICACHE,4,2      ; @MES_INVALIDATE_ICACHE
	.comm	_MES_HALT,4,2                   ; @MES_HALT
	.no_dead_strip	_mes_v10_1_enable
.subsections_via_symbols
