	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mkstemp                        ## -- Begin function mkstemp
	.p2align	4, 0x90
_mkstemp:                               ## @mkstemp
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_strlen
	cltq
	leaq	(%rbx,%rax), %r14
	addq	$-6, %r14
	cmpq	%rbx, %r14
	jb	LBB0_10
## %bb.1:
	cmpb	$88, (%r14)
	jne	LBB0_10
## %bb.2:
	cmpb	$88, 1(%r14)
	jne	LBB0_10
## %bb.3:
	cmpb	$88, 2(%r14)
	jne	LBB0_10
## %bb.4:
	cmpb	$88, 3(%r14)
	jne	LBB0_10
## %bb.5:
	cmpb	$88, 4(%r14)
	jne	LBB0_10
## %bb.6:
	cmpb	$88, 5(%r14)
	jne	LBB0_10
## %bb.7:
	movq	_O_EXCL@GOTPCREL(%rip), %r13
	movq	_O_NOFOLLOW@GOTPCREL(%rip), %r15
	movq	_EEXIST@GOTPCREL(%rip), %r12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, (%r14)
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	shrl	$5, %eax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, 1(%r14)
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	shrl	$10, %eax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, 2(%r14)
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	shrl	$15, %eax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, 3(%r14)
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	shrl	$20, %eax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, 4(%r14)
	xorl	%eax, %eax
	callq	_random
                                        ## kill: def $eax killed $eax def $rax
	shrl	$25, %eax
	andl	$31, %eax
	leal	48(%rax), %ecx
	leal	87(%rax), %edx
	cmpl	$10, %eax
	cmovbl	%ecx, %edx
	movb	%dl, 5(%r14)
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r13), %esi
	orl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%r12), %rcx
	je	LBB0_8
	jmp	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$-1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_errno,8,3                      ## @errno
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_NOFOLLOW,4,2                 ## @O_NOFOLLOW
	.comm	_EEXIST,8,3                     ## @EEXIST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mkstemp                        ; -- Begin function mkstemp
	.p2align	2
_mkstemp:                               ; @mkstemp
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_strlen
	add	x8, x19, w0, sxtw
	sub	x20, x8, #6
	cmp	x20, x19
	b.lo	LBB0_10
; %bb.1:
	ldrb	w8, [x20]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.2:
	ldrb	w8, [x20, #1]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.3:
	ldrb	w8, [x20, #2]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.4:
	ldrb	w8, [x20, #3]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.5:
	ldrb	w8, [x20, #4]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.6:
	ldrb	w8, [x20, #5]
	cmp	w8, #88
	b.ne	LBB0_10
; %bb.7:
	mov	w21, #48
	mov	w22, #87
Lloh0:
	adrp	x23, _O_CREAT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _O_CREAT@GOTPAGEOFF]
Lloh2:
	adrp	x24, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _O_RDWR@GOTPAGEOFF]
Lloh4:
	adrp	x25, _O_EXCL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _O_EXCL@GOTPAGEOFF]
Lloh6:
	adrp	x26, _O_NOFOLLOW@GOTPAGE
Lloh7:
	ldr	x26, [x26, _O_NOFOLLOW@GOTPAGEOFF]
Lloh8:
	adrp	x27, _errno@GOTPAGE
Lloh9:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh10:
	adrp	x28, _EEXIST@GOTPAGE
Lloh11:
	ldr	x28, [x28, _EEXIST@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	bl	_random
	and	w8, w0, #0x1f
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20]
	bl	_random
	ubfx	w8, w0, #5, #5
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20, #1]
	bl	_random
	ubfx	w8, w0, #10, #5
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20, #2]
	bl	_random
	ubfx	w8, w0, #15, #5
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20, #3]
	bl	_random
	ubfx	w8, w0, #20, #5
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20, #4]
	bl	_random
	ubfx	w8, w0, #25, #5
	cmp	w8, #9
	csel	w9, w22, w21, hi
	add	w8, w9, w8
	strb	w8, [x20, #5]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w1, w8, w9
	mov	x0, x19
	mov	w2, #384
	bl	_open
	tbz	w0, #31, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_8
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _errno@GOTPAGE
Lloh16:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh17:
	str	x8, [x9]
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_errno,8,3                      ; @errno
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_NOFOLLOW,4,2                 ; @O_NOFOLLOW
	.comm	_EEXIST,8,3                     ; @EEXIST
.subsections_via_symbols
