	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_ioapic_set_irq             ## -- Begin function kvm_ioapic_set_irq
	.p2align	4, 0x90
_kvm_ioapic_set_irq:                    ## @kvm_ioapic_set_irq
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	$1, %r13d
	movl	$1, %r12d
	movl	%r15d, %ecx
	shll	%cl, %r12d
	addq	$8, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	testl	%r15d, %r15d
	js	LBB0_8
## %bb.1:
	movq	_IOAPIC_NUM_PINS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jle	LBB0_8
## %bb.2:
	movslq	%r12d, %r13
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %r12d
	leaq	(,%r12,4), %rdi
	addq	24(%rbx), %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	___kvm_irq_line_state
	movq	16(%rbx), %rcx
	leaq	(%r12,%r12,2), %rdx
	movl	(%rcx,%rdx,8), %r12d
	cmpl	%r12d, %eax
	jne	LBB0_4
## %bb.3:
	notq	%r13
	andq	%r13, (%rbx)
	movl	$1, %r13d
	jmp	LBB0_7
LBB0_4:
	movq	8(%rcx,%rdx,8), %rax
	movq	_IOAPIC_EDGE_TRIG@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	sete	%sil
	setne	%dil
	orq	(%rbx), %r13
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	sete	%al
	orb	%dil, %al
	cmpl	$0, 16(%rcx,%rdx,8)
	movq	%r13, (%rbx)
	setne	%cl
	cmpb	$1, %al
	jne	LBB0_6
## %bb.5:
	xorl	%r13d, %r13d
	orb	%cl, %sil
	jne	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ioapic_service
	movl	%eax, %r13d
LBB0_7:
	xorl	%edx, %edx
	testl	%r13d, %r13d
	sete	%dl
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_trace_kvm_ioapic_set_irq
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOAPIC_NUM_PINS,4,2            ## @IOAPIC_NUM_PINS
	.comm	_IOAPIC_EDGE_TRIG,8,3           ## @IOAPIC_EDGE_TRIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_ioapic_set_irq             ; -- Begin function kvm_ioapic_set_irq
	.p2align	2
_kvm_ioapic_set_irq:                    ; @kvm_ioapic_set_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x21, x0
	mov	w23, #1
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock
	tbnz	w20, #31, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _IOAPIC_NUM_PINS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOAPIC_NUM_PINS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_9
; %bb.2:
	lsl	w8, w23, w20
	sxtw	x23, w8
	ldr	x25, [x21]
	ldr	x8, [x21, #24]
	add	x0, x8, w20, uxtw #2
	mov	x1, x24
	mov	x2, x22
	bl	___kvm_irq_line_state
	ldr	x8, [x21, #16]
	mov	w9, #24
	umull	x9, w20, w9
	ldr	w22, [x8, x9]
	cmp	w0, w22
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x21]
	bic	x8, x8, x23
	str	x8, [x21]
	mov	w23, #1
	b	LBB0_8
LBB0_4:
	mov	w9, w20
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	w9, [x8, #16]
	ldr	x10, [x8, #8]
Lloh3:
	adrp	x8, _IOAPIC_EDGE_TRIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOAPIC_EDGE_TRIG@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x8]
	cmp	x10, x11
	ldr	x8, [x21]
	orr	x12, x8, x23
	ccmp	w9, #0, #0, ne
	cset	w8, ne
	cmp	x25, x12
	ccmp	x10, x11, #0, ne
	str	x12, [x21]
	b.eq	LBB0_7
; %bb.5:
	tbz	w8, #0, LBB0_7
; %bb.6:
	mov	w23, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_ioapic_service
	mov	x23, x0
LBB0_8:
	cmp	w23, #0
	cset	w2, eq
	mov	x0, x22
	mov	x1, x20
	bl	_trace_kvm_ioapic_set_irq
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IOAPIC_NUM_PINS,4,2            ; @IOAPIC_NUM_PINS
	.comm	_IOAPIC_EDGE_TRIG,8,3           ; @IOAPIC_EDGE_TRIG
.subsections_via_symbols
