	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_init                ## -- Begin function amdgpu_irq_init
	.p2align	4, 0x90
_amdgpu_irq_init:                       ## @amdgpu_irq_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
	addq	$28, %rdi
	callq	_spin_lock_init
	movl	$0, 12(%rbx)
	movq	%rbx, %rdi
	callq	_amdgpu_msi_ok
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	44(%rbx), %edi
	callq	_pci_enable_msi
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	$1, 12(%rbx)
	movl	40(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_3:
	movq	%rbx, %rdi
	callq	_amdgpu_device_has_dc_support
	testl	%eax, %eax
	je	LBB0_4
LBB0_8:
	leaq	24(%rbx), %rdi
	movq	_amdgpu_irq_handle_ih1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	20(%rbx), %rdi
	movq	_amdgpu_irq_handle_ih2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	$1, 16(%rbx)
	movq	(%rbx), %rdi
	movq	8(%rdi), %rax
	movl	(%rax), %esi
	callq	_drm_irq_install
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r14d
	movl	$0, 16(%rbx)
	movq	%rbx, %rdi
	callq	_amdgpu_device_has_dc_support
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_flush_work
	jmp	LBB0_12
LBB0_4:
	cmpl	$0, 36(%rbx)
	movq	(%rbx), %rdi
	jne	LBB0_6
## %bb.5:
	movl	$1, (%rdi)
LBB0_6:
	movl	32(%rbx), %esi
	callq	_drm_vblank_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	leaq	8(%rbx), %rdi
	movq	_amdgpu_hotplug_work_func@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	jmp	LBB0_8
LBB0_11:
	movq	(%rbx), %rax
	movl	$16777215, 4(%rax)              ## imm = 0xFFFFFF
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu: using MSI.\n"

	.comm	_amdgpu_hotplug_work_func,4,2   ## @amdgpu_hotplug_work_func
	.comm	_amdgpu_irq_handle_ih1,4,2      ## @amdgpu_irq_handle_ih1
	.comm	_amdgpu_irq_handle_ih2,4,2      ## @amdgpu_irq_handle_ih2
L_.str.1:                               ## @.str.1
	.asciz	"amdgpu: irq initialized.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_init                ; -- Begin function amdgpu_irq_init
	.p2align	2
_amdgpu_irq_init:                       ; @amdgpu_irq_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #28
	bl	_spin_lock_init
	str	wzr, [x19, #12]
	mov	x0, x19
	bl	_amdgpu_msi_ok
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #44]
	bl	_pci_enable_msi
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w0, [x19, #40]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_3:
	mov	x0, x19
	bl	_amdgpu_device_has_dc_support
	cbz	w0, LBB0_7
LBB0_4:
	add	x0, x19, #24
Lloh2:
	adrp	x8, _amdgpu_irq_handle_ih1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _amdgpu_irq_handle_ih1@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #20
Lloh5:
	adrp	x8, _amdgpu_irq_handle_ih2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _amdgpu_irq_handle_ih2@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	ldr	w1, [x8]
	bl	_drm_irq_install
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.5:
	str	wzr, [x19, #16]
	mov	x0, x19
	bl	_amdgpu_device_has_dc_support
	cbnz	w0, LBB0_12
; %bb.6:
	add	x0, x19, #8
	bl	_flush_work
	b	LBB0_12
LBB0_7:
	ldr	w8, [x19, #36]
	ldr	x0, [x19]
	cbnz	w8, LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x0]
LBB0_9:
	ldr	w1, [x19, #32]
	bl	_drm_vblank_init
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.10:
	add	x0, x19, #8
Lloh8:
	adrp	x8, _amdgpu_hotplug_work_func@GOTPAGE
Lloh9:
	ldr	x8, [x8, _amdgpu_hotplug_work_func@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_INIT_WORK
	b	LBB0_4
LBB0_11:
	ldr	x8, [x19]
	mov	w9, #16777215
	str	w9, [x8, #4]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu: using MSI.\n"

	.comm	_amdgpu_hotplug_work_func,4,2   ; @amdgpu_hotplug_work_func
	.comm	_amdgpu_irq_handle_ih1,4,2      ; @amdgpu_irq_handle_ih1
	.comm	_amdgpu_irq_handle_ih2,4,2      ; @amdgpu_irq_handle_ih2
l_.str.1:                               ; @.str.1
	.asciz	"amdgpu: irq initialized.\n"

.subsections_via_symbols
