	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IO_APIC_get_PCI_irq_vector     ## -- Begin function IO_APIC_get_PCI_irq_vector
	.p2align	4, 0x90
_IO_APIC_get_PCI_irq_vector:            ## @IO_APIC_get_PCI_irq_vector
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %ebx
	movq	_APIC_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_apic_printk
	movq	_mp_bus_not_pci@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_APIC_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_apic_printk
LBB0_2:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_3:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_mp_irq_entries@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_2
## %bb.5:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	movq	_mp_irqs@GOTPCREL(%rip), %r14
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax,%rbx), %r12d
	movq	_mp_bus_not_pci@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_14
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	movq	_mp_irq_entries@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_3
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	(%r14), %rax
	movq	%r13, %rbx
	shlq	$5, %rbx
	movq	_nr_ioapics@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, %r15d
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_mp_ioapics@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	8(%rax,%rbx), %rsi
	movq	_MP_APIC_ALL@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rsi, (%rdx,%r15,8)
	je	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpq	%rdi, %rsi
	je	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	incq	%r15
	cmpq	%r15, %rcx
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ecx, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r14), %rax
	cmpl	$0, 24(%rax,%rbx)
	jne	LBB0_7
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	-56(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	16(%rax,%rbx), %ecx
	shrl	$2, %ecx
	andl	$31, %ecx
	cmpl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	20(%rax,%rbx), %edx
	movl	%r13d, %edi
	movl	%r15d, %esi
	callq	_pin_2_irq
	movl	%eax, %r12d
	testl	%r15d, %r15d
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r12d, %edi
	callq	_IO_APIC_IRQ
	testq	%rax, %rax
	je	LBB0_7
LBB0_19:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r14), %rax
	movl	16(%rax,%rbx), %ecx
	andl	$3, %ecx
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jns	LBB0_7
## %bb.21:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	20(%rax,%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_irq_trigger
	movl	%r12d, %ebx
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_irq_polarity
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_set_io_apic_irq_attr
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
LBB0_23:
	movl	%r13d, %ecx
	shlq	$5, %rcx
	movl	20(%rax,%rcx), %r14d
	movl	%r13d, %edi
	callq	_irq_trigger
	movl	%r12d, %ebx
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_irq_polarity
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_set_io_apic_irq_attr
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_DEBUG,4,2                 ## @APIC_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"querying PCI -> IRQ mapping bus:%d, slot:%d, pin:%d.\n"

	.comm	_mp_bus_not_pci,4,2             ## @mp_bus_not_pci
	.comm	_APIC_VERBOSE,4,2               ## @APIC_VERBOSE
L_.str.1:                               ## @.str.1
	.asciz	"PCI BIOS passed nonexistent PCI bus %d!\n"

	.comm	_mp_irq_entries,4,2             ## @mp_irq_entries
	.comm	_mp_irqs,8,3                    ## @mp_irqs
	.comm	_nr_ioapics,4,2                 ## @nr_ioapics
	.comm	_mp_ioapics,8,3                 ## @mp_ioapics
	.comm	_MP_APIC_ALL,8,3                ## @MP_APIC_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IO_APIC_get_PCI_irq_vector     ; -- Begin function IO_APIC_get_PCI_irq_vector
	.p2align	2
_IO_APIC_get_PCI_irq_vector:            ; @IO_APIC_get_PCI_irq_vector
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _APIC_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	stp	x22, x23, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_apic_printk
Lloh5:
	adrp	x28, _mp_bus_not_pci@GOTPAGE
Lloh6:
	ldr	x28, [x28, _mp_bus_not_pci@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x20
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.1:
Lloh7:
	adrp	x8, _APIC_VERBOSE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _APIC_VERBOSE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_apic_printk
LBB0_2:
	mov	w24, #-1
LBB0_3:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
Lloh12:
	adrp	x19, _mp_irq_entries@GOTPAGE
Lloh13:
	ldr	x19, [x19, _mp_irq_entries@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.5:
	stp	x21, x23, [sp, #32]             ; 16-byte Folded Spill
	mov	x23, #0
	mov	w24, #-1
Lloh14:
	adrp	x27, _mp_irqs@GOTPAGE
Lloh15:
	ldr	x27, [x27, _mp_irqs@GOTPAGEOFF]
Lloh16:
	adrp	x21, _nr_ioapics@GOTPAGE
Lloh17:
	ldr	x21, [x21, _nr_ioapics@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.ge	LBB0_3
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x27]
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, #0
Lloh18:
	adrp	x10, _mp_ioapics@GOTPAGE
Lloh19:
	ldr	x10, [x10, _mp_ioapics@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	add	x11, x8, x23, lsl #5
	ldr	x11, [x11, #8]
Lloh21:
	adrp	x12, _MP_APIC_ALL@GOTPAGE
Lloh22:
	ldr	x12, [x12, _MP_APIC_ALL@GOTPAGEOFF]
Lloh23:
	ldr	x12, [x12]
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x10, x25, lsl #3]
	cmp	x13, x11
	ccmp	x11, x12, #4, ne
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x25, x25, #1
	cmp	x9, x25
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x9
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w25, #0
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	lsl	x9, x23, #5
	ldr	w26, [x8, x9]
	ldr	w1, [x28]
	mov	x0, x26
	bl	_test_bit
	cbnz	x0, LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x27]
	add	x9, x8, x23, lsl #5
	ldr	w10, [x9, #24]
	cmp	w10, #0
	ccmp	w26, w20, #0, eq
	b.ne	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x9, #16]
	ubfx	w9, w9, #2, #5
	cmp	w9, w22
	b.ne	LBB0_6
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, x23, lsl #5
	ldr	w2, [x8, #20]
	mov	x0, x23
	mov	x1, x25
	bl	_pin_2_irq
	mov	x26, x0
	cbnz	w25, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x26
	bl	_IO_APIC_IRQ
	cbz	x0, LBB0_6
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x27]
	add	x9, x8, x23, lsl #5
	ldr	w9, [x9, #16]
	and	w9, w9, #0x3
	ldr	x10, [sp, #40]                  ; 8-byte Folded Reload
	cmp	w9, w10
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	tbz	w24, #31, LBB0_6
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, x23, lsl #5
	ldr	w8, [x8, #20]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	mov	x0, x23
	bl	_irq_trigger
	mov	x24, x0
	mov	x0, x23
	bl	_irq_polarity
	mov	x4, x0
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	mov	x1, x25
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	mov	x3, x24
	bl	_set_io_apic_irq_attr
	mov	x24, x26
	b	LBB0_6
LBB0_21:
	and	x9, x23, #0xffffffff
	add	x8, x8, x9, lsl #5
	ldr	w20, [x8, #20]
	mov	x0, x23
	bl	_irq_trigger
	mov	x21, x0
	mov	x0, x23
	bl	_irq_polarity
	mov	x4, x0
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	mov	x1, x25
	mov	x2, x20
	mov	x3, x21
	bl	_set_io_apic_irq_attr
	mov	x24, x26
	b	LBB0_3
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_DEBUG,4,2                 ; @APIC_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"querying PCI -> IRQ mapping bus:%d, slot:%d, pin:%d.\n"

	.comm	_mp_bus_not_pci,4,2             ; @mp_bus_not_pci
	.comm	_APIC_VERBOSE,4,2               ; @APIC_VERBOSE
l_.str.1:                               ; @.str.1
	.asciz	"PCI BIOS passed nonexistent PCI bus %d!\n"

	.comm	_mp_irq_entries,4,2             ; @mp_irq_entries
	.comm	_mp_irqs,8,3                    ; @mp_irqs
	.comm	_nr_ioapics,4,2                 ; @nr_ioapics
	.comm	_mp_ioapics,8,3                 ; @mp_ioapics
	.comm	_MP_APIC_ALL,8,3                ; @MP_APIC_ALL
.subsections_via_symbols
