	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsp1_reset_wpf                 ## -- Begin function vsp1_reset_wpf
	.p2align	4, 0x90
_vsp1_reset_wpf:                        ## @vsp1_reset_wpf
	.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	%esi, %r15d
	movq	%rdi, %r12
	movq	_VI6_STATUS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	xorl	%r14d, %r14d
	testl	%ebx, %eax
	je	LBB0_12
## %bb.1:
	movq	_VI6_SRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_VI6_SRESET_SRTS
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_vsp1_write
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.2:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.3:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.5:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.7:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.8:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.9:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.10:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_vsp1_read
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_VI6_STATUS_SYS_ACT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.11:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VI6_STATUS,4,2                 ## @VI6_STATUS
	.comm	_VI6_SRESET,4,2                 ## @VI6_SRESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset wpf.%u\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsp1_reset_wpf                 ; -- Begin function vsp1_reset_wpf
	.p2align	2
_vsp1_reset_wpf:                        ; @vsp1_reset_wpf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _VI6_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VI6_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.1:
Lloh2:
	adrp	x8, _VI6_SRESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VI6_SRESET@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_VI6_SRESET_SRTS
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_vsp1_write
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.2:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.3:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.4:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.5:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.6:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.7:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.8:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.9:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.10:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vsp1_read
	mov	x21, x0
	mov	x0, x19
	bl	_VI6_STATUS_SYS_ACT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VI6_STATUS,4,2                 ; @VI6_STATUS
	.comm	_VI6_SRESET,4,2                 ; @VI6_SRESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reset wpf.%u\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
