	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioapic_write_indirect
_ioapic_write_indirect:                 ## @ioapic_write_indirect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ebx
	leal	-128(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_10
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	cmpl	$130, %ebx
	jne	LBB0_3
## %bb.2:
	shrl	$24, %r15d
	andl	$15, %r15d
	movl	%r15d, 4(%r14)
	jmp	LBB0_10
LBB0_3:
	addl	$-16, %ebx
	sarl	%ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_ioapic_debug
	movq	_IOAPIC_NUM_PINS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_10
## %bb.4:
	movq	16(%r14), %r12
	movl	%ebx, %eax
	leaq	(%rax,%rax,2), %r13
	leaq	(%r12,%r13,4), %rax
	movl	(%r12,%r13,4), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testb	$1, (%r14)
	jne	LBB0_6
## %bb.5:
	movl	%r15d, (%rax)
	movl	$0, 8(%r12,%r13,4)
LBB0_6:
	movq	%r14, %rdi
	movq	%rax, %r15
	callq	_update_handled_vectors
	movl	(%r15), %ecx
	cmpl	%ecx, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_8
## %bb.7:
	movl	12(%r14), %edi
	movq	_KVM_IRQCHIP_IOAPIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_kvm_fire_mask_notifiers
LBB0_8:
	movl	4(%r12,%r13,4), %eax
	movq	_IOAPIC_LEVEL_TRIG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.9:
	movl	8(%r14), %eax
	btl	%ebx, %eax
	jae	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ioapic_service                 ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"change redir index %x val %x\n"

	.comm	_IOAPIC_NUM_PINS,4,2            ## @IOAPIC_NUM_PINS
	.comm	_KVM_IRQCHIP_IOAPIC,4,2         ## @KVM_IRQCHIP_IOAPIC
	.comm	_IOAPIC_LEVEL_TRIG,4,2          ## @IOAPIC_LEVEL_TRIG
	.no_dead_strip	_ioapic_write_indirect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioapic_write_indirect
_ioapic_write_indirect:                 ; @ioapic_write_indirect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_11
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	cmp	w8, #130
	b.ne	LBB0_3
; %bb.2:
	ubfx	w8, w21, #24, #4
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_3:
	sub	w8, w8, #16
	asr	w20, w8, #1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_ioapic_debug
Lloh2:
	adrp	x8, _IOAPIC_NUM_PINS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IOAPIC_NUM_PINS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w20, w8
	b.hs	LBB0_11
; %bb.4:
	ldr	x22, [x19, #16]
	mov	w8, #12
	umaddl	x23, w20, w8, x22
	ldr	w24, [x23]
	ldrb	w8, [x19]
	tbnz	w8, #0, LBB0_6
; %bb.5:
	str	w21, [x23]
	mov	w8, #12
	madd	x8, x20, x8, x22
	str	wzr, [x8, #8]
LBB0_6:
	mov	x0, x19
	bl	_update_handled_vectors
	ldr	w3, [x23]
	cmp	w24, w3
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19, #12]
Lloh5:
	adrp	x8, _KVM_IRQCHIP_IOAPIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KVM_IRQCHIP_IOAPIC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_kvm_fire_mask_notifiers
LBB0_8:
	mov	w8, #12
	madd	x8, x20, x8, x22
	ldr	w8, [x8, #4]
Lloh8:
	adrp	x9, _IOAPIC_LEVEL_TRIG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IOAPIC_LEVEL_TRIG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
	ldr	w8, [x19, #8]
	lsr	w8, w8, w20
	tbz	w8, #0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ioapic_service
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"change redir index %x val %x\n"

	.comm	_IOAPIC_NUM_PINS,4,2            ; @IOAPIC_NUM_PINS
	.comm	_KVM_IRQCHIP_IOAPIC,4,2         ; @KVM_IRQCHIP_IOAPIC
	.comm	_IOAPIC_LEVEL_TRIG,4,2          ; @IOAPIC_LEVEL_TRIG
	.no_dead_strip	_ioapic_write_indirect
.subsections_via_symbols
