	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_rdport                    ## -- Begin function nvkm_rdport
	.p2align	4, 0x90
_nvkm_rdport:                           ## @nvkm_rdport
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $esi killed $esi def $rsi
	movq	(%rdi), %r8
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r8
	jge	LBB0_1
## %bb.2:
	leal	-960(%rdx), %ecx
	cmpl	$26, %ecx
	ja	LBB0_7
## %bb.3:
	movl	$70254599, %eax                 ## imm = 0x4300007
	btl	%ecx, %eax
	jae	LBB0_4
## %bb.8:
	shll	$13, %esi
	addl	%esi, %edx
	addl	$6295552, %edx                  ## imm = 0x601000
	jmp	LBB0_6
LBB0_1:
	addl	$6295552, %edx                  ## imm = 0x601000
	jmp	LBB0_6
LBB0_4:
	movl	$53296, %eax                    ## imm = 0xD030
	btl	%ecx, %eax
	jae	LBB0_7
## %bb.5:
	movq	_NV_40@GOTPCREL(%rip), %rax
	shll	$13, %esi
	addl	$786432, %esi                   ## imm = 0xC0000
	cmpq	(%rax), %r8
	movl	$786432, %eax                   ## imm = 0xC0000
	cmovgel	%esi, %eax
	addl	%edx, %eax
	movl	%eax, %edx
LBB0_6:
	movl	%edx, %esi
	popq	%rbp
	jmp	_nvkm_rd08                      ## TAILCALL
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
	.comm	_NV_40,8,3                      ## @NV_40
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_rdport                    ; -- Begin function nvkm_rdport
	.p2align	2
_nvkm_rdport:                           ; @nvkm_rdport
	.cfi_startproc
; %bb.0:
	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, w2, #960
	cmp	w9, #26
	b.hi	LBB0_7
; %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, w2, w1, lsl #13
	add	w1, w8, #1537, lsl #12          ; =6295552
	b	_nvkm_rd08
LBB0_4:
	add	w1, w2, #1537, lsl #12          ; =6295552
	b	_nvkm_rd08
LBB0_5:
	mov	w10, #53296
	tst	w9, w10
	b.eq	LBB0_7
; %bb.6:
Lloh3:
	adrp	x9, _NV_40@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NV_40@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsl	w10, w1, #13
	add	w10, w10, #192, lsl #12         ; =786432
	cmp	x8, x9
	mov	w8, #786432
	csel	w8, w8, w10, lt
	add	w1, w8, w2
	b	_nvkm_rd08
LBB0_7:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_NV_40,8,3                      ; @NV_40
.subsections_via_symbols
