	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioapic_set_bus                 ## -- Begin function ioapic_set_bus
	.p2align	4, 0x90
_ioapic_set_bus:                        ## @ioapic_set_bus
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	js	LBB0_2
## %bb.1:
	movq	_APIC_BUS_MAX@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	%rsi, %r14
	cmpq	%rsi, (%rdi)
	jbe	LBB0_2
## %bb.4:
	movq	16(%rdi), %rax
	movq	%r14, %rcx
	shlq	$4, %rcx
	cmpq	$0, (%rax,%rcx)
	js	LBB0_2
## %bb.5:
	xorl	%ebx, %ebx
	cmpl	%edx, 8(%rax,%rcx)
	je	LBB0_8
## %bb.6:
	addq	%rcx, %rax
	addq	$8, %rax
	movl	%edx, (%rax)
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movl	8(%rdi), %r15d
	movl	%edx, %edi
	callq	_ioapic_bus_string
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_printf
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_BUS_MAX,4,2               ## @APIC_BUS_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioapic%u: intpin %d bus %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioapic_set_bus                 ; -- Begin function ioapic_set_bus
	.p2align	2
_ioapic_set_bus:                        ; @ioapic_set_bus
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	tbnz	w2, #31, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _APIC_BUS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_BUS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.lt	LBB0_8
; %bb.2:
	mov	x19, x1
	ldr	x8, [x0]
	cmp	x8, x1
	b.ls	LBB0_8
; %bb.3:
	ldr	x8, [x0, #16]
	lsl	x9, x19, #4
	ldr	x9, [x8, x9]
	tbnz	x9, #63, LBB0_8
; %bb.4:
	add	x8, x8, x19, lsl #4
	ldr	w9, [x8, #8]!
	cmp	w9, w2
	b.eq	LBB0_7
; %bb.5:
	str	w2, [x8]
Lloh3:
	adrp	x8, _bootverbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w20, [x0, #8]
	mov	x0, x2
	bl	_ioapic_bus_string
	mov	x3, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_printf
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_BUS_MAX,4,2               ; @APIC_BUS_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioapic%u: intpin %d bus %s\n"

.subsections_via_symbols
