	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function server_open
_server_open:                           ## @server_open
	.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	%rsi, %r15
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	xorl	%edi, %edi
	callq	_fflush
	movq	_file_addr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_fd@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jg	LBB0_2
## %bb.3:
	movl	(%r15), %ebx
	addl	$-8, %ebx
	movl	%ebx, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	%r14d, %edi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	__recv
	cmpl	%ebx, %eax
	jne	LBB0_6
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r13d, %r13d
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	xorl	%edi, %edi
	callq	_fflush
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	4(%r15), %edx
	movq	%r12, %rdi
	callq	_open
	movq	_fd@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jns	LBB0_10
## %bb.8:
	leaq	L_str.6(%rip), %rdi
	jmp	LBB0_9
LBB0_2:
	leaq	L_str.8(%rip), %rdi
	callq	_puts
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_11
LBB0_4:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r13d
	leaq	L_str.7(%rip), %rdi
LBB0_9:
	callq	_puts
LBB0_10:
	movq	%r12, %rdi
	callq	_free
LBB0_11:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_msg_send_resp
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"opening: "

	.comm	_file_addr,8,3                  ## @file_addr
	.comm	_fd,8,3                         ## @fd
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.4:                               ## @.str.4
	.asciz	"%s, "

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_errno,4,2                      ## @errno
L_str:                                  ## @str
	.asciz	"cannot allocate path name"

L_str.6:                                ## @str.6
	.asciz	"unable to open destination file"

L_str.7:                                ## @str.7
	.asciz	"error receiving path"

L_str.8:                                ## @str.8
	.asciz	"cannot open another file"

	.no_dead_strip	_server_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function server_open
_server_open:                           ; @server_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	x0, #0
	bl	_fflush
Lloh2:
	adrp	x8, _file_addr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _file_addr@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x24, _fd@GOTPAGE
Lloh6:
	ldr	x24, [x24, _fd@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, #0
	ccmp	x9, #1, #0, eq
	b.lt	LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_str.8@PAGE
Lloh8:
	add	x0, x0, l_str.8@PAGEOFF
	bl	_puts
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	b	LBB0_10
LBB0_2:
	ldr	w8, [x19]
	sub	w23, w8, #8
	mov	x0, x23
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	__recv
	cmp	w0, w23
	b.ne	LBB0_7
; %bb.4:
	str	x21, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	mov	x0, #0
	bl	_fflush
Lloh14:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w2, [x19, #4]
	mov	x0, x21
	bl	_open
	mov	w22, #0
	str	x0, [x24]
	tbz	x0, #63, LBB0_9
; %bb.5:
Lloh23:
	adrp	x0, l_str.6@PAGE
Lloh24:
	add	x0, x0, l_str.6@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh25:
	adrp	x0, l_str@PAGE
Lloh26:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w22, [x8]
	b	LBB0_10
LBB0_7:
	mov	x22, x0
Lloh30:
	adrp	x0, l_str.7@PAGE
Lloh31:
	add	x0, x0, l_str.7@PAGEOFF
LBB0_8:
	bl	_puts
LBB0_9:
	mov	x0, x21
	bl	_free
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_msg_send_resp
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"opening: "

	.comm	_file_addr,8,3                  ; @file_addr
	.comm	_fd,8,3                         ; @fd
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.4:                               ; @.str.4
	.asciz	"%s, "

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_errno,4,2                      ; @errno
l_str:                                  ; @str
	.asciz	"cannot allocate path name"

l_str.6:                                ; @str.6
	.asciz	"unable to open destination file"

l_str.7:                                ; @str.7
	.asciz	"error receiving path"

l_str.8:                                ; @str.8
	.asciz	"cannot open another file"

	.no_dead_strip	_server_open
.subsections_via_symbols
