	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function close_unused_fd
_close_unused_fd:                       ## @close_unused_fd
	.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	%edi, %r14d
	movq	_max_connection@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	cmpl	$3, %eax
	jge	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	movl	$3, %ebx
LBB0_2:
	cmpl	%r14d, %ebx
	jge	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	%ebx, %r14d
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_fd_try_close
	testq	%rax, %rax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_vkprintf
	incl	%r15d
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vkprintf                       ## TAILCALL
LBB0_8:
	movl	$3, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	leal	1(%r12), %ebx
	cmpl	%eax, %r12d
	movl	%ebx, %r12d
	jge	LBB0_2
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, %r14d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r12d, %edi
	callq	_fd_try_close
	addl	%eax, %r15d
	movl	(%r13), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_max_connection,4,2             ## @max_connection
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"close_unused_fd: found resourse leakage (fd:%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"close_unused_fd: close %d fd(s)\n"

	.no_dead_strip	_close_unused_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function close_unused_fd
_close_unused_fd:                       ; @close_unused_fd
	.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
	mov	x20, x0
Lloh0:
	adrp	x23, _max_connection@GOTPAGE
Lloh1:
	ldr	x23, [x23, _max_connection@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #3
	b.ge	LBB0_8
; %bb.1:
	mov	w19, #0
	mov	w21, #3
LBB0_2:
	cmp	w21, w20
	b.ge	LBB0_7
; %bb.3:
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	cmp	w20, w21
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_fd_try_close
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	mov	x1, x22
	mov	x2, x21
	bl	_vkprintf
	add	w19, w19, #1
	b	LBB0_4
LBB0_7:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	mov	x2, 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	_vkprintf
LBB0_8:
	mov	w19, #0
	mov	w22, #3
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w21, w22, #1
	cmp	w22, w8
	mov	x22, x21
	b.ge	LBB0_2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	w20, w22
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_fd_try_close
	add	w19, w19, w0
	ldr	w8, [x23]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_max_connection,4,2             ; @max_connection
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"close_unused_fd: found resourse leakage (fd:%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"close_unused_fd: close %d fd(s)\n"

	.no_dead_strip	_close_unused_fd
.subsections_via_symbols
