	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pat_sel                        ## -- Begin function pat_sel
	.p2align	4, 0x90
_pat_sel:                               ## @pat_sel
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_pathead@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%r14d, %r14d
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.2:
	movq	_nflag@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	je	LBB0_3
## %bb.4:
	movq	_DIR_MTCH@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	testl	%edx, (%rbx)
	jne	LBB0_24
## %bb.5:
	movq	_dflag@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	je	LBB0_6
LBB0_8:
	cmpq	%rbx, %rcx
	je	LBB0_23
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	32(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpq	%rbx, %rcx
	jne	LBB0_20
## %bb.22:
	addq	$32, %rax
LBB0_23:
	movq	32(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	%rbx, %rdi
	callq	_free
	movq	$0, 8(%r15)
	jmp	LBB0_24
LBB0_3:
	movq	_MTCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_24:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.9:
	movb	$0, (%rdx)
	jmp	LBB0_10
LBB0_21:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	movl	$-1, %r14d
	jmp	LBB0_24
LBB0_7:
	movq	(%r15), %rdx
	movq	_PAX_DIR@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_8
LBB0_10:
	movl	16(%r15), %edi
	callq	_strdup
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.14:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.15:
	movb	$47, (%rcx)
	movq	$0, 8(%rbx)
	movq	16(%rbx), %rax
LBB0_16:
	movq	%rax, %rdi
	callq	_strlen
	movl	%eax, 24(%rbx)
	cltq
	movq	16(%rbx), %rcx
	cmpb	$47, -1(%rcx,%rax)
	jne	LBB0_18
## %bb.17:
	decq	%rax
	movb	$0, (%rcx,%rax)
	movl	%eax, 24(%rbx)
LBB0_18:
	movq	_MTCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r12), %eax
	movl	%eax, (%rbx)
	movq	%rbx, 8(%r15)
	jmp	LBB0_24
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movb	$47, (%rax)
LBB0_13:
	movq	$0, 8(%rbx)
	movl	$-1, %r14d
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_pathead,8,3                    ## @pathead
	.comm	_nflag,4,2                      ## @nflag
	.comm	_MTCH,4,2                       ## @MTCH
	.comm	_DIR_MTCH,4,2                   ## @DIR_MTCH
	.comm	_dflag,4,2                      ## @dflag
	.comm	_PAX_DIR,8,3                    ## @PAX_DIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pattern select out of memory"

L_.str.1:                               ## @.str.1
	.asciz	"Pattern list inconsistent"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pat_sel                        ; -- Begin function pat_sel
	.p2align	2
_pat_sel:                               ; @pat_sel
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _pathead@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pathead@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0, #8]
	cbz	x19, LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _nflag@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nflag@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	w9, LBB0_6
; %bb.3:
	ldr	w9, [x19]
Lloh6:
	adrp	x21, _DIR_MTCH@GOTPAGE
Lloh7:
	ldr	x21, [x21, _DIR_MTCH@GOTPAGEOFF]
	ldr	w10, [x21]
	tst	w10, w9
	b.eq	LBB0_7
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #0
Lloh8:
	adrp	x8, _MTCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTCH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_5
LBB0_7:
Lloh11:
	adrp	x9, _dflag@GOTPAGE
Lloh12:
	ldr	x9, [x9, _dflag@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cbz	w9, LBB0_12
LBB0_8:
	cmp	x8, x19
	b.eq	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	x8, x19
	b.ne	LBB0_9
; %bb.11:
	add	x8, x9, #32
	b	LBB0_15
LBB0_12:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_17
; %bb.13:
	strb	wzr, [x9]
	b	LBB0_18
LBB0_14:
Lloh14:
	adrp	x8, _pathead@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pathead@GOTPAGEOFF]
LBB0_15:
	ldr	x9, [x19, #32]
	str	x9, [x8]
	mov	x0, x19
	bl	_free
	mov	w0, #0
	str	xzr, [x20, #8]
	b	LBB0_5
LBB0_16:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_paxwarn
	b	LBB0_27
LBB0_17:
	ldr	x9, [x20]
Lloh18:
	adrp	x10, _PAX_DIR@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PAX_DIR@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
LBB0_18:
	ldr	w0, [x20, #16]
	bl	_strdup
	str	x0, [x19, #16]
	cbz	x0, LBB0_24
; %bb.19:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_21
; %bb.20:
	mov	w9, #47
	strb	w9, [x8]
	str	xzr, [x19, #8]
	ldr	x0, [x19, #16]
LBB0_21:
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x19, #24]
	sxtw	x8, w0
	sub	x8, x8, #1
	ldr	x9, [x19, #16]
	ldrb	w10, [x9, x8]
	cmp	w10, #47
	b.ne	LBB0_23
; %bb.22:
	strb	wzr, [x9, x8]
	str	w8, [x19, #24]
LBB0_23:
	mov	w0, #0
	ldr	w8, [x21]
Lloh21:
	adrp	x9, _MTCH@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MTCH@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	str	x19, [x20, #8]
	b	LBB0_5
LBB0_24:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_paxwarn
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_26
; %bb.25:
	mov	w9, #47
	strb	w9, [x8]
LBB0_26:
	str	xzr, [x19, #8]
LBB0_27:
	mov	w0, #-1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_pathead,8,3                    ; @pathead
	.comm	_nflag,4,2                      ; @nflag
	.comm	_MTCH,4,2                       ; @MTCH
	.comm	_DIR_MTCH,4,2                   ; @DIR_MTCH
	.comm	_dflag,4,2                      ; @dflag
	.comm	_PAX_DIR,8,3                    ; @PAX_DIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pattern select out of memory"

l_.str.1:                               ; @.str.1
	.asciz	"Pattern list inconsistent"

.subsections_via_symbols
