	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_malloc_internal
_pg_malloc_internal:                    ## @pg_malloc_internal
	.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, %r15d
	testq	%rdi, %rdi
	movl	$1, %ebx
	cmovneq	%rdi, %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_MCXT_ALLOC_ZERO@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_MemSet
	jmp	LBB0_5
LBB0_1:
	movq	_MCXT_ALLOC_NO_OOM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
LBB0_5:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MCXT_ALLOC_NO_OOM,4,2          ## @MCXT_ALLOC_NO_OOM
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_MCXT_ALLOC_ZERO,4,2            ## @MCXT_ALLOC_ZERO
	.no_dead_strip	_pg_malloc_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_malloc_internal
_pg_malloc_internal:                    ; @pg_malloc_internal
	.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	x21, x1
	cmp	x0, #0
	csinc	x20, x0, xzr, ne
	mov	x0, x20
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MCXT_ALLOC_ZERO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCXT_ALLOC_ZERO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_MemSet
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _MCXT_ALLOC_NO_OOM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCXT_ALLOC_NO_OOM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
LBB0_4:
	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
	ret
LBB0_5:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x19
	bl	_fprintf
Lloh11:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MCXT_ALLOC_NO_OOM,4,2          ; @MCXT_ALLOC_NO_OOM
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_MCXT_ALLOC_ZERO,4,2            ; @MCXT_ALLOC_ZERO
	.no_dead_strip	_pg_malloc_internal
.subsections_via_symbols
