	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_ucode_init
_a5xx_ucode_init:                       ## @a5xx_ucode_init
	.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
	callq	_to_adreno_gpu
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_to_a5xx_gpu
	movq	%rax, %rbx
	cmpq	$0, 16(%rax)
	je	LBB0_1
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
LBB0_9:
	movq	_REG_A5XX_CP_ME_INSTR_BASE_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_A5XX_CP_ME_INSTR_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
	callq	_gpu_write64
	movq	_REG_A5XX_CP_PFP_INSTR_BASE_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_A5XX_CP_PFP_INSTR_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	callq	_gpu_write64
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_1:
	movq	(%r15), %rax
	movq	_ADRENO_FW_PM4@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%rbx, %rdx
	addq	$4, %rdx
	movq	%r14, %rdi
	callq	_adreno_fw_create_bo
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	16(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	$0, 16(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	callq	_msm_gem_object_set_name
	cmpq	$0, 8(%rbx)
	jne	LBB0_9
LBB0_6:
	movq	(%r15), %rax
	movq	_ADRENO_FW_PFP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_adreno_fw_create_bo
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	$0, 8(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	movl	%r15d, %edx
	callq	_DRM_DEV_ERROR
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	callq	_msm_gem_object_set_name
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ADRENO_FW_PM4,8,3              ## @ADRENO_FW_PM4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate PM4: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"pm4fw"

	.comm	_ADRENO_FW_PFP,8,3              ## @ADRENO_FW_PFP
L_.str.2:                               ## @.str.2
	.asciz	"could not allocate PFP: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"pfpfw"

	.comm	_REG_A5XX_CP_ME_INSTR_BASE_LO,4,2 ## @REG_A5XX_CP_ME_INSTR_BASE_LO
	.comm	_REG_A5XX_CP_ME_INSTR_BASE_HI,4,2 ## @REG_A5XX_CP_ME_INSTR_BASE_HI
	.comm	_REG_A5XX_CP_PFP_INSTR_BASE_LO,4,2 ## @REG_A5XX_CP_PFP_INSTR_BASE_LO
	.comm	_REG_A5XX_CP_PFP_INSTR_BASE_HI,4,2 ## @REG_A5XX_CP_PFP_INSTR_BASE_HI
	.no_dead_strip	_a5xx_ucode_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_ucode_init
_a5xx_ucode_init:                       ; @a5xx_ucode_init
	.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	x19, x0
	bl	_to_adreno_gpu
	mov	x21, x0
	bl	_to_a5xx_gpu
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, _REG_A5XX_CP_ME_INSTR_BASE_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A5XX_CP_ME_INSTR_BASE_LO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _REG_A5XX_CP_ME_INSTR_BASE_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A5XX_CP_ME_INSTR_BASE_HI@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w3, [x20, #4]
	mov	x0, x19
	bl	_gpu_write64
Lloh6:
	adrp	x8, _REG_A5XX_CP_PFP_INSTR_BASE_LO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A5XX_CP_PFP_INSTR_BASE_LO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _REG_A5XX_CP_PFP_INSTR_BASE_HI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_A5XX_CP_PFP_INSTR_BASE_HI@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_gpu_write64
	mov	w21, #0
	b	LBB0_9
LBB0_3:
	ldr	x8, [x21]
Lloh12:
	adrp	x9, _ADRENO_FW_PM4@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADRENO_FW_PM4@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	add	x2, x20, #4
	mov	x0, x19
	bl	_adreno_fw_create_bo
	str	x0, [x20, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #16]
	cbz	x8, LBB0_5
; %bb.4:
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x20, #16]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_5:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_msm_gem_object_set_name
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
LBB0_6:
	ldr	x8, [x21]
Lloh19:
	adrp	x9, _ADRENO_FW_PFP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ADRENO_FW_PFP@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	mov	x2, x20
	bl	_adreno_fw_create_bo
	str	x0, [x20, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbz	x8, LBB0_10
; %bb.7:
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x20, #8]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_9:
	mov	x0, x21
	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
LBB0_10:
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_msm_gem_object_set_name
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ADRENO_FW_PM4,8,3              ; @ADRENO_FW_PM4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate PM4: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"pm4fw"

	.comm	_ADRENO_FW_PFP,8,3              ; @ADRENO_FW_PFP
l_.str.2:                               ; @.str.2
	.asciz	"could not allocate PFP: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"pfpfw"

	.comm	_REG_A5XX_CP_ME_INSTR_BASE_LO,4,2 ; @REG_A5XX_CP_ME_INSTR_BASE_LO
	.comm	_REG_A5XX_CP_ME_INSTR_BASE_HI,4,2 ; @REG_A5XX_CP_ME_INSTR_BASE_HI
	.comm	_REG_A5XX_CP_PFP_INSTR_BASE_LO,4,2 ; @REG_A5XX_CP_PFP_INSTR_BASE_LO
	.comm	_REG_A5XX_CP_PFP_INSTR_BASE_HI,4,2 ; @REG_A5XX_CP_PFP_INSTR_BASE_HI
	.no_dead_strip	_a5xx_ucode_init
.subsections_via_symbols
