	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgp_verify_buffer
_sgp_verify_buffer:                     ## @sgp_verify_buffer
	.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	%rdx, %rax
	movq	_SGP_WORD_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_SGP_CRC8_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	addq	%rdx, %r13
	imulq	%rax, %r13
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_sgp_crc8_table@GOTPCREL(%rip), %r12
	movq	_SGP_CRC8_INIT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	leaq	(%rbx,%r14,4), %rsi
	movl	(%r15), %ecx
	callq	_crc8
	movq	_SGP_WORD_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	%rdx, %r14
	cmpl	(%rbx,%r14,4), %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SGP_CRC8_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	movslq	%r14d, %r14
	cmpq	%r13, %r14
	jb	LBB0_2
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SGP_WORD_LEN,8,3               ## @SGP_WORD_LEN
	.comm	_SGP_CRC8_LEN,8,3               ## @SGP_CRC8_LEN
	.comm	_sgp_crc8_table,4,2             ## @sgp_crc8_table
	.comm	_SGP_CRC8_INIT,4,2              ## @SGP_CRC8_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CRC error\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sgp_verify_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgp_verify_buffer
_sgp_verify_buffer:                     ; @sgp_verify_buffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x8, x2
Lloh0:
	adrp	x21, _SGP_WORD_LEN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SGP_WORD_LEN@GOTPAGEOFF]
	ldr	x2, [x21]
Lloh2:
	adrp	x22, _SGP_CRC8_LEN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SGP_CRC8_LEN@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x9, x9, x2
	mul	x23, x9, x8
	cbz	x23, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x26, #0
Lloh4:
	adrp	x24, _sgp_crc8_table@GOTPAGE
Lloh5:
	ldr	x24, [x24, _sgp_crc8_table@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SGP_CRC8_INIT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SGP_CRC8_INIT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	add	x1, x20, x26, lsl #2
	ldr	w3, [x25]
	bl	_crc8
	ldr	x2, [x21]
	add	x8, x2, x26
	ldr	w9, [x20, x8, lsl #2]
	cmp	w0, w9
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x22]
	add	w8, w8, w9
	sxtw	x26, w8
	cmp	x26, x23
	b.lo	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SGP_WORD_LEN,8,3               ; @SGP_WORD_LEN
	.comm	_SGP_CRC8_LEN,8,3               ; @SGP_CRC8_LEN
	.comm	_sgp_crc8_table,4,2             ; @sgp_crc8_table
	.comm	_SGP_CRC8_INIT,4,2              ; @SGP_CRC8_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CRC error\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sgp_verify_buffer
.subsections_via_symbols
