	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perform_read
_perform_read:                          ## @perform_read
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r13d
	movl	4(%rsi), %ebx
	addl	(%rsi), %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_bzero
	movl	12(%r12), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.3:
	movl	4(%r12), %edx
	testl	%edx, %edx
	jle	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_memcpy
LBB0_5:
	leal	1(%rbx), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_bzero
	movl	8(%r12), %r8d
	movl	%r13d, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	__read_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.10:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	__do_data_output
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_1:
	movl	$-1, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_6:
	movl	$-2, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_9:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_perform_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perform_read
_perform_read:                          ; @perform_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x23, x0
	ldp	w8, w9, [x1]
	add	w22, w9, w8
	mov	x0, x22
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	bl	_bzero
	ldr	w1, [x20, #12]
	cbz	w1, LBB0_4
; %bb.2:
	ldr	w2, [x20, #4]
	cmp	w2, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_memcpy
LBB0_4:
	add	w0, w22, #1
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_10
; %bb.5:
	mov	x0, x21
	mov	x1, x22
	bl	_bzero
	ldr	w4, [x20, #8]
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	__read_write
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	bl	__do_data_output
LBB0_8:
	mov	x22, x0
	b	LBB0_12
LBB0_9:
	mov	x21, #0
	mov	w22, #-1
	b	LBB0_12
LBB0_10:
	mov	w22, #-2
	b	LBB0_12
LBB0_11:
	mov	w22, #0
LBB0_12:
	mov	x0, x21
	bl	_free
	mov	x0, x19
	bl	_free
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_perform_read
.subsections_via_symbols
