	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_idle_axi
_v3d_idle_axi:                          ## @v3d_idle_axi
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	_V3D_GMP_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V3D_GMP_CFG_STOP_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_V3D_CORE_WRITE
	movq	_V3D_GMP_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_CORE_READ
	movq	_V3D_GMP_STATUS_RD_COUNT_MASK@GOTPCREL(%rip), %rcx
	movq	_V3D_GMP_STATUS_WR_COUNT_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_V3D_GMP_STATUS_CFG_BUSY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	xorl	%edi, %edi
	testl	%eax, %edx
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_GMP_CFG,4,2                ## @V3D_GMP_CFG
	.comm	_V3D_GMP_CFG_STOP_REQ,4,2       ## @V3D_GMP_CFG_STOP_REQ
	.comm	_V3D_GMP_STATUS,4,2             ## @V3D_GMP_STATUS
	.comm	_V3D_GMP_STATUS_RD_COUNT_MASK,4,2 ## @V3D_GMP_STATUS_RD_COUNT_MASK
	.comm	_V3D_GMP_STATUS_WR_COUNT_MASK,4,2 ## @V3D_GMP_STATUS_WR_COUNT_MASK
	.comm	_V3D_GMP_STATUS_CFG_BUSY,4,2    ## @V3D_GMP_STATUS_CFG_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to wait for safe GMP shutdown\n"

	.no_dead_strip	_v3d_idle_axi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_idle_axi
_v3d_idle_axi:                          ; @v3d_idle_axi
	.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, x1
Lloh0:
	adrp	x8, _V3D_GMP_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V3D_GMP_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _V3D_GMP_CFG_STOP_REQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V3D_GMP_CFG_STOP_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_V3D_CORE_WRITE
Lloh6:
	adrp	x8, _V3D_GMP_STATUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V3D_GMP_STATUS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_V3D_CORE_READ
Lloh9:
	adrp	x8, _V3D_GMP_STATUS_RD_COUNT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V3D_GMP_STATUS_RD_COUNT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _V3D_GMP_STATUS_WR_COUNT_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V3D_GMP_STATUS_WR_COUNT_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _V3D_GMP_STATUS_CFG_BUSY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V3D_GMP_STATUS_CFG_BUSY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	cbz	x0, LBB0_2
; %bb.1:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_GMP_CFG,4,2                ; @V3D_GMP_CFG
	.comm	_V3D_GMP_CFG_STOP_REQ,4,2       ; @V3D_GMP_CFG_STOP_REQ
	.comm	_V3D_GMP_STATUS,4,2             ; @V3D_GMP_STATUS
	.comm	_V3D_GMP_STATUS_RD_COUNT_MASK,4,2 ; @V3D_GMP_STATUS_RD_COUNT_MASK
	.comm	_V3D_GMP_STATUS_WR_COUNT_MASK,4,2 ; @V3D_GMP_STATUS_WR_COUNT_MASK
	.comm	_V3D_GMP_STATUS_CFG_BUSY,4,2    ; @V3D_GMP_STATUS_CFG_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to wait for safe GMP shutdown\n"

	.no_dead_strip	_v3d_idle_axi
.subsections_via_symbols
