	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_capability
_get_capability:                        ## @get_capability
	.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	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_HINIC_IS_PF
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	(%r12), %edi
	callq	_HINIC_IS_PPF
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	(%r14), %rax
	movq	_INTR_MSIX_TYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movl	(%r12), %edi
	callq	_HINIC_HWIF_NUM_AEQS
	movl	%eax, %r15d
	movl	(%r12), %edi
	callq	_HINIC_HWIF_NUM_CEQS
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_HINIC_HWIF_NUM_IRQS
	addl	%r15d, %ebx
	subl	%ebx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movq	_HINIC_Q_CTXT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovgel	%eax, %ecx
	movl	%ecx, 4(%r12)
	movl	8(%r14), %eax
	leal	1(%rax), %edx
	movl	%edx, 8(%r12)
	cmpl	12(%r14), %eax
	jne	LBB0_5
## %bb.7:
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	jle	LBB0_9
## %bb.8:
	movl	%edx, 4(%r12)
	jmp	LBB0_9
LBB0_5:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INTR_MSIX_TYPE,8,3             ## @INTR_MSIX_TYPE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_HINIC_Q_CTXT_MAX,4,2           ## @HINIC_Q_CTXT_MAX
	.no_dead_strip	_get_capability
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_capability
_get_capability:                        ; @get_capability
	.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, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_HINIC_IS_PF
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_HINIC_IS_PPF
	cbz	w0, LBB0_9
LBB0_2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _INTR_MSIX_TYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INTR_MSIX_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	w0, [x19]
	bl	_HINIC_HWIF_NUM_AEQS
	mov	x21, x0
	ldr	w0, [x19]
	bl	_HINIC_HWIF_NUM_CEQS
	mov	x22, x0
	ldr	w0, [x19]
	bl	_HINIC_HWIF_NUM_IRQS
	add	w8, w22, w21
	sub	w8, w0, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
Lloh3:
	adrp	x9, _HINIC_Q_CTXT_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HINIC_Q_CTXT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x19, #4]
	ldp	w10, w11, [x20, #8]
	add	w9, w10, #1
	str	w9, [x19, #8]
	cmp	w10, w11
	b.ne	LBB0_6
; %bb.4:
	cmp	w8, w9
	b.le	LBB0_10
; %bb.5:
	mov	w0, #0
	str	w9, [x19, #4]
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
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
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_10:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INTR_MSIX_TYPE,8,3             ; @INTR_MSIX_TYPE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_HINIC_Q_CTXT_MAX,4,2           ; @HINIC_Q_CTXT_MAX
	.no_dead_strip	_get_capability
.subsections_via_symbols
