	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_elbc_verify_buf
_fsl_elbc_verify_buf:                   ## @fsl_elbc_verify_buf
	.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	%edx, %r15d
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	testl	%edx, %edx
	js	LBB0_1
## %bb.3:
	movl	(%r12), %ecx
	movl	4(%r12), %eax
	subl	%eax, %ecx
	cmpl	%r15d, %ecx
	jae	LBB0_4
## %bb.18:
	movl	24(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r12), %eax
	movl	%eax, 4(%r12)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_1:
	movl	24(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_4:
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.6:
	movq	%rsi, %r14
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	16(%r12), %rdi
	callq	_in_8
	xorl	%ecx, %ecx
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.7:
	movl	%r15d, %r13d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r13
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	4(%r12), %rdi
	addq	%rbx, %rdi
	shlq	$2, %rdi
	addq	16(%r12), %rdi
	callq	_in_8
	leaq	1(%rbx), %rcx
	cmpq	(%r14,%rbx,8), %rax
	movq	%rcx, %rbx
	je	LBB0_8
## %bb.10:
	decl	%ecx
	jmp	LBB0_12
LBB0_5:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_11:
	movl	%r13d, %ecx
LBB0_12:
	movl	4(%r12), %eax
LBB0_13:
	addl	%r15d, %eax
	movl	%eax, 4(%r12)
	cmpl	%r15d, %ecx
	jne	LBB0_15
## %bb.14:
	movq	8(%r12), %rax
	movq	_LTESR_CC@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_17
LBB0_15:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_16:
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write_buf of %d bytes"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"verify_buf beyond end of buffer (%d requested, %u available)\n"

	.comm	_LTESR_CC,8,3                   ## @LTESR_CC
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_fsl_elbc_verify_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_elbc_verify_buf
_fsl_elbc_verify_buf:                   ; @fsl_elbc_verify_buf
	.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	x19, x2
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x21, [x8]
	tbnz	w2, #31, LBB0_3
; %bb.1:
	ldp	w9, w8, [x21]
	sub	w9, w9, w8
	cmp	w9, w19
	b.hs	LBB0_5
; %bb.2:
	ldr	w0, [x21, #24]
	str	x9, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	ldr	w8, [x21]
	str	w8, [x21, #4]
	b	LBB0_4
LBB0_3:
	ldr	w0, [x21, #24]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_5:
	cbz	w19, LBB0_11
; %bb.6:
	mov	x20, x1
	sxtw	x8, w8
	ldr	x9, [x21, #16]
	add	x0, x9, x8, lsl #2
	bl	_in_8
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.7:
	mov	w22, w19
	mov	w23, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x22, x23
	b.eq	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrsw	x8, [x21, #4]
	ldr	x9, [x21, #16]
	add	x8, x23, x8
	add	x0, x9, x8, lsl #2
	bl	_in_8
	ldr	x8, [x20, x23, lsl #3]
	add	x23, x23, #1
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.10:
	sub	w22, w23, #1
	b	LBB0_13
LBB0_11:
	mov	w22, #0
	b	LBB0_14
LBB0_12:
	mov	w22, #0
LBB0_13:
	ldr	w8, [x21, #4]
LBB0_14:
	add	w8, w8, w19
	str	w8, [x21, #4]
	cmp	w22, w19
	b.ne	LBB0_17
; %bb.15:
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _LTESR_CC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LTESR_CC@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	mov	w0, #0
	b	LBB0_19
LBB0_17:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write_buf of %d bytes"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"verify_buf beyond end of buffer (%d requested, %u available)\n"

	.comm	_LTESR_CC,8,3                   ; @LTESR_CC
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_fsl_elbc_verify_buf
.subsections_via_symbols
