	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioapic_set_extint              ## -- Begin function ioapic_set_extint
	.p2align	4, 0x90
_ioapic_set_extint:                     ## @ioapic_set_extint
	.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
	cmpq	%rsi, (%rdi)
	jbe	LBB0_1
## %bb.2:
	movq	%rsi, %rdx
	movq	16(%rdi), %rax
	leaq	(%rsi,%rsi,2), %rcx
	movq	(%rax,%rcx,8), %rbx
	movq	_IRQ_EXTINT@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%r14d, %r14d
	cmpq	%rsi, %rbx
	je	LBB0_6
## %bb.3:
	testq	%rbx, %rbx
	js	LBB0_1
## %bb.4:
	leaq	(%rax,%rcx,8), %r8
	movq	_APIC_BUS_UNKNOWN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	movl	%ebx, 20(%rax,%rcx,8)
	movq	%rsi, (%r8)
	movq	_enable_extint@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	cmpq	$0, (%rsi)
	sete	%bl
	movl	%ebx, 8(%rax,%rcx,8)
	movabsq	$4294967297, %rsi               ## imm = 0x100000001
	movq	%rsi, 12(%rax,%rcx,8)
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_EXTINT,8,3                 ## @IRQ_EXTINT
	.comm	_APIC_BUS_UNKNOWN,4,2           ## @APIC_BUS_UNKNOWN
	.comm	_enable_extint,8,3              ## @enable_extint
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioapic%u: Routing external 8259A's -> intpin %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioapic_set_extint              ; -- Begin function ioapic_set_extint
	.p2align	2
_ioapic_set_extint:                     ; @ioapic_set_extint
	.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
	ldr	x8, [x0]
	cmp	x8, x1
	b.ls	LBB0_6
; %bb.1:
	mov	x2, x1
	ldr	x8, [x0, #16]
	mov	w9, #24
	madd	x9, x1, x9, x8
	ldr	x11, [x9]
Lloh0:
	adrp	x10, _IRQ_EXTINT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _IRQ_EXTINT@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x11, x10
	b.eq	LBB0_5
; %bb.2:
	tbnz	x11, #63, LBB0_6
; %bb.3:
Lloh3:
	adrp	x11, _APIC_BUS_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x11, [x11, _APIC_BUS_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	mov	w12, #24
	madd	x8, x2, x12, x8
	str	w11, [x8, #20]
	str	x10, [x9]
Lloh6:
	adrp	x9, _enable_extint@GOTPAGE
Lloh7:
	ldr	x9, [x9, _enable_extint@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, #0
	cset	w9, eq
	str	w9, [x8, #8]
	movi.2s	v0, #1
	stur	d0, [x8, #12]
Lloh9:
	adrp	x8, _bootverbose@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w1, [x0, #8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_EXTINT,8,3                 ; @IRQ_EXTINT
	.comm	_APIC_BUS_UNKNOWN,4,2           ; @APIC_BUS_UNKNOWN
	.comm	_enable_extint,8,3              ; @enable_extint
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioapic%u: Routing external 8259A's -> intpin %d\n"

.subsections_via_symbols
