	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_whole_file
_read_whole_file:                       ## @read_whole_file
	.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
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	cmpl	$2, %r12d
	movl	$1, %edi
	cmovgel	%r12d, %edi
	callq	_zmalloc
	movq	%rax, %r15
	movl	%ebx, %edi
	movq	%rax, %rsi
	movl	%r12d, %edx
	callq	_read
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_close
	cmpl	%r12d, %r13d
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_vkprintf
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_vkprintf
LBB0_4:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't open %s for reading. %m\n"

L_.str.1:                               ## @.str.1
	.asciz	"read %d bytes of %d from %s. %m\n"

	.no_dead_strip	_read_whole_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_whole_file
_read_whole_file:                       ; @read_whole_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x22, x0
	cmp	w20, #1
	csinc	w0, w20, wzr, gt
	bl	_zmalloc
	mov	x21, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_read
	mov	x23, x0
	mov	x0, x22
	bl	_close
	cmp	w23, w20
	b.eq	LBB0_5
; %bb.2:
	stp	x20, x19, [sp, #8]
	str	x23, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	str	x19, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_vkprintf
	mov	x21, #0
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't open %s for reading. %m\n"

l_.str.1:                               ; @.str.1
	.asciz	"read %d bytes of %d from %s. %m\n"

	.no_dead_strip	_read_whole_file
.subsections_via_symbols
