	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function allocate_mbuf_chain
_allocate_mbuf_chain:                   ## @allocate_mbuf_chain
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	callq	_atoi
	movl	%eax, %r14d
	movq	_random_aligned@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_rand
                                        ## kill: def $eax killed $eax def $rax
	leal	63(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$-64, %ecx
	subl	%ecx, %eax
	movslq	%eax, %r12
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	xorl	%r12d, %r12d
LBB0_5:
	leal	(%r14,%r12), %edi
	addl	$4, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_7:
	leaq	(%rbx,%r12), %rax
	addq	$4, %rax
	movq	%rax, (%rbx)
	movl	%r14d, 8(%rbx)
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_allocate_mbuf_chain
	movq	%rax, 16(%rbx)
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_random_aligned,8,3             ## @random_aligned
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc failed"

	.no_dead_strip	_allocate_mbuf_chain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function allocate_mbuf_chain
_allocate_mbuf_chain:                   ; @allocate_mbuf_chain
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_atoi
	mov	x20, x0
Lloh0:
	adrp	x8, _random_aligned@GOTPAGE
Lloh1:
	ldr	x8, [x8, _random_aligned@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	bl	_rand
	negs	w8, w0
	and	w8, w8, #0x3f
	and	w9, w0, #0x3f
	csneg	w8, w9, w8, mi
	sxtw	x22, w8
	b	LBB0_5
LBB0_3:
	mov	x21, #0
	b	LBB0_8
LBB0_4:
	mov	x22, #0
LBB0_5:
	add	w8, w20, w22
	add	w0, w8, #4
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_7:
	add	x8, x21, x22
	add	x8, x8, #4
	str	x8, [x21]
	str	w20, [x21, #8]
	add	x0, x19, #8
	bl	_allocate_mbuf_chain
	str	x0, [x21, #16]
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_random_aligned,8,3             ; @random_aligned
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc failed"

	.no_dead_strip	_allocate_mbuf_chain
.subsections_via_symbols
