	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grep_open                      ## -- Begin function grep_open
	.p2align	4, 0x90
_grep_open:                             ## @grep_open
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$8, %edi
	callq	_grep_malloc
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	movl	%eax, (%r15)
	cmpl	$-1, %eax
	jne	LBB0_3
	jmp	LBB0_20
LBB0_1:
	movq	_lbflag@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
LBB0_3:
	movq	_filebehave@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	_FILE_MMAP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.4:
	leaq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:
	movq	-40(%rbp), %r14
	movq	_OFF_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jg	LBB0_7
## %bb.6:
	movl	-32(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movq	_MAP_NOCORE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MAP_NOSYNC@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_fsiz@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %r8d
	xorl	%edi, %edi
	movq	%r14, %rsi
	xorl	%r9d, %r9d
	callq	_mmap
	movq	_buffer@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.9:
	movq	_bufrem@GOTPCREL(%rip), %rcx
	movq	%r14, (%rcx)
	movq	_bufpos@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_MADV_SEQUENTIAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_madvise
	jmp	LBB0_10
LBB0_7:
	movq	_FILE_STDIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_10:
	movq	_buffer@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_12:
	movq	_MAXBUFSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_grep_malloc
	movq	%rax, (%rbx)
LBB0_13:
	movq	_bufrem@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_14
LBB0_15:
	movq	_binbehave@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_BINFILE_TEXT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.16:
	movq	_fileeol@GOTPCREL(%rip), %rax
	cmpb	$0, (%rax)
	je	LBB0_21
## %bb.17:
	movq	_bufpos@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	(%rbx), %rdx
	xorl	%esi, %esi
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:
	movl	$1, 4(%r15)
	jmp	LBB0_21
LBB0_14:
	movq	%r15, %rdi
	callq	_grep_refill
	testq	%rax, %rax
	je	LBB0_15
## %bb.19:
	movl	(%r15), %edi
	callq	_close
LBB0_20:
	movq	%r15, %rdi
	callq	_free
	xorl	%r15d, %r15d
LBB0_21:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lbflag,4,2                     ## @lbflag
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_filebehave,8,3                 ## @filebehave
	.comm	_FILE_MMAP,8,3                  ## @FILE_MMAP
	.comm	_OFF_MAX,8,3                    ## @OFF_MAX
	.comm	_FILE_STDIO,8,3                 ## @FILE_STDIO
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_NOCORE,4,2                 ## @MAP_NOCORE
	.comm	_MAP_NOSYNC,4,2                 ## @MAP_NOSYNC
	.comm	_fsiz,8,3                       ## @fsiz
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_buffer,8,3                     ## @buffer
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_bufrem,8,3                     ## @bufrem
	.comm	_bufpos,8,3                     ## @bufpos
	.comm	_MADV_SEQUENTIAL,4,2            ## @MADV_SEQUENTIAL
	.comm	_MAXBUFSIZ,4,2                  ## @MAXBUFSIZ
	.comm	_binbehave,8,3                  ## @binbehave
	.comm	_BINFILE_TEXT,8,3               ## @BINFILE_TEXT
	.comm	_fileeol,1,0                    ## @fileeol
	.comm	_MAP_PREFAULT_READ,4,2          ## @MAP_PREFAULT_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grep_open                      ; -- Begin function grep_open
	.p2align	2
_grep_open:                             ; @grep_open
	.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
	mov	w0, #8
	bl	_grep_malloc
	mov	x19, x0
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	cbz	x20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_open
	str	w0, [x19]
	cmn	w0, #1
	b.ne	LBB0_3
	b	LBB0_18
LBB0_2:
Lloh3:
	adrp	x8, _lbflag@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lbflag@GOTPAGEOFF]
	mov	w9, #1
Lloh5:
	str	w9, [x8]
Lloh6:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x19]
LBB0_3:
Lloh9:
	adrp	x24, _filebehave@GOTPAGE
Lloh10:
	ldr	x24, [x24, _filebehave@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh11:
	adrp	x9, _FILE_MMAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FILE_MMAP@GOTPAGEOFF]
Lloh13:
	adrp	x22, _buffer@GOTPAGE
Lloh14:
	ldr	x22, [x22, _buffer@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
Lloh16:
	adrp	x23, _MAP_FAILED@GOTPAGE
Lloh17:
	ldr	x23, [x23, _MAP_FAILED@GOTPAGEOFF]
Lloh18:
	adrp	x21, _bufrem@GOTPAGE
Lloh19:
	ldr	x21, [x21, _bufrem@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.4:
	mov	x1, sp
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.5:
	ldr	x20, [sp]
Lloh20:
	adrp	x8, _OFF_MAX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OFF_MAX@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x20, x8
	b.gt	LBB0_9
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_9
; %bb.7:
Lloh23:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _MAP_NOCORE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MAP_NOCORE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _MAP_NOSYNC@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MAP_NOSYNC@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _fsiz@GOTPAGE
Lloh33:
	ldr	x10, [x10, _fsiz@GOTPAGEOFF]
	orr	w3, w8, w9
Lloh34:
	str	x20, [x10]
Lloh35:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	ldr	w4, [x19]
	mov	x0, #0
	mov	x1, x20
	mov	w5, #0
	bl	_mmap
	str	x0, [x22]
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	str	x20, [x21]
Lloh38:
	adrp	x8, _bufpos@GOTPAGE
Lloh39:
	ldr	x8, [x8, _bufpos@GOTPAGEOFF]
Lloh40:
	str	x0, [x8]
Lloh41:
	adrp	x8, _MADV_SEQUENTIAL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MADV_SEQUENTIAL@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_madvise
	b	LBB0_10
LBB0_9:
Lloh44:
	adrp	x8, _FILE_STDIO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _FILE_STDIO@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	str	x8, [x24]
LBB0_10:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, #0
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_12
; %bb.11:
Lloh47:
	adrp	x8, _MAXBUFSIZ@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MAXBUFSIZ@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	bl	_grep_malloc
	str	x0, [x22]
LBB0_12:
	ldr	x8, [x21]
	cbz	x8, LBB0_16
LBB0_13:
Lloh50:
	adrp	x8, _binbehave@GOTPAGE
Lloh51:
	ldr	x8, [x8, _binbehave@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
Lloh53:
	adrp	x9, _BINFILE_TEXT@GOTPAGE
Lloh54:
	ldr	x9, [x9, _BINFILE_TEXT@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
Lloh56:
	adrp	x10, _fileeol@GOTPAGE
Lloh57:
	ldr	x10, [x10, _fileeol@GOTPAGEOFF]
	ldrb	w10, [x10]
	cmp	x8, x9
	ccmp	w10, #0, #4, ne
	b.eq	LBB0_19
; %bb.14:
Lloh58:
	adrp	x8, _bufpos@GOTPAGE
Lloh59:
	ldr	x8, [x8, _bufpos@GOTPAGEOFF]
Lloh60:
	ldr	x0, [x8]
	ldr	x2, [x21]
	mov	w1, #0
	bl	_memchr
	cbz	x0, LBB0_19
; %bb.15:
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_19
LBB0_16:
	mov	x0, x19
	bl	_grep_refill
	cbz	x0, LBB0_13
; %bb.17:
	ldr	w0, [x19]
	bl	_close
LBB0_18:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_19:
	mov	x0, x19
	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 AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_lbflag,4,2                     ; @lbflag
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_filebehave,8,3                 ; @filebehave
	.comm	_FILE_MMAP,8,3                  ; @FILE_MMAP
	.comm	_OFF_MAX,8,3                    ; @OFF_MAX
	.comm	_FILE_STDIO,8,3                 ; @FILE_STDIO
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_NOCORE,4,2                 ; @MAP_NOCORE
	.comm	_MAP_NOSYNC,4,2                 ; @MAP_NOSYNC
	.comm	_fsiz,8,3                       ; @fsiz
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_buffer,8,3                     ; @buffer
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_bufrem,8,3                     ; @bufrem
	.comm	_bufpos,8,3                     ; @bufpos
	.comm	_MADV_SEQUENTIAL,4,2            ; @MADV_SEQUENTIAL
	.comm	_MAXBUFSIZ,4,2                  ; @MAXBUFSIZ
	.comm	_binbehave,8,3                  ; @binbehave
	.comm	_BINFILE_TEXT,8,3               ; @BINFILE_TEXT
	.comm	_fileeol,1,0                    ; @fileeol
	.comm	_MAP_PREFAULT_READ,4,2          ; @MAP_PREFAULT_READ
.subsections_via_symbols
