	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dos_hookirq
_dos_hookirq:                           ## @dos_hookirq
	.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
	movq	_NINTR@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jbe	LBB0_3
## %bb.1:
	movl	%edi, %r14d
	movq	_intrupts@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%edi, %eax
	imulq	$56, %rax, %r15
	cmpl	$0, (%r13,%r15)
	je	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_4:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leal	8(%r14), %edi
	movq	_isrs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r12
	leaq	(%r15,%r13), %rsi
	addq	$52, %rsi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	__go32_dpmi_get_real_mode_interrupt_vector
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	__go32_my_cs
	leaq	(%r15,%r13), %rcx
	addq	$32, %rcx
	movq	%rax, 40(%r13,%r15)
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, 32(%r13,%r15)
	movq	%rcx, %r12
	leaq	(%r15,%r13), %rsi
	addq	$48, %rsi
	movq	%rcx, %rdi
	callq	__go32_dpmi_allocate_real_mode_callback_iret
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	callq	__go32_dpmi_set_real_mode_interrupt_vector
	testq	%rax, %rax
	jne	LBB0_3
## %bb.8:
	leaq	(%r15,%r13), %rsi
	addq	$24, %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	__go32_dpmi_get_protected_mode_interrupt_vector
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	__go32_my_cs
	leaq	(%r15,%r13), %r12
	addq	$8, %r12
	movq	%rax, 16(%r13,%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r13,%r15)
	movq	%r12, %rdi
	callq	__go32_dpmi_allocate_iret_wrapper
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	callq	__go32_dpmi_set_protected_mode_interrupt_vector
	testq	%rax, %rax
	jne	LBB0_4
## %bb.9:
	addq	%r15, %r13
	xorl	%eax, %eax
	callq	_disable
	movq	_ICU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_inportb
	btrl	%r14d, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outportb
	xorl	%eax, %eax
	callq	_enable
	movl	$1, (%r13)
	movq	%r13, %rbx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_NINTR,4,2                      ## @NINTR
	.comm	_intrupts,8,3                   ## @intrupts
	.comm	_isrs,8,3                       ## @isrs
	.comm	_ICU_MASK,4,2                   ## @ICU_MASK
	.no_dead_strip	_dos_hookirq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dos_hookirq
_dos_hookirq:                           ; @dos_hookirq
	.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
Lloh0:
	adrp	x8, _NINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NINTR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ls	LBB0_5
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _intrupts@GOTPAGE
Lloh4:
	ldr	x8, [x8, _intrupts@GOTPAGEOFF]
Lloh5:
	ldr	x24, [x8]
	mov	w8, #56
	umaddl	x19, w0, w8, x24
	ldr	w8, [x19]
	cbnz	w8, LBB0_5
; %bb.2:
	mov	w25, w20
	add	w21, w20, #8
Lloh6:
	adrp	x8, _isrs@GOTPAGE
Lloh7:
	ldr	x8, [x8, _isrs@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x23, [x8, x25, lsl #3]
	mov	w8, #56
	madd	x22, x25, x8, x24
	add	x1, x22, #52
	mov	x0, x21
	bl	__go32_dpmi_get_real_mode_interrupt_vector
	bl	__go32_my_cs
	stp	x23, x0, [x22, #32]!
	add	x1, x22, #16
	mov	x0, x22
	bl	__go32_dpmi_allocate_real_mode_callback_iret
	cbnz	x0, LBB0_5
; %bb.3:
	mov	x0, x21
	mov	x1, x22
	bl	__go32_dpmi_set_real_mode_interrupt_vector
	cbnz	x0, LBB0_5
; %bb.4:
	mov	w8, #56
	madd	x22, x25, x8, x24
	add	x1, x22, #24
	mov	x0, x21
	bl	__go32_dpmi_get_protected_mode_interrupt_vector
	bl	__go32_my_cs
	stp	x23, x0, [x22, #8]!
	mov	x0, x22
	bl	__go32_dpmi_allocate_iret_wrapper
	mov	x0, x21
	mov	x1, x22
	bl	__go32_dpmi_set_protected_mode_interrupt_vector
	cbz	x0, LBB0_7
LBB0_5:
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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
LBB0_7:
	bl	_disable
Lloh9:
	adrp	x8, _ICU_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICU_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_inportb
	mov	w22, #1
	lsl	w8, w22, w20
	bic	w1, w0, w8
	mov	x0, x21
	bl	_outportb
	bl	_enable
	str	w22, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NINTR,4,2                      ; @NINTR
	.comm	_intrupts,8,3                   ; @intrupts
	.comm	_isrs,8,3                       ; @isrs
	.comm	_ICU_MASK,4,2                   ; @ICU_MASK
	.no_dead_strip	_dos_hookirq
.subsections_via_symbols
