	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sci_inta_alloc_event
_ti_sci_inta_alloc_event:               ## @ti_sci_inta_alloc_event
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movl	%edx, %edi
	callq	_HWIRQ_TO_DEVID
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	callq	_HWIRQ_TO_IRQID
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rbx
	leaq	(,%r13,2), %r15
	addq	%r13, %r15
	movl	%r12d, 16(%rbx,%r15,8)
	movq	%r13, (%rbx,%r15,8)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	callq	_ti_sci_get_free_resource
	movq	%rax, 8(%rbx,%r15,8)
	movq	_TI_SCI_RESOURCE_NULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, %r14
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	movq	16(%rdx), %rdi
	movl	(%rcx), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %r8d
	movq	%r13, (%rsp)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %r9
	callq	*(%rdi)
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	leaq	(%r14,%r15,8), %rax
	addq	$8, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movq	(%rax), %rsi
	callq	_ti_sci_release_resource
LBB0_4:
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	leaq	(%r14,%r15,8), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TI_SCI_RESOURCE_NULL,8,3       ## @TI_SCI_RESOURCE_NULL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ti_sci_inta_alloc_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sci_inta_alloc_event
_ti_sci_inta_alloc_event:               ; @ti_sci_inta_alloc_event
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x25, [x8]
	mov	x0, x2
	bl	_HWIRQ_TO_DEVID
	mov	x22, x0
	mov	x0, x24
	bl	_HWIRQ_TO_IRQID
	mov	x23, x0
	ldr	x8, [x20, #8]
	mov	w9, #24
	madd	x21, x19, x9, x8
	str	w24, [x21, #16]
	str	x19, [x21]
	ldr	w0, [x25]
	bl	_ti_sci_get_free_resource
	mov	x24, x21
	str	x0, [x24, #8]!
Lloh0:
	adrp	x8, _TI_SCI_RESOURCE_NULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TI_SCI_RESOURCE_NULL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_4
LBB0_2:
	mov	x5, x0
	ldp	x8, x0, [x25, #8]
	ldr	x9, [x0]
	ldr	w3, [x8]
	ldr	w4, [x20]
	mov	x1, x22
	mov	x2, x23
	mov	x6, x19
	blr	x9
	cbz	w0, LBB0_5
; %bb.3:
	mov	x19, x0
	ldr	w0, [x25]
	ldr	x1, [x24]
	bl	_ti_sci_release_resource
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TI_SCI_RESOURCE_NULL,8,3       ; @TI_SCI_RESOURCE_NULL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ti_sci_inta_alloc_event
.subsections_via_symbols
