	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_falcon_v1_load_imem
_nvkm_falcon_v1_load_imem:              ## @nvkm_falcon_v1_load_imem
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%edx, %r13d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	leal	3(%rcx), %r14d
	testl	%ecx, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmovnsl	%ecx, %r14d
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	andl	$-4, %r14d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	$24, %edi
	callq	_BIT
	movl	%eax, %ebx
	orl	%r13d, %ebx
	xorl	%r13d, %r13d
	cmpl	$0, 16(%rbp)
	movl	$0, %eax
	je	LBB0_2
## %bb.1:
	movl	$28, %edi
	callq	_BIT
LBB0_2:
	orl	%eax, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %eax
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	shll	$4, %r12d
	leal	384(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_nvkm_falcon_wr32
	cmpl	$4, %r14d
	jl	LBB0_8
## %bb.3:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	sarl	$2, %eax
	leal	392(%r12), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leal	388(%r12), %r13d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_nvkm_falcon_wr32
	incq	%r14
	cmpq	%r14, %r12
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	testb	$63, %r14b
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leal	1(%rdx), %ebx
	movq	%r15, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_nvkm_falcon_wr32
	movl	%ebx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_7:
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
LBB0_8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.9:
	movl	%r13d, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %r14d
	testb	$63, %r13b
	jne	LBB0_11
## %bb.10:
	leal	392(%r12), %esi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_nvkm_falcon_wr32
LBB0_11:
	leal	388(%r12), %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	shll	$3, %edi
	callq	_BIT
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	andl	%r14d, %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_nvkm_falcon_wr32
	incl	%r13d
LBB0_12:
	testb	$63, %r13b
	je	LBB0_15
## %bb.13:
	addl	$388, %r12d                     ## imm = 0x184
	incl	%r13d
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_nvkm_falcon_wr32
	incl	%ebx
	testb	$63, %r13b
	movl	%ebx, %r13d
	jne	LBB0_14
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nvkm_falcon_v1_load_imem
.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_load_imem
_nvkm_falcon_v1_load_imem:              ; @nvkm_falcon_v1_load_imem
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	mov	x23, x5
	mov	x20, x4
	mov	x22, x3
	mov	x25, x2
	mov	x21, x1
	mov	x19, x0
	add	w8, w3, #3
	cmp	w3, #0
	csel	w28, w8, w3, lt
	and	w8, w28, #0xfffffffc
	sub	w26, w3, w8
	mov	w0, #24
	bl	_BIT
	orr	w25, w0, w25
	cbz	w24, LBB0_2
; %bb.1:
	mov	w0, #28
	bl	_BIT
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	orr	w2, w25, w0
	lsl	w24, w23, #4
	add	w1, w24, #384
	mov	x0, x19
	bl	_nvkm_falcon_wr32
	cmp	w22, #4
	b.lt	LBB0_8
; %bb.4:
	mov	x27, #0
	asr	w25, w28, #2
	add	w22, w24, #392
	add	w23, w24, #388
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x21, x27, lsl #2]
	mov	x0, x19
	mov	x1, x23
	bl	_nvkm_falcon_wr32
	add	x27, x27, #1
	cmp	x25, x27
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	tst	x27, #0x3f
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w28, w20, #1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_nvkm_falcon_wr32
	mov	x20, x28
	b	LBB0_5
LBB0_8:
	mov	w25, #0
LBB0_9:
	cbz	w26, LBB0_13
; %bb.10:
	ldr	w21, [x21, w25, uxtw #2]
	tst	w25, #0x3f
	b.ne	LBB0_12
; %bb.11:
	add	w1, w24, #392
	mov	x0, x19
	mov	x2, x20
	bl	_nvkm_falcon_wr32
LBB0_12:
	add	w20, w24, #388
	lsl	w0, w26, #3
	bl	_BIT
	sub	w8, w0, #1
	and	w2, w8, w21
	mov	x0, x19
	mov	x1, x20
	bl	_nvkm_falcon_wr32
	add	w25, w25, #1
LBB0_13:
	tst	w25, #0x3f
	b.eq	LBB0_16
; %bb.14:
	add	w20, w24, #388
	add	w21, w25, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_nvkm_falcon_wr32
	tst	w21, #0x3f
	add	w21, w21, #1
	b.ne	LBB0_15
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nvkm_falcon_v1_load_imem
.subsections_via_symbols
