	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_and_reset_irq
_get_and_reset_irq:                     ## @get_and_reset_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	callq	_invalid_vm86_irq
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	_vm86_irqs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_current@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	_irqbits_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_irqbits@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %r14d
	movl	$1, %esi
	movl	%ebx, %ecx
	shll	%cl, %esi
	andl	%edx, %esi
	xorl	%esi, %edx
	movl	%edx, (%rax)
	testl	%esi, %esi
	je	LBB0_3
## %bb.4:
	movl	%ebx, %edi
	callq	_enable_irq
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movq	_irqbits_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vm86_irqs,8,3                  ## @vm86_irqs
	.comm	_current,8,3                    ## @current
	.comm	_irqbits_lock,4,2               ## @irqbits_lock
	.comm	_irqbits,4,2                    ## @irqbits
	.no_dead_strip	_get_and_reset_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_and_reset_irq
_get_and_reset_irq:                     ; @get_and_reset_irq
	.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
	mov	x19, x0
	bl	_invalid_vm86_irq
	cbnz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _vm86_irqs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vm86_irqs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w19, sxtw #3]
Lloh3:
	adrp	x9, _current@GOTPAGE
Lloh4:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x0, _irqbits_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _irqbits_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh8:
	adrp	x8, _irqbits@GOTPAGE
Lloh9:
	ldr	x8, [x8, _irqbits@GOTPAGEOFF]
	ldr	w9, [x8]
	mov	w10, #1
	lsl	w10, w10, w19
	ands	w10, w9, w10
	eor	w9, w10, w9
	str	w9, [x8]
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_enable_irq
	mov	w19, #1
	b	LBB0_7
LBB0_4:
	mov	w19, #0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w19, #0
LBB0_7:
Lloh10:
	adrp	x0, _irqbits_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _irqbits_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_vm86_irqs,8,3                  ; @vm86_irqs
	.comm	_current,8,3                    ; @current
	.comm	_irqbits_lock,4,2               ; @irqbits_lock
	.comm	_irqbits,4,2                    ; @irqbits
	.no_dead_strip	_get_and_reset_irq
.subsections_via_symbols
