	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_ucode_init
_a6xx_ucode_init:                       ## @a6xx_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_adreno_gpu
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_a6xx_gpu
	movq	%rax, %r12
	cmpq	$0, 8(%rax)
	je	LBB0_1
LBB0_4:
	movq	_REG_A6XX_CP_SQE_INSTR_BASE_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_A6XX_CP_SQE_INSTR_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	callq	_gpu_write64
	xorl	%r15d, %r15d
	jmp	LBB0_5
LBB0_1:
	movq	(%rbx), %rax
	movq	_ADRENO_FW_SQE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_adreno_fw_create_bo
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r12), %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	$0, 8(%r12)
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	callq	_msm_gem_object_set_name
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ADRENO_FW_SQE,8,3              ## @ADRENO_FW_SQE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate SQE ucode: %d\n"

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

	.comm	_REG_A6XX_CP_SQE_INSTR_BASE_LO,4,2 ## @REG_A6XX_CP_SQE_INSTR_BASE_LO
	.comm	_REG_A6XX_CP_SQE_INSTR_BASE_HI,4,2 ## @REG_A6XX_CP_SQE_INSTR_BASE_HI
	.no_dead_strip	_a6xx_ucode_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_ucode_init
_a6xx_ucode_init:                       ; @a6xx_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_a6xx_gpu
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _REG_A6XX_CP_SQE_INSTR_BASE_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A6XX_CP_SQE_INSTR_BASE_LO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _REG_A6XX_CP_SQE_INSTR_BASE_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_CP_SQE_INSTR_BASE_HI@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_gpu_write64
	mov	w21, #0
	b	LBB0_4
LBB0_2:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _ADRENO_FW_SQE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADRENO_FW_SQE@GOTPAGEOFF]
Lloh8:
	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_5
; %bb.3:
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x20, #8]
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_4:
	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_5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_msm_gem_object_set_name
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ADRENO_FW_SQE,8,3              ; @ADRENO_FW_SQE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate SQE ucode: %d\n"

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

	.comm	_REG_A6XX_CP_SQE_INSTR_BASE_LO,4,2 ; @REG_A6XX_CP_SQE_INSTR_BASE_LO
	.comm	_REG_A6XX_CP_SQE_INSTR_BASE_HI,4,2 ; @REG_A6XX_CP_SQE_INSTR_BASE_HI
	.no_dead_strip	_a6xx_ucode_init
.subsections_via_symbols
