	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___archive_mktemp               ## -- Begin function __archive_mktemp
	.p2align	4, 0x90
___archive_mktemp:                      ## @__archive_mktemp
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-56(%rbp), %rdi
	callq	_archive_string_init
	leaq	-56(%rbp), %rdi
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rsi
	callq	_archive_strcpy
	jmp	LBB0_3
LBB0_1:
	callq	_get_tempdir
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	movl	$-1, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_3:
	movq	-56(%rbp), %rdi
	movslq	-48(%rbp), %rax
	cmpb	$47, -1(%rax,%rdi)
	jne	LBB0_5
## %bb.4:
	movb	$0, -1(%rdi,%rax)
	decl	-48(%rbp)
	movq	-56(%rbp), %rdi
LBB0_5:
	leaq	-64(%rbp), %rsi
	callq	_la_stat
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_16
## %bb.6:
	movl	-64(%rbp), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_archive_strcat
	movq	-56(%rbp), %rbx
	movq	%r14, %rdi
	callq	_archive_strlen
	movslq	%eax, %r15
	addq	%rbx, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_archive_strcat
	movq	-56(%rbp), %r12
	movq	%r14, %rdi
	callq	_archive_strlen
	movslq	%eax, %rbx
	addq	%r12, %rbx
	movl	%ebx, %r14d
	subl	%r15d, %r14d
	leaq	___archive_mktemp.num(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_archive_random
	cmpq	%rbx, %r15
	jae	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rax
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rax), %ecx
	movl	%ecx, %edx
	shrb	%dl
	movzbl	%dl, %edx
	imull	$133, %edx, %edx
	shrl	$12, %edx
	movl	%edx, %esi
	shll	$6, %esi
	subl	%edx, %esi
	subl	%edx, %esi
	subb	%sil, %cl
	movzbl	%cl, %ecx
	movzbl	(%rcx,%r13), %ecx
	movb	%cl, (%rax)
	incq	%rax
	cmpq	%rbx, %rax
	jb	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_EEXIST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_9
LBB0_14:
	testl	%r12d, %r12d
	js	LBB0_16
## %bb.15:
	movl	%r12d, %edi
	callq	___archive_ensure_cloexec_flag
	movq	-56(%rbp), %rdi
	callq	_unlink
	jmp	LBB0_16
LBB0_7:
	movq	_ENOTDIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_16:
	leaq	-56(%rbp), %rdi
	callq	_archive_string_free
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__archive_mktemp.num
___archive_mktemp.num:
	.ascii	"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

	.comm	_ARCHIVE_OK,8,3                 ## @ARCHIVE_OK
	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
	.comm	_errno,8,3                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/libarchive_"

L_.str.1:                               ## @.str.1
	.asciz	"XXXXXXXXXX"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_EEXIST,8,3                     ## @EEXIST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___archive_mktemp               ; -- Begin function __archive_mktemp
	.p2align	2
___archive_mktemp:                      ; @__archive_mktemp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	add	x0, sp, #16
	bl	_archive_string_init
	add	x0, sp, #16
	cbz	x19, LBB0_2
; %bb.1:
	mov	x1, x19
	bl	_archive_strcpy
	b	LBB0_3
LBB0_2:
	bl	_get_tempdir
Lloh0:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
LBB0_3:
	ldr	x0, [sp, #16]
	ldrsw	x8, [sp, #24]
	sub	x8, x8, #1
	ldrb	w9, [x0, x8]
	cmp	w9, #47
	b.ne	LBB0_5
; %bb.4:
	strb	wzr, [x0, x8]
	ldr	w8, [sp, #24]
	sub	w8, w8, #1
	str	w8, [sp, #24]
	ldr	x0, [sp, #16]
LBB0_5:
	add	x1, sp, #8
	bl	_la_stat
	tbnz	x0, #63, LBB0_16
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	w0, LBB0_15
; %bb.7:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #16
	bl	_archive_strcat
	ldr	x19, [sp, #16]
	add	x0, sp, #16
	bl	_archive_strlen
	add	x19, x19, w0, sxtw
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #16
	bl	_archive_strcat
	ldr	x20, [sp, #16]
	add	x0, sp, #16
	bl	_archive_strlen
	add	x22, x20, w0, sxtw
	sub	w20, w22, w19
	mov	w23, #133
	mov	w24, #62
Lloh7:
	adrp	x25, ___archive_mktemp.num@PAGE
Lloh8:
	add	x25, x25, ___archive_mktemp.num@PAGEOFF
Lloh9:
	adrp	x26, _O_CLOEXEC@GOTPAGE
Lloh10:
	ldr	x26, [x26, _O_CLOEXEC@GOTPAGEOFF]
Lloh11:
	adrp	x27, _errno@GOTPAGE
Lloh12:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh13:
	adrp	x28, _EEXIST@GOTPAGE
Lloh14:
	ldr	x28, [x28, _EEXIST@GOTPAGEOFF]
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x19
	mov	x1, x20
	bl	_archive_random
	cmp	x19, x22
	b.hs	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x8, x19
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x8]
	lsr	w10, w9, #1
	mul	w10, w10, w23
	lsr	w10, w10, #12
	msub	w9, w10, w24, w9
	and	x9, x9, #0xff
	ldrb	w9, [x25, x9]
	strb	w9, [x8], #1
	cmp	x8, x22
	b.lo	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #16]
Lloh15:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w1, w8, w9
	mov	w2, #384
	bl	_open
	mov	x21, x0
	tbz	w0, #31, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_13:
	tbnz	w21, #31, LBB0_17
; %bb.14:
	mov	x0, x21
	bl	___archive_ensure_cloexec_flag
	ldr	x0, [sp, #16]
	bl	_unlink
	b	LBB0_17
LBB0_15:
Lloh24:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _errno@GOTPAGE
Lloh28:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh29:
	str	x8, [x9]
LBB0_16:
	mov	w21, #-1
LBB0_17:
	add	x0, sp, #16
	bl	_archive_string_free
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
___archive_mktemp.num:                  ; @__archive_mktemp.num
	.ascii	"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

	.comm	_ARCHIVE_OK,8,3                 ; @ARCHIVE_OK
	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
	.comm	_errno,8,3                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/libarchive_"

l_.str.1:                               ; @.str.1
	.asciz	"XXXXXXXXXX"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_EEXIST,8,3                     ; @EEXIST
.subsections_via_symbols
