	.file	"extr_util.c_mkstemp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mkstemp
	.type	mkstemp, @function
mkstemp:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	call	strlen@PLT
	mov	rcx, rsp
	add	rax, 24
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L14:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L14
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L15
.L4:
	lea	r13, 15[rsp]
	mov	edi, 1
	mov	r12d, 6
	call	assert@PLT
	and	r13, -16
	mov	rsi, rbx
	mov	rdi, r13
	call	strcpy@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rsi, r13
	mov	rdi, rbx
	call	strcpy@PLT
	mov	rdi, rbx
	call	mktemp@PLT
	mov	esi, DWORD PTR O_CREAT[rip]
	mov	edx, 384
	mov	rdi, rbx
	or	esi, DWORD PTR O_EXCL[rip]
	or	esi, DWORD PTR O_RDWR[rip]
	call	open@PLT
	cmp	eax, -1
	jne	.L1
	sub	r12d, 1
	jne	.L6
.L1:
	mov	rcx, QWORD PTR -40[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L16
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mkstemp, .-mkstemp
	.comm	O_RDWR,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.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_util.c_mkstemp.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mkstemp
	.syntax unified
	.arm
	.fpu softvfp
	.type	mkstemp, %function
mkstemp:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #8
	ldr	r3, .L9
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	strlen
	add	r0, r0, #8
	bic	r0, r0, #7
	sub	sp, sp, r0
	mov	r5, sp
	mov	r0, #1
	bl	assert
	mov	r1, r4
	mov	r0, r5
	bl	strcpy
	mov	r9, #6
	ldr	r8, .L9+4
	ldr	r7, .L9+8
	ldr	r6, .L9+12
.L3:
	mov	r1, r5
	mov	r0, r4
	bl	strcpy
	mov	r0, r4
	bl	mktemp
	ldr	r2, [r7]
	ldr	r3, [r8]
	ldr	r1, [r6]
	orr	r3, r3, r2
	mov	r0, r4
	mov	r2, #384
	orr	r1, r3, r1
	bl	open
	cmn	r0, #1
	bne	.L1
	subs	r9, r9, #1
	bne	.L3
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	O_CREAT
	.word	O_EXCL
	.word	O_RDWR
	.size	mkstemp, .-mkstemp
	.comm	O_RDWR,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
