	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ims_pcu_verify_block
_ims_pcu_verify_block:                  ## @ims_pcu_verify_block
	.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
	movq	%rcx, %r13
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	leaq	12(%rbx), %rsi
	movq	%r14, %rdi
	callq	_put_unaligned_le32
	movl	%r15d, 8(%rbx)
	movq	_READ_APP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IMS_PCU_CMD_RESPONSE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$5, %ecx
	callq	_ims_pcu_execute_bl_command
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r12), %edi
	movslq	%r15d, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rax
	movq	_IMS_PCU_BL_DATA_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %r13
	leaq	(%rax,%rcx,4), %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_get_unaligned_le32
	cmpq	%r14, %rax
	jne	LBB0_4
## %bb.3:
	cmpl	%r15d, 4(%r13)
	jne	LBB0_4
## %bb.5:
	movl	(%r13), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	(%r12), %edi
	movslq	%r15d, %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_4:
	movl	(%r12), %r12d
	movq	%rbx, %rdi
	callq	_get_unaligned_le32
	movl	4(%r13), %r9d
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r12d, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_READ_APP,4,2                   ## @READ_APP
	.comm	_IMS_PCU_CMD_RESPONSE_TIMEOUT,4,2 ## @IMS_PCU_CMD_RESPONSE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to retrieve block at 0x%08x, len %d, error: %d\n"

	.comm	_IMS_PCU_BL_DATA_OFFSET,8,3     ## @IMS_PCU_BL_DATA_OFFSET
L_.str.1:                               ## @.str.1
	.asciz	"Wrong block when retrieving 0x%08x (0x%08x), len %d (%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Mismatch in block at 0x%08x, len %d\n"

	.no_dead_strip	_ims_pcu_verify_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ims_pcu_verify_block
_ims_pcu_verify_block:                  ; @ims_pcu_verify_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x23, [x0, #8]
	add	x1, x23, #12
	mov	x0, x19
	bl	_put_unaligned_le32
	str	w20, [x23, #8]
Lloh0:
	adrp	x8, _READ_APP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _READ_APP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _IMS_PCU_CMD_RESPONSE_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IMS_PCU_CMD_RESPONSE_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #5
	bl	_ims_pcu_execute_bl_command
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	w0, [x21]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x3, w20
	str	x23, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	ldr	x8, [x21, #8]
Lloh8:
	adrp	x9, _IMS_PCU_BL_DATA_OFFSET@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IMS_PCU_BL_DATA_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x24, x8, x9, lsl #2
	add	x23, x24, #8
	mov	x0, x23
	bl	_get_unaligned_le32
	cmp	x0, x19
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x24, #4]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x24]
	mov	x1, x22
	mov	x2, x20
	bl	_memcmp
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w0, [x21]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x3, w20
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w21, [x21]
	mov	x0, x23
	bl	_get_unaligned_le32
	mov	x3, x0
	ldr	w8, [x24, #4]
	stp	x20, x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
LBB0_7:
	mov	x2, x19
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
LBB0_9:
	mov	w23, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_READ_APP,4,2                   ; @READ_APP
	.comm	_IMS_PCU_CMD_RESPONSE_TIMEOUT,4,2 ; @IMS_PCU_CMD_RESPONSE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to retrieve block at 0x%08x, len %d, error: %d\n"

	.comm	_IMS_PCU_BL_DATA_OFFSET,8,3     ; @IMS_PCU_BL_DATA_OFFSET
l_.str.1:                               ; @.str.1
	.asciz	"Wrong block when retrieving 0x%08x (0x%08x), len %d (%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Mismatch in block at 0x%08x, len %d\n"

	.no_dead_strip	_ims_pcu_verify_block
.subsections_via_symbols
