	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkg_open
_pkg_open:                              ## @pkg_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	_package@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	movq	(%r14), %rax
	movq	_F_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$47, %al
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_6:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	testb	%al, %al
	jne	LBB0_11
## %bb.10:
	movq	$0, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_11:
	xorl	%esi, %esi
	callq	_scan_tarfile
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	%rax, %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %esi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r12), %rdi
	movq	%r15, %rsi
	callq	_scan_tarfile
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_13
LBB0_16:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r15, 8(%r14)
	movq	$0, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_package,8,3                    ## @package
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_F_READ,8,3                     ## @F_READ
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_pkg_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkg_open
_pkg_open:                              ; @pkg_open
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x22, _package@GOTPAGE
Lloh1:
	ldr	x22, [x22, _package@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _F_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _F_READ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x20]
	cmp	w8, #47
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	b	LBB0_4
LBB0_6:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_7:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	cbnz	w8, LBB0_11
; %bb.10:
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_17
LBB0_11:
	mov	x1, #0
	bl	_scan_tarfile
	cbz	x0, LBB0_15
; %bb.12:
	mov	x21, x0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21, #8]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x22]
	mov	x1, x21
	bl	_scan_tarfile
	mov	x21, x0
	cbnz	x0, LBB0_13
LBB0_15:
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
LBB0_17:
	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_18:
	str	x21, [x19, #8]
	str	xzr, [x21]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_package,8,3                    ; @package
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_F_READ,8,3                     ; @F_READ
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_pkg_open
.subsections_via_symbols
