	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_add_id              ## -- Begin function amdgpu_irq_add_id
	.p2align	4, 0x90
_amdgpu_irq_add_id:                     ## @amdgpu_irq_add_id
	.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	_AMDGPU_IRQ_CLIENTID_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jbe	LBB0_1
## %bb.3:
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	_AMDGPU_MAX_IRQ_SRC_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%edx, %edi
	jbe	LBB0_1
## %bb.4:
	movq	%rcx, %r15
	cmpl	$0, 16(%rcx)
	je	LBB0_1
## %bb.5:
	movq	(%r14), %rax
	movl	%esi, %r12d
	movq	(%rax,%r12,8), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%r12,8)
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movl	%ebx, %ebx
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r15), %edi
	testl	%edi, %edi
	je	LBB0_13
## %bb.10:
	cmpq	$0, 8(%r15)
	jne	LBB0_13
## %bb.11:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.12:
	movq	%rax, 8(%r15)
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %rax
LBB0_13:
	movq	%r15, (%rax,%rbx,8)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_IRQ_CLIENTID_MAX,4,2    ## @AMDGPU_IRQ_CLIENTID_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AMDGPU_MAX_IRQ_SRC_ID,4,2      ## @AMDGPU_MAX_IRQ_SRC_ID
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_add_id              ; -- Begin function amdgpu_irq_add_id
	.p2align	2
_amdgpu_irq_add_id:                     ; @amdgpu_irq_add_id
	.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
Lloh0:
	adrp	x8, _AMDGPU_IRQ_CLIENTID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_IRQ_CLIENTID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ls	LBB0_6
; %bb.1:
	mov	x20, x2
Lloh3:
	adrp	x8, _AMDGPU_MAX_IRQ_SRC_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_MAX_IRQ_SRC_ID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ls	LBB0_6
; %bb.2:
	mov	x19, x3
	ldr	w9, [x3, #16]
	cbz	w9, LBB0_6
; %bb.3:
	mov	x21, x0
	ldr	x9, [x0]
	mov	w22, w1
	ldr	x0, [x9, w1, uxtw #3]
	cbnz	x0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #8
	bl	_kcalloc
	ldr	x8, [x21]
	str	x0, [x8, x22, lsl #3]
	cbz	x0, LBB0_14
LBB0_5:
	ldr	x8, [x0, w20, uxtw #3]
	cbz	x8, LBB0_9
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_8:
	mov	x0, x8
	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_9:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.10:
	ldr	x9, [x19, #8]
	cbnz	x9, LBB0_13
; %bb.11:
Lloh11:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_14
; %bb.12:
	str	x0, [x19, #8]
	ldr	x8, [x21]
	ldr	x0, [x8, x22, lsl #3]
LBB0_13:
	mov	w8, #0
	mov	w9, w20
	str	x19, [x0, x9, lsl #3]
	b	LBB0_8
LBB0_14:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_IRQ_CLIENTID_MAX,4,2    ; @AMDGPU_IRQ_CLIENTID_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AMDGPU_MAX_IRQ_SRC_ID,4,2      ; @AMDGPU_MAX_IRQ_SRC_ID
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
