	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_job_hw_submit
_panfrost_job_hw_submit:                ## @panfrost_job_hw_submit
	.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	%esi, %r14d
	movq	%rdi, %r12
	movq	24(%rdi), %r13
	movl	(%rdi), %ebx
	movl	(%r13), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	%r14d, %edi
	callq	_JS_COMMAND_NEXT
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_job_read
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.10:
	movl	(%r13), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pm_runtime_put_sync_autosuspend ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%r12), %rsi
	movq	%r13, %rdi
	callq	_panfrost_mmu_as_get
	movl	%eax, %r15d
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_panfrost_devfreq_record_transition
	movl	%r14d, %edi
	callq	_JS_HEAD_NEXT_LO
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_job_write
	movl	%r14d, %edi
	callq	_JS_HEAD_NEXT_HI
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_job_write
	movl	8(%r12), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_panfrost_job_write_affinity
	movl	$8, %edi
	callq	_JS_CONFIG_THREAD_PRI
	movl	%eax, %ebx
	movq	_JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE@GOTPCREL(%rip), %rax
	movq	_JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE@GOTPCREL(%rip), %rcx
	movq	_HW_FEATURE_FLUSH_REDUCTION@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	%r15d, %ebx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	%r13, %rdi
	callq	_panfrost_has_hw_feature
	movl	$0, %r15d
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_JS_CONFIG_ENABLE_FLUSH_REDUCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_4:
	movq	_HW_ISSUE_10649@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_panfrost_has_hw_issue
	testq	%rax, %rax
	movl	$0, %eax
	je	LBB0_6
## %bb.5:
	movq	_JS_CONFIG_START_MMU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	%r15d, %ebx
	orl	%eax, %ebx
	movl	%r14d, %edi
	callq	_JS_CONFIG_NEXT
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_job_write
	movq	_HW_FEATURE_FLUSH_REDUCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_panfrost_has_hw_feature
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%r14d, %edi
	callq	_JS_FLUSH_ID_NEXT
	movl	4(%r12), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_job_write
LBB0_8:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dev_dbg
	movl	%r14d, %edi
	callq	_JS_COMMAND_NEXT
	movq	_JS_COMMAND_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_job_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE,4,2 ## @JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE
	.comm	_JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE,4,2 ## @JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE
	.comm	_HW_FEATURE_FLUSH_REDUCTION,4,2 ## @HW_FEATURE_FLUSH_REDUCTION
	.comm	_JS_CONFIG_ENABLE_FLUSH_REDUCTION,4,2 ## @JS_CONFIG_ENABLE_FLUSH_REDUCTION
	.comm	_HW_ISSUE_10649,4,2             ## @HW_ISSUE_10649
	.comm	_JS_CONFIG_START_MMU,4,2        ## @JS_CONFIG_START_MMU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"JS: Submitting atom %p to js[%d] with head=0x%llx"

	.comm	_JS_COMMAND_START,4,2           ## @JS_COMMAND_START
	.no_dead_strip	_panfrost_job_hw_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_job_hw_submit
_panfrost_job_hw_submit:                ; @panfrost_job_hw_submit
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #24]
	ldr	w22, [x0]
	ldr	w0, [x19]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_JS_COMMAND_NEXT
	mov	x1, x0
	mov	x0, x19
	bl	_job_read
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x19]
	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
	b	_pm_runtime_put_sync_autosuspend
LBB0_3:
	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
LBB0_4:
	ldr	x1, [x21, #16]
	mov	x0, x19
	bl	_panfrost_mmu_as_get
	mov	x23, x0
	mov	x0, x19
	mov	x1, x20
	bl	_panfrost_devfreq_record_transition
	mov	x0, x20
	bl	_JS_HEAD_NEXT_LO
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_job_write
	mov	x0, x20
	bl	_JS_HEAD_NEXT_HI
	mov	x1, x0
	mov	x0, x19
	bl	_job_write
	ldr	w1, [x21, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_panfrost_job_write_affinity
	mov	w0, #8
	bl	_JS_CONFIG_THREAD_PRI
	mov	x24, x0
Lloh0:
	adrp	x8, _JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x8, _JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
Lloh6:
	adrp	x27, _HW_FEATURE_FLUSH_REDUCTION@GOTPAGE
Lloh7:
	ldr	x27, [x27, _HW_FEATURE_FLUSH_REDUCTION@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_panfrost_has_hw_feature
Lloh8:
	adrp	x8, _JS_CONFIG_ENABLE_FLUSH_REDUCTION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JS_CONFIG_ENABLE_FLUSH_REDUCTION@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w28, wzr, w8, eq
Lloh11:
	adrp	x8, _HW_ISSUE_10649@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HW_ISSUE_10649@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_panfrost_has_hw_issue
Lloh14:
	adrp	x8, _JS_CONFIG_START_MMU@GOTPAGE
Lloh15:
	ldr	x8, [x8, _JS_CONFIG_START_MMU@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w9, w24, w23
	orr	w9, w9, w25
	orr	w9, w9, w26
	orr	w9, w9, w28
	orr	w23, w9, w8
	mov	x0, x20
	bl	_JS_CONFIG_NEXT
	mov	x1, x0
	mov	x0, x19
	mov	x2, x23
	bl	_job_write
	ldr	w1, [x27]
	mov	x0, x19
	bl	_panfrost_has_hw_feature
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_JS_FLUSH_ID_NEXT
	mov	x1, x0
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_job_write
LBB0_6:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	mov	x4, x22
	bl	_dev_dbg
	mov	x0, x20
	bl	_JS_COMMAND_NEXT
	mov	x1, x0
Lloh19:
	adrp	x8, _JS_COMMAND_START@GOTPAGE
Lloh20:
	ldr	x8, [x8, _JS_COMMAND_START@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_job_write
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE,4,2 ; @JS_CONFIG_START_FLUSH_CLEAN_INVALIDATE
	.comm	_JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE,4,2 ; @JS_CONFIG_END_FLUSH_CLEAN_INVALIDATE
	.comm	_HW_FEATURE_FLUSH_REDUCTION,4,2 ; @HW_FEATURE_FLUSH_REDUCTION
	.comm	_JS_CONFIG_ENABLE_FLUSH_REDUCTION,4,2 ; @JS_CONFIG_ENABLE_FLUSH_REDUCTION
	.comm	_HW_ISSUE_10649,4,2             ; @HW_ISSUE_10649
	.comm	_JS_CONFIG_START_MMU,4,2        ; @JS_CONFIG_START_MMU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"JS: Submitting atom %p to js[%d] with head=0x%llx"

	.comm	_JS_COMMAND_START,4,2           ; @JS_COMMAND_START
	.no_dead_strip	_panfrost_job_hw_submit
.subsections_via_symbols
