	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adreno_hw_init                 ## -- Begin function adreno_hw_init
	.p2align	4, 0x90
_adreno_hw_init:                        ## @adreno_hw_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	%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
	movq	%rdi, %r15
	callq	_to_adreno_gpu
	movq	%rax, %r14
	movl	16(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	%r14, %rdi
	callq	_adreno_load_fw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.1:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.2:
	movq	8(%r15), %rcx
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	xorl	%edx, %edx
LBB0_10:
	testb	$1, %al
	je	LBB0_13
## %bb.11:
	movq	(%rcx,%rdx,8), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	20(%rax), %ecx
	movl	%ecx, 28(%rax)
	movl	%ecx, 24(%rax)
	movl	16(%rax), %ecx
	movq	8(%rax), %rax
	movl	%ecx, 8(%rax)
	movq	$0, (%rax)
LBB0_13:
	movq	_REG_ADRENO_CP_RB_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_MSM_GPU_RB_CNTL_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_adreno_is_a430
	xorl	%ebx, %ebx
	movl	$0, %edx
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_AXXX_CP_RB_CNTL_NO_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_15:
	orl	%r13d, %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_adreno_gpu_write
	movq	_REG_ADRENO_CP_RB_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_ADRENO_CP_RB_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_adreno_gpu_write64
	movq	%r14, %rdi
	callq	_adreno_is_a430
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	movq	_REG_ADRENO_CP_RB_RPTR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_REG_ADRENO_CP_RB_RPTR_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	movq	_rptr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rbmemptr
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_adreno_gpu_write64
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%eax, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rsi
	je	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	20(%rdi), %ebx
	movl	%ebx, 28(%rdi)
	movl	%ebx, 24(%rdi)
	movl	16(%rdi), %ebx
	movq	8(%rdi), %rdi
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rcx,%rdx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	20(%rdi), %ebx
	movl	%ebx, 28(%rdi)
	movl	%ebx, 24(%rdi)
	movl	16(%rdi), %ebx
	movq	8(%rdi), %rdi
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_REG_ADRENO_CP_RB_CNTL,4,2      ## @REG_ADRENO_CP_RB_CNTL
	.comm	_MSM_GPU_RB_CNTL_DEFAULT,4,2    ## @MSM_GPU_RB_CNTL_DEFAULT
	.comm	_AXXX_CP_RB_CNTL_NO_UPDATE,4,2  ## @AXXX_CP_RB_CNTL_NO_UPDATE
	.comm	_REG_ADRENO_CP_RB_BASE,4,2      ## @REG_ADRENO_CP_RB_BASE
	.comm	_REG_ADRENO_CP_RB_BASE_HI,4,2   ## @REG_ADRENO_CP_RB_BASE_HI
	.comm	_REG_ADRENO_CP_RB_RPTR_ADDR,4,2 ## @REG_ADRENO_CP_RB_RPTR_ADDR
	.comm	_REG_ADRENO_CP_RB_RPTR_ADDR_HI,4,2 ## @REG_ADRENO_CP_RB_RPTR_ADDR_HI
	.comm	_rptr,4,2                       ## @rptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adreno_hw_init                 ; -- Begin function adreno_hw_init
	.p2align	2
_adreno_hw_init:                        ; @adreno_hw_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	x20, x0
	bl	_to_adreno_gpu
	mov	x19, x0
	ldr	w1, [x20, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	x0, x19
	bl	_adreno_load_fw
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	ldr	x9, [x20, #8]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	w12, w11, [x10, #16]
	stp	w11, w11, [x10, #24]
	ldr	x10, [x10, #8]
	str	w12, [x10, #8]
	str	xzr, [x10]
	b	LBB0_3
LBB0_6:
Lloh2:
	adrp	x8, _REG_ADRENO_CP_RB_CNTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_ADRENO_CP_RB_CNTL@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	adrp	x8, _MSM_GPU_RB_CNTL_DEFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSM_GPU_RB_CNTL_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_adreno_is_a430
Lloh8:
	adrp	x8, _AXXX_CP_RB_CNTL_NO_UPDATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AXXX_CP_RB_CNTL_NO_UPDATE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w22
	mov	x0, x19
	mov	x1, x21
	bl	_adreno_gpu_write
Lloh11:
	adrp	x8, _REG_ADRENO_CP_RB_BASE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_ADRENO_CP_RB_BASE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _REG_ADRENO_CP_RB_BASE_HI@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_ADRENO_CP_RB_BASE_HI@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w3, [x8]
	mov	x0, x19
	bl	_adreno_gpu_write64
	mov	x0, x19
	bl	_adreno_is_a430
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_8
; %bb.7:
Lloh17:
	adrp	x8, _REG_ADRENO_CP_RB_RPTR_ADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_ADRENO_CP_RB_RPTR_ADDR@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
Lloh20:
	adrp	x8, _REG_ADRENO_CP_RB_RPTR_ADDR_HI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_ADRENO_CP_RB_RPTR_ADDR_HI@GOTPAGEOFF]
Lloh22:
	ldr	w22, [x8]
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh23:
	adrp	x8, _rptr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _rptr@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_rbmemptr
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_adreno_gpu_write64
	mov	w0, #0
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_REG_ADRENO_CP_RB_CNTL,4,2      ; @REG_ADRENO_CP_RB_CNTL
	.comm	_MSM_GPU_RB_CNTL_DEFAULT,4,2    ; @MSM_GPU_RB_CNTL_DEFAULT
	.comm	_AXXX_CP_RB_CNTL_NO_UPDATE,4,2  ; @AXXX_CP_RB_CNTL_NO_UPDATE
	.comm	_REG_ADRENO_CP_RB_BASE,4,2      ; @REG_ADRENO_CP_RB_BASE
	.comm	_REG_ADRENO_CP_RB_BASE_HI,4,2   ; @REG_ADRENO_CP_RB_BASE_HI
	.comm	_REG_ADRENO_CP_RB_RPTR_ADDR,4,2 ; @REG_ADRENO_CP_RB_RPTR_ADDR
	.comm	_REG_ADRENO_CP_RB_RPTR_ADDR_HI,4,2 ; @REG_ADRENO_CP_RB_RPTR_ADDR_HI
	.comm	_rptr,4,2                       ; @rptr
.subsections_via_symbols
