	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_ih_sw_init
_vega10_ih_sw_init:                     ## @vega10_ih_sw_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_SOC15_IH_CLIENTID_IH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	28(%rdi), %rcx
	xorl	%edx, %edx
	callq	_amdgpu_irq_add_id
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	leaq	20(%rbx), %rsi
	movq	%rbx, %rdi
	movl	$262144, %edx                   ## imm = 0x40000
	movl	$1, %ecx
	callq	_amdgpu_ih_ring_init
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	$1, 20(%rbx)
	movl	(%rbx), %eax
	addl	%eax, %eax
	movl	%eax, 24(%rbx)
	leaq	12(%rbx), %rsi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_amdgpu_ih_ring_init
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	4(%rbx), %rsi
	movl	$1, 12(%rbx)
	movl	(%rbx), %eax
	addl	%eax, %eax
	addl	$2, %eax
	movl	%eax, 16(%rbx)
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_amdgpu_ih_ring_init
	testl	%eax, %eax
	je	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	$1, 4(%rbx)
	movl	(%rbx), %eax
	addl	%eax, %eax
	addl	$4, %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_amdgpu_irq_init                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SOC15_IH_CLIENTID_IH,4,2       ## @SOC15_IH_CLIENTID_IH
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_vega10_ih_sw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega10_ih_sw_init
_vega10_ih_sw_init:                     ; @vega10_ih_sw_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
Lloh0:
	adrp	x8, _SOC15_IH_CLIENTID_IH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOC15_IH_CLIENTID_IH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, x0, #28
	mov	w2, #0
	bl	_amdgpu_irq_add_id
	cbnz	w0, LBB0_4
; %bb.1:
	add	x1, x19, #20
	mov	w20, #1
	mov	x0, x19
	mov	w2, #262144
	mov	w3, #1
	bl	_amdgpu_ih_ring_init
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w8, [x19]
	lsl	w8, w8, #1
	stp	w20, w8, [x19, #20]
	add	x1, x19, #12
Lloh3:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #1
	bl	_amdgpu_ih_ring_init
	cbnz	w0, LBB0_4
; %bb.3:
	add	x1, x19, #4
	mov	w21, #1
	ldr	w8, [x19]
	lsl	w8, w8, #1
	add	w8, w8, #2
	stp	w21, w8, [x19, #12]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #1
	bl	_amdgpu_ih_ring_init
	cbz	w0, LBB0_5
LBB0_4:
	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:
	ldr	w8, [x19]
	lsl	w8, w8, #1
	add	w8, w8, #4
	stp	w21, w8, [x19, #4]
	mov	x0, x19
	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
	b	_amdgpu_irq_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SOC15_IH_CLIENTID_IH,4,2       ; @SOC15_IH_CLIENTID_IH
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_vega10_ih_sw_init
.subsections_via_symbols
