	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wdt87xx_write_data
_wdt87xx_write_data:                    ## @wdt87xx_write_data
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PKT_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	(,%r13,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movl	%ebx, %eax
	orl	%r15d, %eax
	testb	$3, %al
	je	LBB0_1
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.2:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	shll	$2, %r13d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %r12
	addq	%r13, %r12
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	addl	%r13d, %r15d
	incl	%r14d
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_min
	movq	%rax, %r13
	movq	_VND_REQ_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CMD_REPORT_ID_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r12, %r14
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, (%r12,%rcx,4)
	movq	_VND_SET_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CMD_TYPE_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r12,%rcx,4)
	movq	_CMD_INDEX_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r12,%rax,4), %rsi
	movq	%r13, %rdi
	callq	_put_unaligned_le16
	movq	_CMD_LENGTH_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r12,%rax,4), %rsi
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_put_unaligned_le32
	movq	_CMD_DATA_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r12,%rax,4), %rdi
	movq	%r14, %r15
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wdt87xx_set_feature
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%r13d, %ebx
	movq	_WDT_FLASH_WRITE_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mdelay
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	testb	$31, %r14b
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$20, %edi
	callq	_msleep
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SIZE,4,2               ## @PKT_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"addr & len must be 4 bytes aligned %x, %x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PACKET_SIZE,4,2                ## @PACKET_SIZE
	.comm	_VND_REQ_WRITE,4,2              ## @VND_REQ_WRITE
	.comm	_CMD_REPORT_ID_OFFSET,8,3       ## @CMD_REPORT_ID_OFFSET
	.comm	_VND_SET_DATA,4,2               ## @VND_SET_DATA
	.comm	_CMD_TYPE_OFFSET,8,3            ## @CMD_TYPE_OFFSET
	.comm	_CMD_INDEX_OFFSET,8,3           ## @CMD_INDEX_OFFSET
	.comm	_CMD_LENGTH_OFFSET,8,3          ## @CMD_LENGTH_OFFSET
	.comm	_CMD_DATA_OFFSET,8,3            ## @CMD_DATA_OFFSET
	.comm	_WDT_FLASH_WRITE_DELAY_MS,4,2   ## @WDT_FLASH_WRITE_DELAY_MS
	.no_dead_strip	_wdt87xx_write_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wdt87xx_write_data
_wdt87xx_write_data:                    ; @wdt87xx_write_data
	.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	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, 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	w12, [x8]
	lsl	x8, x12, #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	x23, x9, x8
	mov	sp, x23
	orr	w8, w3, w2
	tst	w8, #0x3
	b.eq	LBB0_2
; %bb.1:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	cbz	w19, LBB0_8
; %bb.3:
	lsl	w24, w12, #2
	mov	w26, #1
Lloh13:
	adrp	x27, _CMD_LENGTH_OFFSET@GOTPAGE
Lloh14:
	ldr	x27, [x27, _CMD_LENGTH_OFFSET@GOTPAGEOFF]
Lloh15:
	adrp	x28, _CMD_DATA_OFFSET@GOTPAGE
Lloh16:
	ldr	x28, [x28, _CMD_DATA_OFFSET@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, x25
	add	w20, w20, w25
	add	w26, w26, #1
	cbz	w19, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh17:
	adrp	x8, _PACKET_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PACKET_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_min
	mov	x25, x0
Lloh20:
	adrp	x8, _VND_REQ_WRITE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VND_REQ_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _CMD_REPORT_ID_OFFSET@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CMD_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	str	w8, [x23, x9, lsl #2]
Lloh26:
	adrp	x8, _VND_SET_DATA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VND_SET_DATA@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _CMD_TYPE_OFFSET@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CMD_TYPE_OFFSET@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	str	w8, [x23, x9, lsl #2]
Lloh32:
	adrp	x8, _CMD_INDEX_OFFSET@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CMD_INDEX_OFFSET@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	add	x1, x23, x8, lsl #2
	bl	_put_unaligned_le16
	ldr	x8, [x27]
	add	x1, x23, x8, lsl #2
	mov	x0, x20
	bl	_put_unaligned_le32
	ldr	x8, [x28]
	add	x0, x23, x8, lsl #2
	mov	x1, x22
	mov	x2, x25
	bl	_memcpy
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_wdt87xx_set_feature
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w19, w19, w25
Lloh35:
	adrp	x8, _WDT_FLASH_WRITE_DELAY_MS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _WDT_FLASH_WRITE_DELAY_MS@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_mdelay
	tst	w26, #0x1f
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #20
	bl	_msleep
	b	LBB0_4
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SIZE,4,2               ; @PKT_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"addr & len must be 4 bytes aligned %x, %x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PACKET_SIZE,4,2                ; @PACKET_SIZE
	.comm	_VND_REQ_WRITE,4,2              ; @VND_REQ_WRITE
	.comm	_CMD_REPORT_ID_OFFSET,8,3       ; @CMD_REPORT_ID_OFFSET
	.comm	_VND_SET_DATA,4,2               ; @VND_SET_DATA
	.comm	_CMD_TYPE_OFFSET,8,3            ; @CMD_TYPE_OFFSET
	.comm	_CMD_INDEX_OFFSET,8,3           ; @CMD_INDEX_OFFSET
	.comm	_CMD_LENGTH_OFFSET,8,3          ; @CMD_LENGTH_OFFSET
	.comm	_CMD_DATA_OFFSET,8,3            ; @CMD_DATA_OFFSET
	.comm	_WDT_FLASH_WRITE_DELAY_MS,4,2   ; @WDT_FLASH_WRITE_DELAY_MS
	.no_dead_strip	_wdt87xx_write_data
.subsections_via_symbols
