	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mktemp_internal
_mktemp_internal:                       ## @mktemp_internal
	.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
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_TEMPCHARS@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	callq	_strlen
	testl	%r12d, %r12d
	js	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%r12d, %eax
	cmpq	%rax, %rbx
	jbe	LBB0_3
## %bb.4:
	addq	%r15, %rbx
	subq	%rax, %rbx
	movl	$1, %r12d
	movq	%rbx, %rdi
	cmpq	%r15, %rbx
	jbe	LBB0_11
## %bb.5:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NUM_CHARS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %r12d
	movq	%rbx, %rdi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	imull	%edx, %r12d
	cmpq	%r15, %rdi
	jbe	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$88, -1(%rdi)
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	decq	%rdi
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%esi, %edx
	cmpl	%eax, %r12d
	jb	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	jmp	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_25:
	movl	$-1, %eax
LBB0_28:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
LBB0_11:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	addl	%r12d, %r12d
	movq	_NUM_CHARS@GOTPCREL(%rip), %r15
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=1
	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	_S_IWUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_open
	cmpl	$-1, %eax
	jne	LBB0_28
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	decl	%r12d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_23
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	cmpq	%rbx, %rdi
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	callq	_arc4random_uniform
	movl	%eax, %eax
	movzbl	(%r13,%rax), %eax
	movb	%al, (%r14)
	incq	%r14
	cmpq	%rbx, %r14
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	cmpl	$130, %r14d
	je	LBB0_26
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$129, %r14d
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$128, %r14d
	jne	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	-72(%rbp), %rsi
	callq	_lstat
	testl	%eax, %eax
	je	LBB0_22
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_S_IWUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mkdir
	testl	%eax, %eax
	jne	LBB0_21
## %bb.27:
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_23:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_19:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	setne	%al
	negl	%eax
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_TEMPCHARS,8,3                  ## @TEMPCHARS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_NUM_CHARS,4,2                  ## @NUM_CHARS
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
	.no_dead_strip	_mktemp_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mktemp_internal
_mktemp_internal:                       ; @mktemp_internal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x28, x0
Lloh0:
	adrp	x8, _TEMPCHARS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEMPCHARS@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	bl	_strlen
	tbnz	w21, #31, LBB0_8
; %bb.1:
	cbz	x0, LBB0_8
; %bb.2:
	mov	w8, w21
	cmp	x0, x8
	b.ls	LBB0_8
; %bb.3:
	add	x9, x28, x0
	sub	x21, x9, x8
Lloh3:
	adrp	x23, _NUM_CHARS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NUM_CHARS@GOTPAGEOFF]
	cmp	x21, x28
	b.ls	LBB0_11
; %bb.4:
Lloh5:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x8]
	ldr	w9, [x23]
	mov	w8, #1
	udiv	w10, w10, w9
	mov	x20, x21
	mov	x11, x21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x11, #-1]!
	cmp	w12, #88
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, w10
	csinc	w12, w9, wzr, lo
	mul	w8, w12, w8
	mov	x20, x11
	cmp	x11, x28
	b.hi	LBB0_5
; %bb.7:
	mov	x20, x28
	b	LBB0_12
LBB0_8:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _errno@GOTPAGE
Lloh12:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
LBB0_9:
	mov	w0, #-1
LBB0_10:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	mov	w8, #1
	mov	x20, x21
LBB0_12:
	lsl	w25, w8, #1
Lloh14:
	adrp	x26, _errno@GOTPAGE
Lloh15:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
Lloh16:
	adrp	x27, _EEXIST@GOTPAGE
Lloh17:
	ldr	x27, [x27, _EEXIST@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_16 Depth=1
Lloh18:
	adrp	x8, _S_IRUSR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _S_IRUSR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _S_IXUSR@GOTPAGE
Lloh25:
	ldr	x9, [x9, _S_IXUSR@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x28
	bl	_mkdir
	cbz	w0, LBB0_10
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x27]
	cmp	w8, w9
	b.ne	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	subs	w25, w25, #1
	b.eq	LBB0_24
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	cmp	x20, x21
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x24, x20
LBB0_18:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x23]
	bl	_arc4random_uniform
	ldrb	w8, [x22, w0, uxtw]
	strb	w8, [x24], #1
	cmp	x24, x21
	b.ne	LBB0_18
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	cmp	w19, #130
	b.eq	LBB0_13
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w19, #129
	b.eq	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w19, #128
	b.ne	LBB0_15
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x1, sp, #8
	mov	x0, x28
	bl	_lstat
	cbz	w0, LBB0_15
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_16 Depth=1
Lloh27:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh31:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh33:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh34:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh36:
	adrp	x8, _S_IRUSR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _S_IRUSR@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh40:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x28
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_14
	b	LBB0_10
LBB0_24:
	ldr	w8, [x27]
	str	w8, [x26]
	b	LBB0_9
LBB0_25:
	ldr	w8, [x26]
Lloh42:
	adrp	x9, _ENOENT@GOTPAGE
Lloh43:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	cmp	w8, w9
	csetm	w0, ne
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_TEMPCHARS,8,3                  ; @TEMPCHARS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_NUM_CHARS,4,2                  ; @NUM_CHARS
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
	.no_dead_strip	_mktemp_internal
.subsections_via_symbols
