	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grep_source_load_file
_grep_source_load_file:                 ## @grep_source_load_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_lstat
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movl	-72(%rbp), %edi
	callq	_S_ISREG
	movl	$-1, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movq	-80(%rbp), %r13
	movq	%r13, %rdi
	callq	_xsize_t
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.5:
	movl	%eax, %r12d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_xmallocz
	movl	%r12d, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r13, %rdx
	callq	_read_in_full
	cmpq	%rax, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.7:
	movl	%r12d, %edi
	callq	_close
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_error_errno
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_error_errno
	movl	%r12d, %edi
	callq	_close
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to stat '%s'"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"'%s': short read"

	.no_dead_strip	_grep_source_load_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grep_source_load_file
_grep_source_load_file:                 ; @grep_source_load_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	x19, [x0]
	mov	x1, sp
	mov	x0, x19
	bl	_lstat
	tbnz	x0, #63, LBB0_5
; %bb.1:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_8
; %bb.2:
	ldr	x24, [sp]
	mov	x0, x24
	bl	_xsize_t
	mov	x22, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x21, x0
	mov	x0, x22
	bl	_xmallocz
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_read_in_full
	cmp	x24, x0
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x21
	bl	_close
	mov	w0, #0
	stp	x23, x22, [x20, #8]
	b	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _ENOENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
	mov	x0, x21
	bl	_close
	mov	x0, x23
	bl	_free
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to stat '%s'"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"'%s': short read"

	.no_dead_strip	_grep_source_load_file
.subsections_via_symbols
