	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fcopy_handle_handshake
_fcopy_handle_handshake:                ## @fcopy_handle_handshake
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	movq	_FCOPY_CURRENT_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	cmpl	$129, %edi
	je	LBB0_6
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_5
## %bb.2:
	movq	_hvt@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_fcopy_register_done@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-12(%rbp), %rsi
	movl	$4, %edx
	callq	_hvutil_transport_send
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_6:
	movq	_dm_reg_value@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_debug
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCOPY_CURRENT_VERSION,4,2      ## @FCOPY_CURRENT_VERSION
	.comm	_dm_reg_value,4,2               ## @dm_reg_value
	.comm	_hvt,4,2                        ## @hvt
	.comm	_fcopy_register_done,4,2        ## @fcopy_register_done
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FCP: userspace daemon ver. %d connected\n"

	.no_dead_strip	_fcopy_handle_handshake
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fcopy_handle_handshake
_fcopy_handle_handshake:                ; @fcopy_handle_handshake
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _FCOPY_CURRENT_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCOPY_CURRENT_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	cmp	w0, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w19, #128
	b.ne	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _hvt@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hvt@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _fcopy_register_done@GOTPAGE
Lloh7:
	ldr	x8, [x8, _fcopy_register_done@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x1, sp, #12
	mov	w2, #4
	bl	_hvutil_transport_send
	cbz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _dm_reg_value@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dm_reg_value@GOTPAGEOFF]
Lloh13:
	str	w19, [x8]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FCOPY_CURRENT_VERSION,4,2      ; @FCOPY_CURRENT_VERSION
	.comm	_dm_reg_value,4,2               ; @dm_reg_value
	.comm	_hvt,4,2                        ; @hvt
	.comm	_fcopy_register_done,4,2        ; @fcopy_register_done
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FCP: userspace daemon ver. %d connected\n"

	.no_dead_strip	_fcopy_handle_handshake
.subsections_via_symbols
