	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vga_mem_rd_handler
_vga_mem_rd_handler:                    ## @vga_mem_rd_handler
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	8(%rdx), %eax
	cmpq	$3, %rax
	ja	LBB0_2
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	addl	$-655360, %ebx                  ## imm = 0xFFF60000
	movq	_KB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shll	$7, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_KB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_8
LBB0_4:
	addl	$-655360, %ebx                  ## imm = 0xFFF60000
	movq	_KB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shll	$6, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%edi, %edi
	callq	_assert
LBB0_6:
	addl	$-753664, %ebx                  ## imm = 0xFFF48000
	movq	_KB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shll	$5, %eax
LBB0_7:
	decl	%eax
	andl	%ebx, %eax
	movl	%eax, %ebx
LBB0_8:
	movq	(%r14), %rax
	movslq	%ebx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%edx, 12(%r14)
	movl	%ecx, %edx
	shll	$6, %edx
	leal	(%rdx,%rbx), %esi
	movslq	%esi, %rsi
	movl	(%rax,%rsi,4), %esi
	movl	%esi, 16(%r14)
	movl	%ecx, %esi
	shll	$7, %esi
	addl	%ebx, %esi
	movslq	%esi, %rsi
	movl	(%rax,%rsi,4), %esi
	movl	%esi, 20(%r14)
	leal	(%rcx,%rcx,2), %ecx
	shll	$6, %ecx
	addl	%ebx, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%ecx, 24(%r14)
	cmpq	$0, 40(%r14)
	je	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	callq	_assert
	movq	_KB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	shll	$6, %edx
LBB0_10:
	movl	%ebx, %ecx
	andl	$1, %ecx
	movl	%ebx, %esi
	andl	$-2, %esi
	xorl	%edi, %edi
	cmpq	$0, 32(%r14)
	cmovnel	%ecx, %edi
	cmovel	%ebx, %esi
	orl	28(%r14), %edi
	imull	%edx, %edi
	addl	%esi, %edi
	movslq	%edi, %rcx
	movl	(%rax,%rcx,4), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_KB,4,2                         ## @KB
	.no_dead_strip	_vga_mem_rd_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vga_mem_rd_handler
_vga_mem_rd_handler:                    ; @vga_mem_rd_handler
	.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, x2
	mov	x20, x1
	ldr	w8, [x2, #8]
Lloh0:
	adrp	x21, _KB@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KB@GOTPAGEOFF]
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	sub	w9, w20, #160, lsl #12          ; =655360
	ldr	w8, [x21]
	lsl	w10, w8, #7
	b	LBB0_7
LBB0_3:
	ldr	w8, [x21]
	b	LBB0_8
LBB0_4:
	sub	w9, w20, #160, lsl #12          ; =655360
	ldr	w8, [x21]
	lsl	w10, w8, #6
	b	LBB0_7
LBB0_5:
	mov	w0, #0
	bl	_assert
LBB0_6:
	sub	w8, w20, #160, lsl #12          ; =655360
	sub	w9, w8, #24, lsl #12            ; =98304
	ldr	w8, [x21]
	lsl	w10, w8, #5
LBB0_7:
	sub	w10, w10, #1
	and	w20, w10, w9
LBB0_8:
	ldr	x9, [x19]
	ldr	w10, [x9, w20, sxtw #2]
	str	w10, [x19, #12]
	lsl	w10, w8, #6
	add	w11, w10, w20
	ldr	w11, [x9, w11, sxtw #2]
	str	w11, [x19, #16]
	add	w11, w20, w8, lsl #7
	ldr	w11, [x9, w11, sxtw #2]
	str	w11, [x19, #20]
	mov	w11, #192
	madd	w8, w8, w11, w20
	ldr	w8, [x9, w8, sxtw #2]
	str	w8, [x19, #24]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	w0, #0
	bl	_assert
	ldr	w8, [x21]
	ldr	x9, [x19]
	lsl	w10, w8, #6
LBB0_10:
	ldr	w8, [x19, #28]
	ldr	x11, [x19, #32]
	and	w12, w20, #0x1
	and	w13, w20, #0xfffffffe
	cmp	x11, #0
	csel	w11, wzr, w12, eq
	orr	w8, w11, w8
	csel	w11, w20, w13, eq
	madd	w8, w10, w8, w11
	ldr	w0, [x9, w8, sxtw #2]
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_KB,4,2                         ; @KB
	.no_dead_strip	_vga_mem_rd_handler
.subsections_via_symbols
