	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_file_segment_new      ## -- Begin function evbuffer_file_segment_new
	.p2align	4, 0x90
_evbuffer_file_segment_new:             ## @evbuffer_file_segment_new
	.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
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %r13d
	movl	$48, %edi
	movl	$1, %esi
	callq	_mm_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %rbx
	movl	$1, (%rax)
	movl	%r13d, 4(%rax)
	movl	%r14d, 8(%rax)
	movl	%r15d, 12(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rax)
	cmpl	$-1, %r12d
	jne	LBB0_4
## %bb.2:
	leaq	-48(%rbp), %rsi
	movl	%r13d, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_11
## %bb.3:
	movl	-48(%rbp), %r12d
LBB0_4:
	movl	%r12d, 16(%rbx)
	testl	%r15d, %r15d
	js	LBB0_11
## %bb.5:
	testl	%r12d, %r12d
	js	LBB0_11
## %bb.6:
	movq	_EVBUFFER_CHAIN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%r12d, %eax
	jl	LBB0_11
## %bb.7:
	cmpl	%r15d, %eax
	jl	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_evbuffer_file_segment_materialize
	testq	%rax, %rax
	js	LBB0_11
## %bb.9:
	movq	_EVBUF_FS_DISABLE_LOCKING@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_13
## %bb.10:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	callq	_EVTHREAD_ALLOC_LOCK
	jmp	LBB0_13
LBB0_11:
	movq	%rbx, %rdi
	callq	_mm_free
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVBUFFER_CHAIN_MAX,4,2         ## @EVBUFFER_CHAIN_MAX
	.comm	_EVBUF_FS_DISABLE_LOCKING,4,2   ## @EVBUF_FS_DISABLE_LOCKING
	.comm	_EVBUF_FS_DISABLE_SENDFILE,4,2  ## @EVBUF_FS_DISABLE_SENDFILE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evbuffer_file_segment_new      ; -- Begin function evbuffer_file_segment_new
	.p2align	2
_evbuffer_file_segment_new:             ; @evbuffer_file_segment_new
	.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	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x23, x0
	mov	w24, #1
	mov	w0, #48
	mov	w1, #1
	bl	_mm_calloc
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.1:
	stp	w24, w23, [x19]
	stp	w20, w21, [x19, #8]
	stp	xzr, xzr, [x19, #32]
	cmn	w22, #1
	b.eq	LBB0_3
; %bb.2:
	str	w22, [x19, #16]
	tbz	w21, #31, LBB0_5
	b	LBB0_10
LBB0_3:
	add	x1, sp, #8
	mov	x0, x23
	bl	_fstat
	tbnz	x0, #63, LBB0_10
; %bb.4:
	ldr	w22, [sp, #8]
	str	w22, [x19, #16]
	tbnz	w21, #31, LBB0_10
LBB0_5:
	tbnz	w22, #31, LBB0_10
; %bb.6:
Lloh0:
	adrp	x8, _EVBUFFER_CHAIN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVBUFFER_CHAIN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	subs	w8, w8, w22
	ccmp	w8, w21, #8, ge
	b.lt	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_evbuffer_file_segment_materialize
	tbnz	x0, #63, LBB0_10
; %bb.8:
Lloh3:
	adrp	x8, _EVBUF_FS_DISABLE_LOCKING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVBUF_FS_DISABLE_LOCKING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_11
; %bb.9:
	ldr	w0, [x19, #24]
	mov	w1, #0
	bl	_EVTHREAD_ALLOC_LOCK
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_mm_free
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EVBUFFER_CHAIN_MAX,4,2         ; @EVBUFFER_CHAIN_MAX
	.comm	_EVBUF_FS_DISABLE_LOCKING,4,2   ; @EVBUF_FS_DISABLE_LOCKING
	.comm	_EVBUF_FS_DISABLE_SENDFILE,4,2  ; @EVBUF_FS_DISABLE_SENDFILE
.subsections_via_symbols
