	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zlog_stream_buf_alloc_ex
_zlog_stream_buf_alloc_ex:              ## @zlog_stream_buf_alloc_ex
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
LBB0_2:
	cmpq	$0, 16(%rbx)
	movq	_zlog_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	je	LBB0_4
## %bb.3:
	addq	%rdi, %rdi
	callq	_MAX
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_MIN
	movq	%rax, %r14
	movq	16(%rbx), %rdi
	movq	%rax, %rsi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	%rax, 16(%rbx)
	movq	%r14, 8(%rbx)
	movl	$1, %eax
	jmp	LBB0_8
LBB0_4:
	callq	_MAX
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_MIN
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_malloc
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_zlog_limit,4,2                 ## @zlog_limit
	.no_dead_strip	_zlog_stream_buf_alloc_ex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zlog_stream_buf_alloc_ex
_zlog_stream_buf_alloc_ex:              ; @zlog_stream_buf_alloc_ex
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19]
LBB0_2:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _zlog_limit@GOTPAGE
Lloh1:
	ldr	x9, [x9, _zlog_limit@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x9]
	cbz	x8, LBB0_6
; %bb.3:
	lsl	x0, x0, #1
	bl	_MAX
	mov	x1, x0
	mov	x0, x20
	bl	_MIN
	mov	x20, x0
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_realloc
	cbz	x0, LBB0_5
LBB0_4:
	stp	x20, x0, [x19, #8]
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	_MAX
	mov	x1, x0
	mov	x0, x20
	bl	_MIN
	mov	x20, x0
	bl	_malloc
	cbnz	x0, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_zlog_limit,4,2                 ; @zlog_limit
	.no_dead_strip	_zlog_stream_buf_alloc_ex
.subsections_via_symbols
