	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_sendfile_r               ## -- Begin function LSAPI_sendfile_r
	.p2align	4, 0x90
_LSAPI_sendfile_r:                      ## @LSAPI_sendfile_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	%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
	cmpl	$-1, %esi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$-1, (%rdi)
	je	LBB0_5
## %bb.2:
	movq	%rcx, %r15
	movl	%esi, %r12d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %r13
	movl	4(%rbx), %eax
	movq	_LSAPI_ST_RESP_HEADER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_LSAPI_FinalizeRespHeaders_r
	movl	4(%rbx), %eax
LBB0_4:
	movq	_LSAPI_ST_RESP_BODY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_LSAPI_Flush_r
	movq	_LSAPI_RESP_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LSAPI_PACKET_HEADER_LEN@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	addq	%r15, %rdx
	movq	%r13, %rdi
	callq	_lsapi_buildPacketHeader
	movl	(%rbx), %edi
	movq	(%r14), %rdx
	movq	%r13, %rsi
	callq	_write
	cmpq	(%r14), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_5
## %bb.6:
	movl	(%rbx), %edi
	movl	%r12d, %esi
	movq	%r15, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gsendfile                      ## TAILCALL
LBB0_5:
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LSAPI_ST_RESP_HEADER,4,2       ## @LSAPI_ST_RESP_HEADER
	.comm	_LSAPI_ST_RESP_BODY,4,2         ## @LSAPI_ST_RESP_BODY
	.comm	_LSAPI_RESP_STREAM,4,2          ## @LSAPI_RESP_STREAM
	.comm	_LSAPI_PACKET_HEADER_LEN,8,3    ## @LSAPI_PACKET_HEADER_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_sendfile_r               ; -- Begin function LSAPI_sendfile_r
	.p2align	2
_LSAPI_sendfile_r:                      ; @LSAPI_sendfile_r
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cmn	w1, #1
	b.eq	LBB0_6
; %bb.1:
	mov	x22, x0
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.2:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x23, [x22, #8]
	ldr	w8, [x22, #4]
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_4
; %bb.3:
	mov	x0, x22
	bl	_LSAPI_FinalizeRespHeaders_r
	ldr	w8, [x22, #4]
LBB0_4:
Lloh3:
	adrp	x9, _LSAPI_ST_RESP_BODY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LSAPI_ST_RESP_BODY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x22, #4]
	mov	x0, x22
	bl	_LSAPI_Flush_r
Lloh6:
	adrp	x8, _LSAPI_RESP_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LSAPI_RESP_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x24, _LSAPI_PACKET_HEADER_LEN@GOTPAGE
Lloh10:
	ldr	x24, [x24, _LSAPI_PACKET_HEADER_LEN@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x2, x8, x19
	mov	x0, x23
	bl	_lsapi_buildPacketHeader
	ldr	w0, [x22]
	ldr	x2, [x24]
	mov	x1, x23
	bl	_write
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_gsendfile
LBB0_6:
	mov	w0, #-1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LSAPI_ST_RESP_HEADER,4,2       ; @LSAPI_ST_RESP_HEADER
	.comm	_LSAPI_ST_RESP_BODY,4,2         ; @LSAPI_ST_RESP_BODY
	.comm	_LSAPI_RESP_STREAM,4,2          ; @LSAPI_RESP_STREAM
	.comm	_LSAPI_PACKET_HEADER_LEN,8,3    ; @LSAPI_PACKET_HEADER_LEN
.subsections_via_symbols
