	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madt_find_interrupt
_madt_find_interrupt:                   ## @madt_find_interrupt
	.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	_IOAPIC_MAX_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	js	LBB0_9
## %bb.1:
	movl	%edi, %r10d
	movq	_ioapics@GOTPCREL(%rip), %r8
	movq	(%r8), %r9
	incq	%r14
	leaq	8(%r9), %rbx
	movl	$-1, %r11d
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r11d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-8(%rbx), %ecx
	cmpl	%r10d, %ecx
	jg	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %r11d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r11d, %rdi
	shlq	$4, %rdi
	cmpl	%ecx, (%r9,%rdi)
	jl	LBB0_6
	jmp	LBB0_7
LBB0_8:
	cmpl	$-1, %r11d
	je	LBB0_9
## %bb.10:
	movq	(%r8), %rax
	movslq	%r11d, %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	%rax, (%rsi)
	movq	(%r8), %rax
	movl	%r10d, %esi
	subl	(%rax,%rcx), %esi
	movl	%esi, (%rdx)
	xorl	%ebx, %ebx
	cmpl	$33, %esi
	jl	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rdi
	movl	%r10d, %edx
	callq	_printf
	jmp	LBB0_12
LBB0_9:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOAPIC_MAX_ID,4,2              ## @IOAPIC_MAX_ID
	.comm	_ioapics,8,3                    ## @ioapics
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: Found intpin of %u for vector %d\n"

	.no_dead_strip	_madt_find_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madt_find_interrupt
_madt_find_interrupt:                   ; @madt_find_interrupt
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x9, _IOAPIC_MAX_ID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IOAPIC_MAX_ID@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x9]
	tbnz	w12, #31, LBB0_12
; %bb.1:
	mov	x8, x0
	mov	x10, #0
Lloh3:
	adrp	x9, _ioapics@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ioapics@GOTPAGEOFF]
	ldr	x11, [x9]
	add	x13, x12, #1
	add	x14, x11, #8
	mov	w12, #-1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x12, x10
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	add	x14, x14, #16
	cmp	x13, x10
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x14]
	cbz	x15, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w15, [x14, #-8]
	cmp	w15, w8
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmn	w12, #1
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	sbfiz	x16, x12, #4, #32
	ldr	w16, [x11, x16]
	cmp	w16, w15
	b.lt	LBB0_2
	b	LBB0_3
LBB0_8:
	cmn	w12, #1
	b.eq	LBB0_12
; %bb.9:
	ldr	x10, [x9]
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	sbfiz	x11, x12, #4, #32
	add	x10, x10, x11
	ldr	x10, [x10, #8]
	str	x10, [x1]
	ldr	x9, [x9]
	ldr	w9, [x9, x11]
	sub	w1, w8, w9
	str	w1, [x2]
	cmp	w1, #33
	b.lt	LBB0_11
; %bb.10:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x8
	bl	_printf
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IOAPIC_MAX_ID,4,2              ; @IOAPIC_MAX_ID
	.comm	_ioapics,8,3                    ; @ioapics
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: Found intpin of %u for vector %d\n"

	.no_dead_strip	_madt_find_interrupt
.subsections_via_symbols
