	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uv_set_vga_state               ## -- Begin function uv_set_vga_state
	.p2align	4, 0x90
_uv_set_vga_state:                      ## @uv_set_vga_state
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_PR_DEVEL
	movq	_PCI_VGA_STATE_CHANGE_BRIDGE@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_PCI_COMMAND_IO@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_3
## %bb.2:
	movq	8(%r15), %rdi
	callq	_pci_domain_nr
	movl	%eax, %r13d
	movq	8(%r15), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_uv_bios_set_legacy_vga_target
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_PR_DEVEL
LBB0_3:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"devfn %x decode %d cmd %x flags %d\n"

	.comm	_PCI_VGA_STATE_CHANGE_BRIDGE,4,2 ## @PCI_VGA_STATE_CHANGE_BRIDGE
	.comm	_PCI_COMMAND_IO,4,2             ## @PCI_COMMAND_IO
L_.str.1:                               ## @.str.1
	.asciz	"vga decode %d %x:%x, rc: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uv_set_vga_state               ; -- Begin function uv_set_vga_state
	.p2align	2
_uv_set_vga_state:                      ; @uv_set_vga_state
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	mov	x4, x22
	bl	_PR_DEVEL
Lloh2:
	adrp	x8, _PCI_VGA_STATE_CHANGE_BRIDGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_VGA_STATE_CHANGE_BRIDGE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _PCI_COMMAND_IO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_COMMAND_IO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
	ldr	x0, [x20, #8]
	bl	_pci_domain_nr
	mov	x21, x0
	ldr	x8, [x20, #8]
	ldr	w22, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_uv_bios_set_legacy_vga_target
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x20
	bl	_PR_DEVEL
	b	LBB0_4
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"devfn %x decode %d cmd %x flags %d\n"

	.comm	_PCI_VGA_STATE_CHANGE_BRIDGE,4,2 ; @PCI_VGA_STATE_CHANGE_BRIDGE
	.comm	_PCI_COMMAND_IO,4,2             ; @PCI_COMMAND_IO
l_.str.1:                               ; @.str.1
	.asciz	"vga decode %d %x:%x, rc: %d\n"

.subsections_via_symbols
