	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raise_file_rlimit              ## -- Begin function raise_file_rlimit
	.p2align	4, 0x90
_raise_file_rlimit:                     ## @raise_file_rlimit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	movq	_RLIMIT_NOFILE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	-24(%rbp), %rsi
	callq	_getrlimit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_2:
	movl	-24(%rbp), %eax
	cmpl	%ebx, %eax
	jge	LBB0_4
## %bb.3:
	addl	$3, %ebx
	movl	%ebx, -24(%rbp)
	movl	%ebx, %eax
LBB0_4:
	cmpl	%eax, -20(%rbp)
	jge	LBB0_6
## %bb.5:
	movl	%eax, -20(%rbp)
LBB0_6:
	movl	(%r14), %edi
	leaq	-24(%rbp), %rsi
	callq	_setrlimit
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_kprintf
	movl	$-1, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_RLIMIT_NOFILE,4,2              ## @RLIMIT_NOFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to getrlimit number of files\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to set rlimit for open files. Try running as root or requesting smaller maxconns value.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raise_file_rlimit              ; -- Begin function raise_file_rlimit
	.p2align	2
_raise_file_rlimit:                     ; @raise_file_rlimit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _RLIMIT_NOFILE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RLIMIT_NOFILE@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_getrlimit
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
	ldr	w8, [sp, #8]
	cmp	w8, w19
	b.ge	LBB0_4
; %bb.3:
	add	w8, w19, #3
	str	w8, [sp, #8]
LBB0_4:
	ldr	w9, [sp, #12]
	cmp	w9, w8
	b.ge	LBB0_6
; %bb.5:
	str	w8, [sp, #12]
LBB0_6:
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_setrlimit
	cbz	x0, LBB0_9
; %bb.7:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_kprintf
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RLIMIT_NOFILE,4,2              ; @RLIMIT_NOFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to getrlimit number of files\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to set rlimit for open files. Try running as root or requesting smaller maxconns value.\n"

.subsections_via_symbols
