	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wdt87xx_get_checksum
_wdt87xx_get_checksum:                  ## @wdt87xx_get_checksum
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PKT_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	(,%r14,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	_CMD_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	(,%r12,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	_VND_SET_CHECKSUM_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %r13
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_wdt87xx_send_command
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_VND_SET_CHECKSUM_CALC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_wdt87xx_send_command
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movl	%r15d, %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_DIV_ROUND_UP
	movl	%eax, %edi
	shll	$5, %edi
	subl	%eax, %edi
	subl	%eax, %edi
	callq	_msleep
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	shll	$2, %r14d
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	_VND_REQ_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CMD_REPORT_ID_OFFSET@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	%eax, (%rbx,%rcx,4)
	movq	_VND_GET_CHECKSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CMD_TYPE_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rbx,%rcx,4)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_wdt87xx_set_feature
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r13, %rdi
	callq	_dev_err
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	shll	$2, %r15d
	xorl	%ebx, %ebx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movq	_VND_READ_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r12), %rcx
	movq	%r14, %r12
	movl	%eax, (%r14,%rcx,4)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_wdt87xx_get_feature
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movl	%r14d, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	_CMD_DATA_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r12,%rax,4), %rdi
	callq	_get_unaligned_le16
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SIZE,4,2               ## @PKT_BUF_SIZE
	.comm	_CMD_BUF_SIZE,4,2               ## @CMD_BUF_SIZE
	.comm	_VND_SET_CHECKSUM_LENGTH,4,2    ## @VND_SET_CHECKSUM_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set checksum length\n"

	.comm	_VND_SET_CHECKSUM_CALC,4,2      ## @VND_SET_CHECKSUM_CALC
L_.str.1:                               ## @.str.1
	.asciz	"failed to set checksum address\n"

	.comm	_VND_REQ_READ,4,2               ## @VND_REQ_READ
	.comm	_CMD_REPORT_ID_OFFSET,8,3       ## @CMD_REPORT_ID_OFFSET
	.comm	_VND_GET_CHECKSUM,4,2           ## @VND_GET_CHECKSUM
	.comm	_CMD_TYPE_OFFSET,8,3            ## @CMD_TYPE_OFFSET
L_.str.2:                               ## @.str.2
	.asciz	"failed to request checksum\n"

	.comm	_VND_READ_DATA,4,2              ## @VND_READ_DATA
L_.str.3:                               ## @.str.3
	.asciz	"failed to read checksum\n"

	.comm	_CMD_DATA_OFFSET,8,3            ## @CMD_DATA_OFFSET
	.no_dead_strip	_wdt87xx_get_checksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wdt87xx_get_checksum
_wdt87xx_get_checksum:                  ; @wdt87xx_get_checksum
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x24, x3
	mov	x25, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PKT_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PKT_BUF_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	lsl	x8, x26, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _CMD_BUF_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_BUF_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w27, [x8]
	lsl	x8, x27, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh13:
	adrp	x8, _VND_SET_CHECKSUM_LENGTH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VND_SET_CHECKSUM_LENGTH@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, x3
	bl	_wdt87xx_send_command
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
Lloh18:
	adrp	x8, _VND_SET_CHECKSUM_CALC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VND_SET_CHECKSUM_CALC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x25
	bl	_wdt87xx_send_command
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	x0, x24
	mov	w1, #1024
	bl	_DIV_ROUND_UP
	mov	w8, #30
	mul	w0, w0, w8
	bl	_msleep
	lsl	w22, w27, #2
	mov	x0, x23
	mov	w1, #0
	mov	x2, x22
	bl	_memset
Lloh23:
	adrp	x8, _VND_REQ_READ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VND_REQ_READ@GOTPAGEOFF]
Lloh25:
	adrp	x24, _CMD_REPORT_ID_OFFSET@GOTPAGE
Lloh26:
	ldr	x24, [x24, _CMD_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	x9, [x24]
	str	w8, [x23, x9, lsl #2]
Lloh28:
	adrp	x8, _VND_GET_CHECKSUM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VND_GET_CHECKSUM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _CMD_TYPE_OFFSET@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CMD_TYPE_OFFSET@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	str	w8, [x23, x9, lsl #2]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_wdt87xx_set_feature
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	lsl	w22, w26, #2
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_memset
Lloh36:
	adrp	x8, _VND_READ_DATA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VND_READ_DATA@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	x9, [x24]
	str	w8, [x21, x9, lsl #2]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_wdt87xx_get_feature
	mov	x22, x0
	cbz	w0, LBB0_11
; %bb.7:
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_dev_err
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x22
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh44:
	adrp	x8, _CMD_DATA_OFFSET@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CMD_DATA_OFFSET@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	add	x0, x21, x8, lsl #2
	bl	_get_unaligned_le16
	str	w0, [x20]
	b	LBB0_9
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SIZE,4,2               ; @PKT_BUF_SIZE
	.comm	_CMD_BUF_SIZE,4,2               ; @CMD_BUF_SIZE
	.comm	_VND_SET_CHECKSUM_LENGTH,4,2    ; @VND_SET_CHECKSUM_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set checksum length\n"

	.comm	_VND_SET_CHECKSUM_CALC,4,2      ; @VND_SET_CHECKSUM_CALC
l_.str.1:                               ; @.str.1
	.asciz	"failed to set checksum address\n"

	.comm	_VND_REQ_READ,4,2               ; @VND_REQ_READ
	.comm	_CMD_REPORT_ID_OFFSET,8,3       ; @CMD_REPORT_ID_OFFSET
	.comm	_VND_GET_CHECKSUM,4,2           ; @VND_GET_CHECKSUM
	.comm	_CMD_TYPE_OFFSET,8,3            ; @CMD_TYPE_OFFSET
l_.str.2:                               ; @.str.2
	.asciz	"failed to request checksum\n"

	.comm	_VND_READ_DATA,4,2              ; @VND_READ_DATA
l_.str.3:                               ; @.str.3
	.asciz	"failed to read checksum\n"

	.comm	_CMD_DATA_OFFSET,8,3            ; @CMD_DATA_OFFSET
	.no_dead_strip	_wdt87xx_get_checksum
.subsections_via_symbols
