	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_a6xx_gpu_state_get             ## -- Begin function a6xx_gpu_state_get
	.p2align	4, 0x90
_a6xx_gpu_state_get:                    ## @a6xx_gpu_state_get
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, -32(%rbp)
	callq	_to_adreno_gpu
	movq	%rax, %rdi
	callq	_to_a6xx_gpu
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_adreno_gpu_state_get
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a6xx_get_gmu_registers
	movq	%r15, %rdi
	callq	_a6xx_gmu_gx_is_on
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a6xx_get_indexed_registers
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_a6xx_crashdumper_init
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_a6xx_get_registers
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_a6xx_get_shaders
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_a6xx_get_clusters
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_a6xx_get_dbgahb_clusters
	movl	-32(%rbp), %edi
	movl	(%r14), %esi
	movl	$1, %edx
	callq	_msm_gem_kernel_put
LBB0_4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_a6xx_get_debugbus
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_a6xx_gpu_state_get             ; -- Begin function a6xx_gpu_state_get
	.p2align	2
_a6xx_gpu_state_get:                    ; @a6xx_gpu_state_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	bl	_to_adreno_gpu
	bl	_to_a6xx_gpu
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
	mov	x0, x19
	mov	x1, x20
	bl	_adreno_gpu_state_get
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_gmu_registers
	mov	x0, x21
	bl	_a6xx_gmu_gx_is_on
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_indexed_registers
	add	x1, sp, #8
	mov	x0, x19
	bl	_a6xx_crashdumper_init
	cbnz	w0, LBB0_4
; %bb.3:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_registers
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_shaders
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_clusters
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_dbgahb_clusters
	ldr	w0, [sp, #8]
	ldr	w1, [x19]
	mov	w2, #1
	bl	_msm_gem_kernel_put
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_a6xx_get_debugbus
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	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
	add	sp, sp, #64
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
