	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_falcon_v1_read_dmem
_nvkm_falcon_v1_read_dmem:              ## @nvkm_falcon_v1_read_dmem
	.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	%edx, %ebx
	leal	3(%rbx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	movq	%r8, %r13
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%esi, %edx
	movq	%rdi, %r12
	movq	_EMEM_START_ADDR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	cmpl	%edx, %esi
	jg	LBB0_2
## %bb.1:
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.10:
	subl	%esi, %edx
	movq	%r12, %rdi
	movl	%edx, %esi
	movl	%ebx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_falcon_v1_read_emem       ## TAILCALL
LBB0_2:
	andl	$-4, %eax
	movl	%ebx, %esi
	subl	%eax, %esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	shll	$3, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leal	448(,%rax,8), %esi
	orl	$33554432, %edx                 ## imm = 0x2000000
	movq	%r12, %rdi
	callq	_nvkm_falcon_wr32
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$4, %ebx
	jl	LBB0_5
## %bb.3:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
	shrl	$2, %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	452(%rax), %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nvkm_falcon_rd32
	movl	%eax, (%r13,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	jne	LBB0_4
LBB0_5:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.6:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addl	$452, %esi                      ## imm = 0x1C4
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_nvkm_falcon_rd32
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.7:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movslq	%edx, %rcx
	subl	%ebx, %edx
	movslq	%edx, %rdx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %esi
	movl	%esi, (%r13,%rdx,4)
	sarl	$8, %eax
	incq	%rdx
	cmpq	%rcx, %rdx
	jl	LBB0_8
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMEM_START_ADDR,4,2            ## @EMEM_START_ADDR
	.no_dead_strip	_nvkm_falcon_v1_read_dmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_falcon_v1_read_dmem
_nvkm_falcon_v1_read_dmem:              ; @nvkm_falcon_v1_read_dmem
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x2
	mov	x21, x0
	negs	w8, w2
	and	w8, w8, #0x3
	and	w9, w2, #0x3
	csneg	w23, w9, w8, mi
Lloh0:
	adrp	x8, _EMEM_START_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMEM_START_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.gt	LBB0_3
; %bb.1:
	ldr	x9, [x21]
	cbz	x9, LBB0_3
; %bb.2:
	sub	w1, w1, w8
	mov	x0, x21
	mov	x2, x20
	mov	x4, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nvkm_falcon_v1_read_emem
LBB0_3:
	lsl	w24, w3, #3
	add	w8, w24, #448
	orr	w2, w1, #0x2000000
	mov	x0, x21
	mov	x1, x8
	bl	_nvkm_falcon_wr32
	cmp	w20, #4
	b.lt	LBB0_6
; %bb.4:
	lsr	w25, w20, #2
	add	w22, w24, #452
	mov	x26, x19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_nvkm_falcon_rd32
	str	w0, [x26], #4
	subs	x25, x25, #1
	b.ne	LBB0_5
LBB0_6:
	cbz	w23, LBB0_10
; %bb.7:
	add	w1, w24, #452
	mov	x0, x21
	bl	_nvkm_falcon_rd32
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.8:
	sub	w8, w20, w23
	sxtw	x8, w8
	sxtw	x9, w20
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	and	w10, w0, #0xff
	str	w10, [x19, x8, lsl #2]
	asr	w0, w0, #8
	add	x8, x8, #1
	cmp	x8, x9
	b.lt	LBB0_9
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EMEM_START_ADDR,4,2            ; @EMEM_START_ADDR
	.no_dead_strip	_nvkm_falcon_v1_read_dmem
.subsections_via_symbols
