	.file	"extr_mkstemp.c_mkstemp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mkstemp
	.type	mkstemp, @function
mkstemp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	strlen@PLT
	cdqe
	lea	r12, -6[rbp+rax]
	cmp	rbp, r12
	ja	.L4
	lea	rdx, 6[r12]
	mov	rax, r12
.L5:
	cmp	BYTE PTR [rax], 88
	jne	.L4
	add	rax, 1
	cmp	rax, rdx
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r13, r12
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L8:
	xor	eax, eax
	call	random@PLT
	mov	ecx, ebx
	shr	eax, cl
	and	eax, 31
	lea	ecx, 87[rax]
	cmp	eax, 10
	lea	edx, 48[rax]
	mov	eax, ecx
	cmovl	eax, edx
	add	ebx, 5
	add	r13, 1
	mov	BYTE PTR -1[r13], al
	cmp	ebx, 30
	jne	.L8
	mov	esi, DWORD PTR O_CREAT[rip]
	mov	edx, 384
	mov	rdi, rbp
	or	esi, DWORD PTR O_RDWR[rip]
	or	esi, DWORD PTR O_EXCL[rip]
	or	esi, DWORD PTR O_NOFOLLOW[rip]
	call	open@PLT
	test	eax, eax
	jns	.L1
	mov	rdi, QWORD PTR EEXIST[rip]
	cmp	QWORD PTR errno[rip], rdi
	je	.L9
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR EINVAL[rip]
	mov	QWORD PTR errno[rip], rax
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkstemp, .-mkstemp
	.comm	errno,8,8
	.comm	O_RDWR,4,4
	.comm	O_NOFOLLOW,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	EINVAL,8,8
	.comm	EEXIST,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mkstemp.c_mkstemp.c"
	.text
	.align	2
	.global	mkstemp
	.syntax unified
	.arm
	.fpu softvfp
	.type	mkstemp, %function
mkstemp:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r4, r0
	bl	strlen
	sub	r2, r0, #6
	adds	r2, r4, r2
	subcc	r3, r2, #1
	strcc	r3, [sp, #4]
	addcc	r2, r2, #5
	bcs	.L4
.L5:
	ldrb	r1, [r3, #1]!	@ zero_extendqisi2
	cmp	r1, #88
	bne	.L4
	cmp	r3, r2
	bne	.L5
	ldr	r9, .L15
	ldr	r8, .L15+4
	ldr	r7, .L15+8
	ldr	r6, .L15+12
	ldr	fp, .L15+16
.L9:
	mov	r5, #0
	ldr	r10, [sp, #4]
.L8:
	bl	random
	lsr	r0, r0, r5
	and	r0, r0, #31
	cmp	r0, #9
	add	r5, r5, #5
	addgt	r0, r0, #87
	addle	r0, r0, #48
	cmp	r5, #30
	strb	r0, [r10, #1]!
	bne	.L8
	ldr	r1, [r8]
	ldr	r3, [r9]
	ldr	r2, [r7]
	orr	r3, r3, r1
	ldr	r1, [r6]
	orr	r3, r3, r2
	mov	r0, r4
	mov	r2, #384
	orr	r1, r3, r1
	bl	open
	cmp	r0, #0
	bge	.L1
	ldr	r3, .L15+20
	ldr	r2, [fp]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L9
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mvn	r0, #0
	ldr	r2, .L15+24
	ldr	r3, .L15+16
	ldr	r2, [r2]
	str	r2, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	O_CREAT
	.word	O_RDWR
	.word	O_EXCL
	.word	O_NOFOLLOW
	.word	errno
	.word	EEXIST
	.word	EINVAL
	.size	mkstemp, .-mkstemp
	.comm	errno,4,4
	.comm	O_RDWR,4,4
	.comm	O_NOFOLLOW,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	EINVAL,4,4
	.comm	EEXIST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
