	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ish_query_loader_prop
_ish_query_loader_prop:                 ## @ish_query_loader_prop
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_LOADER_CMD_XFER_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	(%r12), %eax
	movl	%eax, -40(%rbp)
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	movl	$36, %r8d
	callq	_loader_cl_send
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpl	$36, %ebx
	jne	LBB0_3
## %bb.4:
	movl	-48(%rbp), %eax
	movl	%eax, 32(%r15)
	movups	-80(%rbp), %xmm0
	movups	-64(%rbp), %xmm1
	movups	%xmm1, 16(%r15)
	movups	%xmm0, (%r15)
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	movl	32(%r15), %edx
	movl	28(%r15), %ecx
	movl	24(%r15), %r8d
	movl	20(%r15), %r9d
	movl	12(%r15), %r10d
	movl	16(%r15), %r11d
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r11
	callq	_dev_dbg
	addq	$16, %rsp
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	movl	8(%r15), %edx
	movl	(%r15), %ecx
	movl	4(%r15), %r8d
	movq	_dma_buf_size_limit@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r15), %eax
	cmpl	(%r12), %eax
	jge	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	movl	(%r12), %edx
	movl	8(%r15), %ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movl	$1, (%r14)
	jmp	LBB0_10
LBB0_3:
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$36, %ecx
	movl	%eax, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	$1, (%r14)
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_LOADER_XFER_MODE_DIRECT_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.7:
	movl	4(%r15), %eax
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%edx, %edx
	je	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	movl	4(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOADER_CMD_XFER_QUERY,4,2      ## @LOADER_CMD_XFER_QUERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data size %d is not equal to size of loader_xfer_query_response %zu\n"

	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
L_.str.1:                               ## @.str.1
	.asciz	"ish_fw_version: major=%d minor=%d hotfix=%d build=%d protocol_version=0x%x loader_version=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"loader_capability: max_fw_image_size=0x%x xfer_mode=%d max_dma_buf_size=0x%x dma_buf_size_limit=0x%x\n"

	.comm	_dma_buf_size_limit,4,2         ## @dma_buf_size_limit
L_.str.3:                               ## @.str.3
	.asciz	"ISH firmware size %zu is greater than Shim firmware loader max supported %d\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_LOADER_XFER_MODE_DIRECT_DMA,4,2 ## @LOADER_XFER_MODE_DIRECT_DMA
	.comm	_L1_CACHE_BYTES,4,2             ## @L1_CACHE_BYTES
L_.str.4:                               ## @.str.4
	.asciz	"Shim firmware loader buffer size %d should be multiple of cacheline\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ish_query_loader_prop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ish_query_loader_prop
_ish_query_loader_prop:                 ; @ish_query_loader_prop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	sub	x0, x29, #40
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _LOADER_CMD_XFER_QUERY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOADER_CMD_XFER_QUERY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x21]
	stp	w9, w8, [x29, #-40]
	sub	x1, x29, #40
	add	x3, sp, #16
	mov	x0, x19
	mov	w2, #8
	mov	w4, #36
	bl	_loader_cl_send
	mov	x22, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	cmp	w22, #36
	b.ne	LBB0_5
; %bb.2:
	ldp	q0, q1, [sp, #16]
	stp	q0, q1, [x20]
	ldr	w8, [sp, #48]
	str	w8, [x20, #32]
	mov	x0, x19
	bl	_cl_data_to_dev
	ldp	w3, w2, [x20, #28]
	ldp	w5, w4, [x20, #20]
	ldp	w9, w8, [x20, #12]
	stp	x8, x9, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_cl_data_to_dev
	ldp	w4, w2, [x20, #4]
	ldr	w3, [x20]
Lloh5:
	adrp	x8, _dma_buf_size_limit@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dma_buf_size_limit@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x20, #8]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_cl_data_to_dev
	ldr	w2, [x21]
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_cl_data_to_dev
	mov	w8, #36
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	mov	w8, #1
	str	w8, [x19]
Lloh16:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	ldr	w8, [x20]
Lloh18:
	adrp	x9, _LOADER_XFER_MODE_DIRECT_DMA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _LOADER_XFER_MODE_DIRECT_DMA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	ldr	w8, [x20, #4]
Lloh21:
	adrp	x9, _L1_CACHE_BYTES@GOTPAGE
Lloh22:
	ldr	x9, [x9, _L1_CACHE_BYTES@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbz	w8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_cl_data_to_dev
	ldr	w2, [x20, #4]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_11:
	mov	w22, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_LOADER_CMD_XFER_QUERY,4,2      ; @LOADER_CMD_XFER_QUERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data size %d is not equal to size of loader_xfer_query_response %zu\n"

	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
l_.str.1:                               ; @.str.1
	.asciz	"ish_fw_version: major=%d minor=%d hotfix=%d build=%d protocol_version=0x%x loader_version=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"loader_capability: max_fw_image_size=0x%x xfer_mode=%d max_dma_buf_size=0x%x dma_buf_size_limit=0x%x\n"

	.comm	_dma_buf_size_limit,4,2         ; @dma_buf_size_limit
l_.str.3:                               ; @.str.3
	.asciz	"ISH firmware size %zu is greater than Shim firmware loader max supported %d\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_LOADER_XFER_MODE_DIRECT_DMA,4,2 ; @LOADER_XFER_MODE_DIRECT_DMA
	.comm	_L1_CACHE_BYTES,4,2             ; @L1_CACHE_BYTES
l_.str.4:                               ; @.str.4
	.asciz	"Shim firmware loader buffer size %d should be multiple of cacheline\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ish_query_loader_prop
.subsections_via_symbols
