	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_rexp
_do_rexp:                               ## @do_rexp
	.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, %r12
	callq	_strdup
	movq	%rax, %r14
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movsbl	(%r12), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_strrchr
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	cmpb	$92, -1(%r13)
	jne	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_errx
LBB0_5:
	incq	%r14
	movb	$0, (%r13)
	cmpb	$0, 1(%r13)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.7:
	incq	%r13
	movq	_errno@GOTPCREL(%rip), %r14
	movq	$0, (%r14)
	leaq	-80(%rbp), %rsi
	movq	%r13, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	%rax, %rbx
	movq	-80(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, (%r14)
	je	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_10:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_6:
	xorl	%ebx, %ebx
LBB0_11:
	movq	_REG_BASIC@GOTPCREL(%rip), %rax
	movq	_REG_NOSUB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	movq	%r14, %rsi
	callq	_regcomp
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	cmpb	$47, (%r12)
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	callq	_newfile
	movq	%rax, %r13
	jmp	LBB0_17
LBB0_15:
	xorl	%eax, %eax
	callq	_tmpfile
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r13d, %r13d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_17:
	xorl	%eax, %eax
	callq	_get_line
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	movq	%rax, %r15
	movq	_EOF@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	xorl	%eax, %eax
	callq	_get_line
	movq	%rax, %r15
	movb	$1, %r14b
	testq	%rax, %rax
	je	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_fputs
	cmpq	(%r12), %rax
	je	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	testb	$1, %r14b
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_regexec
	testq	%rax, %rax
	jne	LBB0_22
LBB0_25:
	testq	%rbx, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jg	LBB0_26
## %bb.32:
	movl	$1, %esi
	subq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_toomuch
	movq	_truncofs@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_33
LBB0_23:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_toomuch
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_errx
	testq	%rbx, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_24
LBB0_26:
	cmpq	$2, %rbx
	jb	LBB0_30
## %bb.27:
	incq	%rbx
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_get_line
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_fputs
	decq	%rbx
	cmpq	$2, %rbx
	jg	LBB0_28
LBB0_30:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_toomuch
	movq	%r13, %rdi
	callq	_ftello
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_33
## %bb.31:
	movq	_currfile@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_33
LBB0_24:
	movq	%r13, %rdi
	callq	_ftello
	movq	%rax, %rbx
LBB0_33:
	movq	_sflag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_36
## %bb.34:
	cmpb	$47, (%r15)
	jne	LBB0_36
## %bb.35:
	leaq	L_.str.7(%rip), %rdi
	movq	%rbx, %rsi
	callq	_printf
LBB0_36:
	leaq	-44(%rbp), %rdi
	callq	_regfree
	movq	%r14, %rdi
	callq	_free
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"strdup"

L_.str.1:                               ## @.str.1
	.asciz	"%s: missing trailing %c"

	.comm	_errno,8,3                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"%s: bad offset"

	.comm	_REG_BASIC,4,2                  ## @REG_BASIC
	.comm	_REG_NOSUB,4,2                  ## @REG_NOSUB
L_.str.3:                               ## @.str.3
	.asciz	"%s: bad regular expression"

L_.str.4:                               ## @.str.4
	.asciz	"tmpfile"

	.comm	_EOF,8,3                        ## @EOF
L_.str.5:                               ## @.str.5
	.asciz	"%s: no match"

	.comm	_truncofs,8,3                   ## @truncofs
L_.str.6:                               ## @.str.6
	.asciz	"%s"

	.comm	_currfile,4,2                   ## @currfile
	.comm	_sflag,4,2                      ## @sflag
L_.str.7:                               ## @.str.7
	.asciz	"%jd\n"

	.no_dead_strip	_do_rexp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_rexp
_do_rexp:                               ; @do_rexp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_strdup
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x21, x19, #1
	ldrsb	w23, [x20]
	mov	x0, x19
	mov	x1, x23
	bl	_strrchr
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.3:
	ldurb	w8, [x22, #-1]
	cmp	w8, #92
	b.ne	LBB0_5
LBB0_4:
	str	x23, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_errx
LBB0_5:
	mov	x23, x22
	ldrb	w8, [x23, #1]!
	strb	wzr, [x22]
	cbz	w8, LBB0_8
; %bb.6:
Lloh4:
	adrp	x24, _errno@GOTPAGE
Lloh5:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	str	xzr, [x24]
	add	x1, sp, #16
	mov	x0, x23
	mov	w2, #10
	bl	_strtol
	mov	x22, x0
	ldr	x8, [sp, #16]
	ldrb	w8, [x8]
	ldr	x9, [x24]
	cmp	w8, #0
	ccmp	x9, #0, #0, eq
	b.eq	LBB0_9
; %bb.7:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x23
	bl	_errx
	b	LBB0_9
LBB0_8:
	mov	x22, #0
LBB0_9:
Lloh8:
	adrp	x8, _REG_BASIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_BASIC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _REG_NOSUB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _REG_NOSUB@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x0, sp, #28
	mov	x1, x21
	bl	_regcomp
	cbz	x0, LBB0_11
; %bb.10:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_errx
LBB0_11:
	ldrb	w8, [x20]
	cmp	w8, #47
	b.ne	LBB0_13
; %bb.12:
	bl	_newfile
	mov	x23, x0
	bl	_get_line
	cbnz	x0, LBB0_15
	b	LBB0_23
LBB0_13:
	bl	_tmpfile
	mov	x23, x0
	cbz	x0, LBB0_22
; %bb.14:
	bl	_get_line
	cbz	x0, LBB0_23
LBB0_15:
	mov	x24, x0
	mov	w26, #0
Lloh16:
	adrp	x25, _EOF@GOTPAGE
Lloh17:
	ldr	x25, [x25, _EOF@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	bl	_get_line
	mov	x24, x0
	mov	w26, #1
	cbz	x0, LBB0_23
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_fputs
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	tbz	w26, #0, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x0, sp, #28
	mov	x1, x24
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_regexec
	cbnz	x0, LBB0_16
LBB0_20:
	cmp	x22, #1
	b.ge	LBB0_24
; %bb.21:
	mov	w8, #1
	sub	x1, x8, x22
	mov	x0, x23
	bl	_toomuch
Lloh18:
	adrp	x8, _truncofs@GOTPAGE
Lloh19:
	ldr	x8, [x8, _truncofs@GOTPAGEOFF]
Lloh20:
	ldr	x21, [x8]
	b	LBB0_31
LBB0_22:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
	bl	_get_line
	cbnz	x0, LBB0_15
LBB0_23:
	mov	x0, #0
	mov	x1, #0
	bl	_toomuch
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_errx
	cmp	x22, #1
	b.lt	LBB0_30
LBB0_24:
	cmp	x22, #2
	b.lo	LBB0_28
; %bb.25:
	add	x21, x22, #1
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	bl	_get_line
	cbz	x0, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	mov	x1, x23
	bl	_fputs
	sub	x21, x21, #1
	cmp	x21, #2
	b.gt	LBB0_26
LBB0_28:
	mov	x0, #0
	mov	x1, #0
	bl	_toomuch
	mov	x0, x23
	bl	_ftello
	mov	x21, x0
	mov	x0, x23
	bl	_fclose
	cbz	x0, LBB0_31
; %bb.29:
Lloh25:
	adrp	x8, _currfile@GOTPAGE
Lloh26:
	ldr	x8, [x8, _currfile@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_31
LBB0_30:
	mov	x0, x23
	bl	_ftello
	mov	x21, x0
LBB0_31:
Lloh30:
	adrp	x8, _sflag@GOTPAGE
Lloh31:
	ldr	x8, [x8, _sflag@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cbnz	w8, LBB0_34
; %bb.32:
	ldrb	w8, [x20]
	cmp	w8, #47
	b.ne	LBB0_34
; %bb.33:
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x21
	bl	_printf
LBB0_34:
	add	x0, sp, #28
	bl	_regfree
	mov	x0, x19
	bl	_free
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"strdup"

l_.str.1:                               ; @.str.1
	.asciz	"%s: missing trailing %c"

	.comm	_errno,8,3                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"%s: bad offset"

	.comm	_REG_BASIC,4,2                  ; @REG_BASIC
	.comm	_REG_NOSUB,4,2                  ; @REG_NOSUB
l_.str.3:                               ; @.str.3
	.asciz	"%s: bad regular expression"

l_.str.4:                               ; @.str.4
	.asciz	"tmpfile"

	.comm	_EOF,8,3                        ; @EOF
l_.str.5:                               ; @.str.5
	.asciz	"%s: no match"

	.comm	_truncofs,8,3                   ; @truncofs
l_.str.6:                               ; @.str.6
	.asciz	"%s"

	.comm	_currfile,4,2                   ; @currfile
	.comm	_sflag,4,2                      ; @sflag
l_.str.7:                               ; @.str.7
	.asciz	"%jd\n"

	.no_dead_strip	_do_rexp
.subsections_via_symbols
