	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv_wrport                      ## -- Begin function nv_wrport
	.p2align	4, 0x90
_nv_wrport:                             ## @nv_wrport
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	leal	-960(%rbx), %ecx
	cmpl	$26, %ecx
	ja	LBB0_9
## %bb.3:
	movl	$70254599, %edx                 ## imm = 0x4300007
	btl	%ecx, %edx
	jae	LBB0_4
## %bb.6:
	shll	$13, %r12d
	leal	(%rbx,%r12), %esi
	addl	$6295552, %esi                  ## imm = 0x601000
	jmp	LBB0_7
LBB0_1:
	addl	$6295552, %ebx                  ## imm = 0x601000
	movq	%r15, %rdi
	movl	%ebx, %esi
	jmp	LBB0_8
LBB0_4:
	movl	$53296, %edx                    ## imm = 0xD030
	btl	%ecx, %edx
	jae	LBB0_9
## %bb.5:
	movq	_NV_40@GOTPCREL(%rip), %rcx
	shll	$13, %r12d
	addl	$786432, %r12d                  ## imm = 0xC0000
	cmpq	(%rcx), %rax
	movl	$786432, %esi                   ## imm = 0xC0000
	cmovgel	%r12d, %esi
	addl	%ebx, %esi
LBB0_7:
	movq	%r15, %rdi
LBB0_8:
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv_wr08                        ## TAILCALL
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv_error                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
	.comm	_NV_40,8,3                      ## @NV_40
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown vga port 0x%04x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv_wrport                      ; -- Begin function nv_wrport
	.p2align	2
_nv_wrport:                             ; @nv_wrport
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_nv_device
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NV_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_50@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.1:
	sub	w9, w21, #960
	cmp	w9, #26
	b.hi	LBB0_8
; %bb.2:
	mov	w10, #1
	lsl	w9, w10, w9
	mov	w10, #7
	movk	w10, #1072, lsl #16
	tst	w9, w10
	b.eq	LBB0_5
; %bb.3:
	add	w8, w21, w22, lsl #13
	add	w1, w8, #1537, lsl #12          ; =6295552
	b	LBB0_7
LBB0_4:
	add	w1, w21, #1537, lsl #12         ; =6295552
	b	LBB0_7
LBB0_5:
	mov	w10, #53296
	tst	w9, w10
	b.eq	LBB0_8
; %bb.6:
Lloh3:
	adrp	x9, _NV_40@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NV_40@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsl	w10, w22, #13
	add	w10, w10, #192, lsl #12         ; =786432
	cmp	x8, x9
	mov	w8, #786432
	csel	w8, w8, w10, lt
	add	w1, w8, w21
LBB0_7:
	mov	x0, x20
	mov	x2, x19
	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
	b	_nv_wr08
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	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
	b	_nv_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_NV_40,8,3                      ; @NV_40
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown vga port 0x%04x\n"

.subsections_via_symbols
