	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vga_setup                      ## -- Begin function vga_setup
	.p2align	4, 0x90
_vga_setup:                             ## @vga_setup
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	leaq	-48(%rbp), %r14
	movq	%rsi, %rdi
	movl	%ecx, %esi
	movl	%r8d, %edx
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r9d, %ecx
	xorl	%r8d, %r8d
	movq	%r14, %r9
	callq	_pci_read_bar
	movq	%r14, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_17
## %bb.1:
	movl	%eax, %ecx
	andl	$1, %ecx
	jne	LBB0_17
## %bb.2:
	movq	%rbx, %r14
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	$1, %r8d
	movq	%rbx, %r9
	callq	_pci_read_bar
	movq	%rbx, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_16
## %bb.3:
	movl	%eax, %ecx
	andl	$1, %ecx
	movq	%r14, %rbx
	jne	LBB0_17
## %bb.4:
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	$2, %r8d
	movq	%rbx, %r9
	callq	_pci_read_bar
	movq	%rbx, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_16
## %bb.5:
	movl	%eax, %ecx
	andl	$1, %ecx
	movq	%r14, %rbx
	jne	LBB0_17
## %bb.6:
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	$3, %r8d
	movq	%rbx, %r9
	callq	_pci_read_bar
	movq	%rbx, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_16
## %bb.7:
	movl	%eax, %ecx
	andl	$1, %ecx
	movq	%r14, %rbx
	jne	LBB0_17
## %bb.8:
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	$4, %r8d
	movq	%rbx, %r9
	callq	_pci_read_bar
	movq	%rbx, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_16
## %bb.9:
	movl	%eax, %ecx
	andl	$1, %ecx
	movq	%r14, %rbx
	jne	LBB0_17
## %bb.10:
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	$5, %r8d
	movq	%rbx, %r9
	callq	_pci_read_bar
	movq	%rbx, %rdi
	callq	_print_bar
	movl	-48(%rbp), %eax
	cmpl	$65536, %eax                    ## imm = 0x10000
	jg	LBB0_16
## %bb.11:
	movl	%eax, %ecx
	andl	$1, %ecx
	movq	%r14, %rbx
	je	LBB0_18
	jmp	LBB0_17
LBB0_16:
	movq	%r14, %rbx
LBB0_17:
	addl	$-1073741824, %eax              ## imm = 0xC0000000
	andl	$-2048, %eax                    ## imm = 0xF800
	movq	%rax, (%rbx)
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vga_setup                      ; -- Begin function vga_setup
	.p2align	2
_vga_setup:                             ; @vga_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x19, x2
	mov	x23, x1
	add	x5, sp, #8
	mov	x0, x1
	mov	x1, x3
	mov	x2, x4
	mov	x3, x20
	mov	w4, #0
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	and	w9, w8, #0x1
	cmp	w8, #16, lsl #12                ; =65536
	ccmp	w9, #0, #0, le
	b.ne	LBB0_2
; %bb.1:
	mov	w24, #65537
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #1
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	and	w9, w8, #0x1
	cmp	w8, w24
	ccmp	w9, #0, #0, lt
	b.eq	LBB0_4
LBB0_2:
	mov	w9, #-1073741824
	add	w8, w8, w9
	and	w8, w8, #0xfffff800
	str	x8, [x19]
LBB0_3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #2
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	cmp	w8, w24
	b.ge	LBB0_2
; %bb.5:
	tbnz	w8, #0, LBB0_2
; %bb.6:
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #3
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	cmp	w8, w24
	b.ge	LBB0_2
; %bb.7:
	tbnz	w8, #0, LBB0_2
; %bb.8:
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #4
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	cmp	w8, w24
	b.ge	LBB0_2
; %bb.9:
	tbnz	w8, #0, LBB0_2
; %bb.10:
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #5
	bl	_pci_read_bar
	add	x0, sp, #8
	bl	_print_bar
	ldr	w8, [sp, #8]
	cmp	w8, w24
	b.ge	LBB0_2
; %bb.11:
	tbz	w8, #0, LBB0_3
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
