	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_Flush_r                  ## -- Begin function LSAPI_Flush_r
	.p2align	4, 0x90
_LSAPI_Flush_r:                         ## @LSAPI_Flush_r
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	4(%rdi), %eax
	jne	LBB0_4
## %bb.3:
	movq	8(%rbx), %rcx
	xorl	%eax, %eax
	cmpq	16(%rbx), %rcx
	je	LBB0_16
LBB0_4:
	cmpl	$-1, 24(%rbx)
	je	LBB0_5
## %bb.6:
	movq	_LSAPI_ST_RESP_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 36(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_LSAPI_FinalizeRespHeaders_r
LBB0_8:
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_Flush_RespBuf_r
LBB0_10:
	movl	(%rbx), %edx
	subl	4(%rbx), %edx
	jle	LBB0_11
## %bb.12:
	leaq	4(%rbx), %rsi
	movl	24(%rbx), %edi
	movl	28(%rbx), %ecx
	callq	_lsapi_writev
	cmpl	28(%rbx), %eax
	jge	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	callq	_lsapi_close_connection
	jmp	LBB0_14
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_5:
	movq	16(%rbx), %rax
	movq	%rax, 8(%rbx)
LBB0_14:
	movl	$-1, %eax
LBB0_15:
	movl	$0, 28(%rbx)
	movl	32(%rbx), %ecx
	movl	%ecx, 4(%rbx)
	movl	%ecx, (%rbx)
	jmp	LBB0_16
LBB0_11:
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LSAPI_ST_RESP_HEADER,4,2       ## @LSAPI_ST_RESP_HEADER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_Flush_r                  ; -- Begin function LSAPI_Flush_r
	.p2align	2
_LSAPI_Flush_r:                         ; @LSAPI_Flush_r
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	mov	x20, x0
	ldr	w9, [x20, #4]!
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_3:
	ldr	w8, [x19, #24]
	cmn	w8, #1
	b.eq	LBB0_13
; %bb.4:
	ldr	w8, [x19, #36]
Lloh0:
	adrp	x9, _LSAPI_ST_RESP_HEADER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LSAPI_ST_RESP_HEADER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_LSAPI_FinalizeRespHeaders_r
LBB0_6:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_Flush_RespBuf_r
LBB0_8:
	ldp	w8, w9, [x19]
	sub	w2, w8, w9
	cmp	w2, #1
	b.lt	LBB0_12
; %bb.9:
	ldp	w0, w3, [x19, #24]
	mov	x1, x20
	bl	_lsapi_writev
	ldr	w8, [x19, #28]
	cmp	w0, w8
	b.ge	LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_lsapi_close_connection
	b	LBB0_14
LBB0_11:
	mov	w0, #-1
	b	LBB0_16
LBB0_12:
	mov	w0, #0
	b	LBB0_16
LBB0_13:
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
LBB0_14:
	mov	w0, #-1
LBB0_15:
	str	wzr, [x19, #28]
	ldr	w8, [x19, #32]
	stp	w8, w8, [x19]
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LSAPI_ST_RESP_HEADER,4,2       ; @LSAPI_ST_RESP_HEADER
.subsections_via_symbols
