	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enable_a20                     ## -- Begin function enable_a20
	.p2align	4, 0x90
_enable_a20:                            ## @enable_a20
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_A20_ENABLE_LOOPS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	incl	%r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_enable_a20_fast
	xorl	%eax, %eax
	callq	_a20_test_long
	testq	%rax, %rax
	jne	LBB0_9
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r15d
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_a20_test_short
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_enable_a20_bios
	xorl	%eax, %eax
	callq	_a20_test_short
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_empty_8042
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_a20_test_short
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_enable_a20_kbc
	xorl	%eax, %eax
	callq	_a20_test_long
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_9
LBB0_2:
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A20_ENABLE_LOOPS,4,2           ## @A20_ENABLE_LOOPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enable_a20                     ; -- Begin function enable_a20
	.p2align	2
_enable_a20:                            ; @enable_a20
	.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
Lloh0:
	adrp	x8, _A20_ENABLE_LOOPS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _A20_ENABLE_LOOPS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w20, w8, #1
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_enable_a20_fast
	bl	_a20_test_long
	cbnz	x0, LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	subs	w20, w20, #1
	b.eq	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_a20_test_short
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_enable_a20_bios
	bl	_a20_test_short
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_empty_8042
	mov	x19, x0
	bl	_a20_test_short
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w19, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_enable_a20_kbc
	bl	_a20_test_long
	cbz	x0, LBB0_1
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_A20_ENABLE_LOOPS,4,2           ; @A20_ENABLE_LOOPS
.subsections_via_symbols
