	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acquire_engine
_acquire_engine:                        ## @acquire_engine
	.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
	callq	_FROM_AUX_ENGINE
	movq	_AUX_ARB_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_REG_READ
	movl	(%r14), %esi
	movq	_AUX_REG_RW_CNTL_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_get_reg_field_value
	movq	%rax, %rcx
	movq	_DMCU_CAN_ACCESS_AUX@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.1:
	movq	_AUX_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_REG_READ
	movq	%rax, %rbx
	movl	(%r12), %esi
	movq	_AUX_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rax, %rdi
	callq	_get_reg_field_value
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_reg_field_value
	movq	_AUX_RESET_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_REG
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r12), %edx
	movq	_AUX_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_reg_field_value
LBB0_4:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_REG_WRITE
	movl	(%r13), %edi
	callq	_REG
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	movq	_AUX_RESET_DONE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$1, %edx
	movl	$1, %ecx
	movl	$11, %r8d
	callq	_REG_WAIT
	movl	(%r12), %edx
	movq	_AUX_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_set_reg_field_value
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_REG_WRITE
	movl	(%r12), %edi
	movl	(%r13), %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	movl	$11, %r8d
	callq	_REG_WAIT
LBB0_6:
	movl	(%r14), %edi
	movq	_AUX_SW_USE_AUX_REG_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_REG_UPDATE
	movl	(%r14), %edi
	callq	_REG_READ
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_get_reg_field_value
	movq	%rax, %rcx
	movq	_SW_CAN_ACCESS_AUX@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	sete	%al
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUX_ARB_CONTROL,4,2            ## @AUX_ARB_CONTROL
	.comm	_AUX_REG_RW_CNTL_STATUS,4,2     ## @AUX_REG_RW_CNTL_STATUS
	.comm	_DMCU_CAN_ACCESS_AUX,8,3        ## @DMCU_CAN_ACCESS_AUX
	.comm	_AUX_CONTROL,4,2                ## @AUX_CONTROL
	.comm	_AUX_EN,4,2                     ## @AUX_EN
	.comm	_AUX_RESET_MASK,4,2             ## @AUX_RESET_MASK
	.comm	_AUX_RESET,4,2                  ## @AUX_RESET
	.comm	_AUX_RESET_DONE,4,2             ## @AUX_RESET_DONE
	.comm	_AUX_SW_USE_AUX_REG_REQ,4,2     ## @AUX_SW_USE_AUX_REG_REQ
	.comm	_SW_CAN_ACCESS_AUX,8,3          ## @SW_CAN_ACCESS_AUX
	.no_dead_strip	_acquire_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acquire_engine
_acquire_engine:                        ; @acquire_engine
	.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
	bl	_FROM_AUX_ENGINE
Lloh0:
	adrp	x20, _AUX_ARB_CONTROL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AUX_ARB_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_REG_READ
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _AUX_REG_RW_CNTL_STATUS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _AUX_REG_RW_CNTL_STATUS@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_get_reg_field_value
Lloh4:
	adrp	x8, _DMCU_CAN_ACCESS_AUX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMCU_CAN_ACCESS_AUX@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_8
LBB0_2:
Lloh7:
	adrp	x22, _AUX_CONTROL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _AUX_CONTROL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_REG_READ
	mov	x19, x0
	ldr	w1, [x22]
Lloh9:
	adrp	x23, _AUX_EN@GOTPAGE
Lloh10:
	ldr	x23, [x23, _AUX_EN@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_get_reg_field_value
	cbnz	x0, LBB0_7
; %bb.3:
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w1, #1
	bl	_set_reg_field_value
Lloh11:
	adrp	x24, _AUX_RESET_MASK@GOTPAGE
Lloh12:
	ldr	x24, [x24, _AUX_RESET_MASK@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_REG
Lloh13:
	adrp	x23, _AUX_RESET@GOTPAGE
Lloh14:
	ldr	x23, [x23, _AUX_RESET@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w1, #1
	bl	_set_reg_field_value
LBB0_5:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_REG_WRITE
	ldr	w0, [x24]
	bl	_REG
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x22]
Lloh15:
	adrp	x24, _AUX_RESET_DONE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _AUX_RESET_DONE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w2, #1
	mov	w3, #1
	mov	w4, #11
	bl	_REG_WAIT
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w1, #0
	bl	_set_reg_field_value
	ldr	w0, [x22]
	mov	x1, x19
	bl	_REG_WRITE
	ldr	w0, [x22]
	ldr	w1, [x24]
	mov	w2, #0
	mov	w3, #1
	mov	w4, #11
	bl	_REG_WAIT
LBB0_7:
	ldr	w0, [x20]
Lloh17:
	adrp	x8, _AUX_SW_USE_AUX_REG_REQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AUX_SW_USE_AUX_REG_REQ@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_REG_UPDATE
	ldr	w0, [x20]
	bl	_REG_READ
	ldr	w1, [x20]
	ldr	w2, [x21]
	bl	_get_reg_field_value
Lloh20:
	adrp	x8, _SW_CAN_ACCESS_AUX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SW_CAN_ACCESS_AUX@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
LBB0_8:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AUX_ARB_CONTROL,4,2            ; @AUX_ARB_CONTROL
	.comm	_AUX_REG_RW_CNTL_STATUS,4,2     ; @AUX_REG_RW_CNTL_STATUS
	.comm	_DMCU_CAN_ACCESS_AUX,8,3        ; @DMCU_CAN_ACCESS_AUX
	.comm	_AUX_CONTROL,4,2                ; @AUX_CONTROL
	.comm	_AUX_EN,4,2                     ; @AUX_EN
	.comm	_AUX_RESET_MASK,4,2             ; @AUX_RESET_MASK
	.comm	_AUX_RESET,4,2                  ; @AUX_RESET
	.comm	_AUX_RESET_DONE,4,2             ; @AUX_RESET_DONE
	.comm	_AUX_SW_USE_AUX_REG_REQ,4,2     ; @AUX_SW_USE_AUX_REG_REQ
	.comm	_SW_CAN_ACCESS_AUX,8,3          ; @SW_CAN_ACCESS_AUX
	.no_dead_strip	_acquire_engine
.subsections_via_symbols
