	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dos_unhookirq
_dos_unhookirq:                         ## @dos_unhookirq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_intrupts@GOTPCREL(%rip), %rax
	movq	%rdi, %rdx
	subq	(%rax), %rdx
	sarq	$3, %rdx
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rdx, %rcx
	leal	8(%rcx), %r14d
	movl	$1, %ebx
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %ebx
	xorl	%eax, %eax
	callq	_disable
	movq	_ICU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_inportb
	movq	_icu_oldmask@GOTPCREL(%rip), %rcx
	andb	(%rcx), %bl
	orb	%al, %bl
	movzbl	%bl, %esi
	movl	%r12d, %edi
	callq	_outportb
	xorl	%eax, %eax
	callq	_enable
	leaq	20(%r15), %rsi
	movl	%r14d, %edi
	callq	__go32_dpmi_set_real_mode_interrupt_vector
	leaq	16(%r15), %rdi
	callq	__go32_dpmi_free_real_mode_callback
	leaq	12(%r15), %rsi
	movl	%r14d, %edi
	callq	__go32_dpmi_set_protected_mode_interrupt_vector
	leaq	8(%r15), %rdi
	callq	__go32_dpmi_free_iret_wrapper
	movq	$0, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_intrupts,8,3                   ## @intrupts
	.comm	_ICU_MASK,4,2                   ## @ICU_MASK
	.comm	_icu_oldmask,1,0                ## @icu_oldmask
	.no_dead_strip	_dos_unhookirq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dos_unhookirq
_dos_unhookirq:                         ; @dos_unhookirq
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _intrupts@GOTPAGE
Lloh1:
	ldr	x8, [x8, _intrupts@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x8, x0, x8
	asr	x8, x8, #3
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	mul	x8, x8, x9
	add	w20, w8, #8
	mov	w9, #1
	lsl	w22, w9, w8
	bl	_disable
Lloh3:
	adrp	x8, _ICU_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ICU_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_inportb
Lloh6:
	adrp	x8, _icu_oldmask@GOTPAGE
Lloh7:
	ldr	x8, [x8, _icu_oldmask@GOTPAGEOFF]
	ldrb	w8, [x8]
	and	w8, w22, w8
	orr	w1, w8, w0
	mov	x0, x21
	bl	_outportb
	bl	_enable
	add	x1, x19, #20
	mov	x0, x20
	bl	__go32_dpmi_set_real_mode_interrupt_vector
	add	x0, x19, #16
	bl	__go32_dpmi_free_real_mode_callback
	add	x1, x19, #12
	mov	x0, x20
	bl	__go32_dpmi_set_protected_mode_interrupt_vector
	add	x0, x19, #8
	bl	__go32_dpmi_free_iret_wrapper
	str	xzr, [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
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_intrupts,8,3                   ; @intrupts
	.comm	_ICU_MASK,4,2                   ; @ICU_MASK
	.comm	_icu_oldmask,1,0                ; @icu_oldmask
	.no_dead_strip	_dos_unhookirq
.subsections_via_symbols
