	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_vm86_irq_handling
_do_vm86_irq_handling:                  ## @do_vm86_irq_handling
	.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
                                        ## kill: def $edi killed $edi def $rdi
	addl	$-128, %edi
	cmpl	$3, %edi
	ja	LBB0_15
## %bb.1:
	movl	%esi, %r14d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_4:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%r14d, %r15d
	sarl	$8, %r15d
	movq	_ALLOWED_SIGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%r15d, %eax
	jae	LBB0_5
## %bb.7:
	movzbl	%r14b, %r14d
	movl	%r14d, %edi
	callq	_invalid_vm86_irq
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:
	movq	_vm86_irqs@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	%r14d, %r12d
	cmpl	$0, 4(%rax,%r12,8)
	jne	LBB0_5
## %bb.9:
	movq	_VM86_IRQNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_irq_handler@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.10:
	movq	(%r13), %rax
	movl	%r15d, (%rax,%r12,8)
	movq	_current@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax,%r12,8)
	movl	%r14d, %ebx
	jmp	LBB0_17
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_3:
	movq	_irqbits@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_2:
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_get_and_reset_irq              ## TAILCALL
LBB0_11:
	movl	%r14d, %edi
	callq	_invalid_vm86_irq
	testl	%eax, %eax
	je	LBB0_12
LBB0_5:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_vm86_irqs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movl	4(%rax,%rcx,8), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	_current@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.14:
	movl	%r14d, %edi
	callq	_free_vm86_irq
	jmp	LBB0_17
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_irqbits,4,2                    ## @irqbits
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_ALLOWED_SIGS,4,2               ## @ALLOWED_SIGS
	.comm	_vm86_irqs,8,3                  ## @vm86_irqs
	.comm	_irq_handler,4,2                ## @irq_handler
	.comm	_VM86_IRQNAME,4,2               ## @VM86_IRQNAME
	.comm	_current,4,2                    ## @current
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_do_vm86_irq_handling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_vm86_irq_handling
_do_vm86_irq_handling:                  ; @do_vm86_irq_handling
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_8
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_12
; %bb.3:
	asr	w20, w19, #8
Lloh5:
	adrp	x8, _ALLOWED_SIGS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ALLOWED_SIGS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsr	w8, w8, w20
	tbz	w8, #0, LBB0_12
; %bb.4:
	and	w19, w19, #0xff
	mov	x0, x19
	bl	_invalid_vm86_irq
	cbnz	w0, LBB0_12
; %bb.5:
Lloh8:
	adrp	x21, _vm86_irqs@GOTPAGE
Lloh9:
	ldr	x21, [x21, _vm86_irqs@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x8, x8, w19, uxtw #3
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_12
; %bb.6:
Lloh10:
	adrp	x8, _VM86_IRQNAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VM86_IRQNAME@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x1, _irq_handler@GOTPAGE
Lloh14:
	ldr	x1, [x1, _irq_handler@GOTPAGEOFF]
	mov	x0, x19
	mov	w2, #0
	mov	x4, #0
	bl	_request_irq
	cbnz	w0, LBB0_14
; %bb.7:
	ldr	x8, [x21]
	add	x8, x8, x19, lsl #3
	str	w20, [x8]
Lloh15:
	adrp	x9, _current@GOTPAGE
Lloh16:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [x8, #4]
	mov	x0, x19
	b	LBB0_14
LBB0_8:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh20:
	adrp	x8, _irqbits@GOTPAGE
Lloh21:
	ldr	x8, [x8, _irqbits@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_get_and_reset_irq
LBB0_11:
	mov	x0, x19
	bl	_invalid_vm86_irq
	cbz	w0, LBB0_15
LBB0_12:
Lloh23:
	adrp	x8, _EPERM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh25:
	adrp	x8, _vm86_irqs@GOTPAGE
Lloh26:
	ldr	x8, [x8, _vm86_irqs@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	add	x8, x8, w19, sxtw #3
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_18
; %bb.16:
Lloh28:
	adrp	x9, _current@GOTPAGE
Lloh29:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.17:
	mov	x0, x19
	bl	_free_vm86_irq
LBB0_18:
	mov	w0, #0
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_irqbits,4,2                    ; @irqbits
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_ALLOWED_SIGS,4,2               ; @ALLOWED_SIGS
	.comm	_vm86_irqs,8,3                  ; @vm86_irqs
	.comm	_irq_handler,4,2                ; @irq_handler
	.comm	_VM86_IRQNAME,4,2               ; @VM86_IRQNAME
	.comm	_current,4,2                    ; @current
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_do_vm86_irq_handling
.subsections_via_symbols
