	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_msg_buffer               ## -- Begin function alloc_msg_buffer
	.p2align	4, 0x90
_alloc_msg_buffer:                      ## @alloc_msg_buffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_buffer_size_values@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_init_buffer_chunk_headers
	movl	(%r15), %edx
LBB0_2:
	leal	-1(%rdx), %eax
	movq	_ChunkHeaders@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.3:
	cmpl	$2, %edx
	jl	LBB0_8
## %bb.4:
	movl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, -4(%rcx,%rax,4)
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	decq	%rax
	leaq	1(%rax), %rdx
	cmpq	$1, %rdx
	ja	LBB0_5
## %bb.7:
	xorl	%eax, %eax
LBB0_8:
	cltq
	leaq	(%rcx,%rax,4), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alloc_msg_buffer_internal      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_buffer_size_values,4,2         ## @buffer_size_values
	.comm	_ChunkHeaders,8,3               ## @ChunkHeaders
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_msg_buffer               ; -- Begin function alloc_msg_buffer
	.p2align	2
_alloc_msg_buffer:                      ; @alloc_msg_buffer
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _buffer_size_values@GOTPAGE
Lloh1:
	ldr	x21, [x21, _buffer_size_values@GOTPAGEOFF]
	ldr	w10, [x21]
	cbnz	w10, LBB0_2
; %bb.1:
	bl	_init_buffer_chunk_headers
	ldr	w10, [x21]
LBB0_2:
	sub	w9, w10, #1
Lloh2:
	adrp	x8, _ChunkHeaders@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ChunkHeaders@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	tbnz	w20, #31, LBB0_8
; %bb.3:
	cmp	w10, #2
	b.lt	LBB0_8
; %bb.4:
	sub	x10, x8, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cmp	w11, w20
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x9, x9, #1
	add	x11, x9, #1
	cmp	x11, #1
	b.hi	LBB0_5
; %bb.7:
	mov	w9, #0
LBB0_8:
	add	x1, x8, w9, sxtw #2
	mov	x0, x19
	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
	b	_alloc_msg_buffer_internal
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_buffer_size_values,4,2         ; @buffer_size_values
	.comm	_ChunkHeaders,8,3               ; @ChunkHeaders
.subsections_via_symbols
