	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fdtable_resize
_fdtable_resize:                        ## @fdtable_resize
	.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	%esi, %r14d
	movq	%rdi, %r13
	xorl	%edi, %edi
	cmpl	%esi, (%r13)
	setb	%dil
	callq	_assert
	leal	(,%r14,8), %ebx
	movl	%ebx, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	16(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movl	(%r13), %edx
	shll	$3, %edx
	movq	%r15, %rdi
	callq	_memcpy
LBB0_4:
	movl	%r14d, %edi
	callq	_BITS_SIZE
	movl	%eax, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_BITS_SIZE
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r13), %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_BITS_SIZE
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_memcpy
LBB0_8:
	movq	16(%r13), %rdi
	callq	_free
	movq	%r15, 16(%r13)
	movq	8(%r13), %rdi
	callq	_free
	movq	%r12, 8(%r13)
	movl	%r14d, (%r13)
	jmp	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	callq	_free
LBB0_1:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__ENOMEM,4,2                    ## @_ENOMEM
	.no_dead_strip	_fdtable_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fdtable_resize
_fdtable_resize:                        ; @fdtable_resize
	.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	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w1
	cset	w0, lo
	bl	_assert
	lsl	w22, w19, #3
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_3
; %bb.2:
	ldr	w8, [x20]
	lsl	w2, w8, #3
	mov	x0, x21
	bl	_memcpy
LBB0_3:
	mov	x0, x19
	bl	_BITS_SIZE
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	mov	x0, x19
	bl	_BITS_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	w1, #0
	bl	_memset
	ldr	x23, [x20, #8]
	cbz	x23, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	bl	_BITS_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_memcpy
LBB0_6:
	ldr	x0, [x20, #16]
	bl	_free
	str	x21, [x20, #16]
	ldr	x0, [x20, #8]
	bl	_free
	mov	w0, #0
	str	x22, [x20, #8]
	str	w19, [x20]
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_free
LBB0_8:
Lloh0:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	__ENOMEM,4,2                    ; @_ENOMEM
	.no_dead_strip	_fdtable_resize
.subsections_via_symbols
