	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function client_close
_client_close:                          ## @client_close
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_printf
	xorl	%edi, %edi
	callq	_fflush
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_CMD_CLOSE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	$8, -32(%rbp)
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_rsend
	movl	%eax, %ebx
	cmpl	-32(%rbp), %eax
	jne	LBB0_3
## %bb.1:
	movl	(%r15), %edx
	leaq	-32(%rbp), %rsi
	movl	%r14d, %edi
	callq	_msg_get_resp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%ebx, %ebx
LBB0_3:
	movq	_file_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_bytes@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_munmap
	movq	_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_close
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"closing..."

	.comm	_CMD_CLOSE,4,2                  ## @CMD_CLOSE
	.comm	_file_addr,4,2                  ## @file_addr
	.comm	_bytes,4,2                      ## @bytes
	.comm	_fd,4,2                         ## @fd
L_str:                                  ## @str
	.asciz	"done"

	.no_dead_strip	_client_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function client_close
_client_close:                          ; @client_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	x0, #0
	bl	_fflush
	mov	w20, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh2:
	adrp	x21, _CMD_CLOSE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CMD_CLOSE@GOTPAGEOFF]
	ldr	w8, [x21]
	stp	w20, w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	mov	w3, #0
	bl	_rsend
	mov	x20, x0
	ldr	w8, [sp, #8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x19
	bl	_msg_get_resp
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_3:
Lloh6:
	adrp	x8, _file_addr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _file_addr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _bytes@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bytes@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_munmap
Lloh12:
	adrp	x8, _fd@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_close
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"closing..."

	.comm	_CMD_CLOSE,4,2                  ; @CMD_CLOSE
	.comm	_file_addr,4,2                  ; @file_addr
	.comm	_bytes,4,2                      ; @bytes
	.comm	_fd,4,2                         ; @fd
l_str:                                  ; @str
	.asciz	"done"

	.no_dead_strip	_client_close
.subsections_via_symbols
