	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_send_job_on_qman0
_goya_send_job_on_qman0:                ## @goya_send_job_on_qman0
	.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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_HL_DEVICE_TIMEOUT_USEC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GOYA_PLDM_QMAN0_TIMEOUT_USEC@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	movq	(%rbx), %rax
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	*16(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	(%rbx), %rax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_goya_qman0_set_security
	movq	8(%r13), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	_PACKET_MSG_PROT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_GOYA_PKT_CTL_OPCODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movslq	(%rdx), %r14
	movslq	(%r13), %r12
	movq	_GOYA_PKT_CTL_EB_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %r15d
	movq	_GOYA_PKT_CTL_MB_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %r15d
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movq	%rax, -8(%r12,%r14)
	movq	_GOYA_QMAN0_FENCE_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -16(%r12,%r14)
	movl	-44(%rbp), %edi
	callq	_cpu_to_le64
	movl	%eax, -24(%r12,%r14)
	movq	_GOYA_QUEUE_ID_DMA_0@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	(%r13), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	movq	%rbx, %rdi
	callq	_hl_hw_queue_send_cb_no_cmpl
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_4:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err_ratelimited
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_6:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_9:
	xorl	%ecx, %ecx
	movq	_GOYA_QMAN0_FENCE_VAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	sete	%cl
	movl	$1, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_hl_poll_timeout_memory
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_hl_hw_queue_inc_ci_kernel
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	%r12d, %ecx
	addl	(%rax), %ecx
	jne	LBB0_11
## %bb.10:
	movl	8(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movq	(%rbx), %rax
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*8(%rax)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_goya_qman0_set_security
LBB0_12:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GOYA_PLDM_QMAN0_TIMEOUT_USEC,4,2 ## @GOYA_PLDM_QMAN0_TIMEOUT_USEC
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ## @HL_DEVICE_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't send driver job on QMAN0 because the device is not idle\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate fence memory for QMAN0\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PACKET_MSG_PROT,4,2            ## @PACKET_MSG_PROT
	.comm	_GOYA_PKT_CTL_OPCODE_SHIFT,4,2  ## @GOYA_PKT_CTL_OPCODE_SHIFT
	.comm	_GOYA_PKT_CTL_EB_SHIFT,4,2      ## @GOYA_PKT_CTL_EB_SHIFT
	.comm	_GOYA_PKT_CTL_MB_SHIFT,4,2      ## @GOYA_PKT_CTL_MB_SHIFT
	.comm	_GOYA_QMAN0_FENCE_VAL,4,2       ## @GOYA_QMAN0_FENCE_VAL
	.comm	_GOYA_QUEUE_ID_DMA_0,4,2        ## @GOYA_QUEUE_ID_DMA_0
L_.str.2:                               ## @.str.2
	.asciz	"Failed to send CB on QMAN0, %d\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.3:                               ## @.str.3
	.asciz	"QMAN0 Job timeout (0x%x)\n"

	.no_dead_strip	_goya_send_job_on_qman0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_send_job_on_qman0
_goya_send_job_on_qman0:                ; @goya_send_job_on_qman0
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _HL_DEVICE_TIMEOUT_USEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HL_DEVICE_TIMEOUT_USEC@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GOYA_PLDM_QMAN0_TIMEOUT_USEC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GOYA_PLDM_QMAN0_TIMEOUT_USEC@GOTPAGEOFF]
	ldr	x10, [x0, #16]
	cmp	x10, #0
	csel	x8, x8, x9, eq
	ldr	w21, [x8]
	ldr	x8, [x0]
	ldr	x8, [x8, #16]
	mov	x1, #0
	mov	x2, #0
	blr	x8
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh4:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x9]
	add	x3, sp, #12
	mov	x0, x19
	mov	w1, #4
	blr	x8
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	w23, #1
	mov	x0, x19
	mov	w1, #1
	bl	_goya_qman0_set_security
	ldr	x26, [x22, #8]
	ldrsw	x8, [x26]
	ldrsw	x9, [x22]
	add	x24, x9, x8
Lloh7:
	adrp	x8, _PACKET_MSG_PROT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PACKET_MSG_PROT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _GOYA_PKT_CTL_OPCODE_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GOYA_PKT_CTL_OPCODE_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh13:
	adrp	x9, _GOYA_PKT_CTL_EB_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _GOYA_PKT_CTL_EB_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _GOYA_PKT_CTL_MB_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GOYA_PKT_CTL_MB_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w23, w8, w9
	mov	x0, x23
	bl	_cpu_to_le32
	stur	x0, [x24, #-8]
Lloh19:
	adrp	x25, _GOYA_QMAN0_FENCE_VAL@GOTPAGE
Lloh20:
	ldr	x25, [x25, _GOYA_QMAN0_FENCE_VAL@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_cpu_to_le32
	stur	x0, [x24, #-16]
	ldr	w0, [sp, #12]
	bl	_cpu_to_le64
	stur	w0, [x24, #-24]
Lloh21:
	adrp	x24, _GOYA_QUEUE_ID_DMA_0@GOTPAGE
Lloh22:
	ldr	x24, [x24, _GOYA_QUEUE_ID_DMA_0@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [x22]
	ldr	w3, [x26, #4]
	mov	x0, x19
	bl	_hl_hw_queue_send_cb_no_cmpl
	cbz	w0, LBB0_7
; %bb.3:
	mov	x22, x0
	ldr	w0, [x19, #8]
	str	x22, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_4:
	ldr	w0, [x19, #8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err_ratelimited
Lloh27:
	adrp	x8, _EBUSY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19, #8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_7:
	ldr	w8, [x25]
	cmp	w23, w8
	cset	w3, eq
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	w4, #1000
	mov	x5, x21
	mov	w6, #1
	bl	_hl_poll_timeout_memory
	mov	x22, x0
	ldr	w1, [x24]
	mov	x0, x19
	bl	_hl_hw_queue_inc_ci_kernel
Lloh33:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmn	w22, w8
	b.ne	LBB0_10
; %bb.8:
	ldr	w0, [x19, #8]
	str	x23, [sp]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	bl	_dev_err
LBB0_10:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	mov	x0, x19
	mov	w1, #0
	bl	_goya_qman0_set_security
LBB0_11:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GOYA_PLDM_QMAN0_TIMEOUT_USEC,4,2 ; @GOYA_PLDM_QMAN0_TIMEOUT_USEC
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ; @HL_DEVICE_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't send driver job on QMAN0 because the device is not idle\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate fence memory for QMAN0\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PACKET_MSG_PROT,4,2            ; @PACKET_MSG_PROT
	.comm	_GOYA_PKT_CTL_OPCODE_SHIFT,4,2  ; @GOYA_PKT_CTL_OPCODE_SHIFT
	.comm	_GOYA_PKT_CTL_EB_SHIFT,4,2      ; @GOYA_PKT_CTL_EB_SHIFT
	.comm	_GOYA_PKT_CTL_MB_SHIFT,4,2      ; @GOYA_PKT_CTL_MB_SHIFT
	.comm	_GOYA_QMAN0_FENCE_VAL,4,2       ; @GOYA_QMAN0_FENCE_VAL
	.comm	_GOYA_QUEUE_ID_DMA_0,4,2        ; @GOYA_QUEUE_ID_DMA_0
l_.str.2:                               ; @.str.2
	.asciz	"Failed to send CB on QMAN0, %d\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.3:                               ; @.str.3
	.asciz	"QMAN0 Job timeout (0x%x)\n"

	.no_dead_strip	_goya_send_job_on_qman0
.subsections_via_symbols
