	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_mem
_read_mem:                              ## @read_mem
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rdi, -24(%rbp)
	movq	%rsi, -40(%rbp)
	movq	%rsi, %rdi
	callq	_malloc
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_CHELSIO_T4_GET_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rsi
	callq	_doit
	movl	%eax, %ebx
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:
	movq	-40(%rbp), %rsi
	movq	-32(%rbp), %rdi
	callq	*%r14
LBB0_5:
	movq	-32(%rbp), %rdi
	callq	_free
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read_mem: malloc"

	.comm	_errno,4,2                      ## @errno
	.comm	_CHELSIO_T4_GET_MEM,4,2         ## @CHELSIO_T4_GET_MEM
	.no_dead_strip	_read_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_mem
_read_mem:                              ; @read_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x2
	str	x0, [sp, #24]
	str	x1, [sp, #8]
	mov	x0, x1
	bl	_malloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _CHELSIO_T4_GET_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHELSIO_T4_GET_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_doit
	mov	x20, x0
	cbz	x19, LBB0_4
; %bb.2:
	cbnz	w20, LBB0_4
; %bb.3:
	ldp	x1, x0, [sp, #8]
	blr	x19
LBB0_4:
	ldr	x0, [sp, #16]
	bl	_free
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read_mem: malloc"

	.comm	_errno,4,2                      ; @errno
	.comm	_CHELSIO_T4_GET_MEM,4,2         ; @CHELSIO_T4_GET_MEM
	.no_dead_strip	_read_mem
.subsections_via_symbols
