	.file	"extr_tempfile.c_create_tempfile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"cannot fix permission bits on %s"
	.text
	.p2align 4
	.globl	create_tempfile
	.type	create_tempfile, @function
create_tempfile:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	new_tempfile@PLT
	mov	rsi, rbp
	lea	rdi, 8[rax]
	mov	QWORD PTR [rsp], rax
	call	strbuf_add_absolute_path@PLT
	mov	rax, QWORD PTR [rsp]
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	edx, 438
	or	esi, DWORD PTR O_CREAT[rip]
	or	esi, DWORD PTR O_EXCL[rip]
	mov	edi, DWORD PTR 8[rax]
	or	esi, DWORD PTR O_CLOEXEC[rip]
	call	open@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	edx, DWORD PTR O_CLOEXEC[rip]
	mov	QWORD PTR [rdi], rax
	test	edx, edx
	je	.L2
	test	rax, rax
	js	.L14
.L4:
	call	activate_tempfile@PLT
	mov	rax, QWORD PTR [rsp]
	mov	edi, DWORD PTR 8[rax]
	call	adjust_shared_perm@PLT
	mov	r8, rax
	mov	rax, QWORD PTR [rsp]
	test	r8, r8
	jne	.L15
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	cmp	DWORD PTR errno[rip], eax
	je	.L17
.L3:
	call	deactivate_tempfile@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 8[rdi]
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	edx, 438
	or	esi, DWORD PTR O_CREAT[rip]
	or	esi, DWORD PTR O_EXCL[rip]
	call	open@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	QWORD PTR [rdi], rax
	.p2align 4,,10
	.p2align 3
.L2:
	test	rax, rax
	jns	.L4
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR 8[rax]
	mov	ebp, DWORD PTR errno[rip]
	lea	rdi, .LC0[rip]
	call	error@PLT
	mov	rdi, rsp
	call	delete_tempfile@PLT
	mov	DWORD PTR errno[rip], ebp
	xor	eax, eax
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	create_tempfile, .-create_tempfile
	.comm	errno,4,4
	.comm	O_RDWR,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	O_CLOEXEC,4,4
	.comm	EINVAL,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_tempfile.c_create_tempfile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cannot fix permission bits on %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_tempfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_tempfile, %function
create_tempfile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L17
	sub	sp, sp, #12
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	new_tempfile
	mov	r3, r0
	ldr	r6, .L17+4
	ldr	r5, .L17+8
	mov	r1, r4
	add	r0, r0, #4
	ldr	r4, .L17+12
	ldr	r7, .L17+16
	str	r3, [sp]
	bl	strbuf_add_absolute_path
	ldr	r1, [r5]
	ldr	r3, [r6]
	ldr	r0, [r4]
	ldr	r2, [sp]
	orr	r3, r3, r1
	ldr	r1, [r7]
	orr	r3, r3, r0
	orr	r1, r3, r1
	ldr	r0, [r2, #4]
	ldr	r2, .L17+20
	bl	open
	ldr	r2, [r7]
	mov	r3, r0
	cmp	r2, #0
	moveq	r2, #0
	ldr	r0, [sp]
	lsrne	r2, r3, #31
	cmp	r2, #0
	str	r3, [r0]
	bne	.L13
.L2:
	cmp	r3, #0
	blt	.L3
	bl	activate_tempfile
	ldr	r3, [sp]
	ldr	r0, [r3, #4]
	bl	adjust_shared_perm
	cmp	r0, #0
	ldreq	r0, [sp]
	bne	.L14
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	ldr	r2, .L17+24
	ldr	r3, .L17+28
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L16
.L3:
	bl	deactivate_tempfile
	mov	r0, #0
	b	.L1
.L14:
	ldr	r3, [sp]
	ldr	r4, .L17+24
	ldr	r1, [r3, #4]
	ldr	r5, [r4]
	ldr	r0, .L17+32
	bl	error
	mov	r0, sp
	bl	delete_tempfile
	mov	r0, #0
	str	r5, [r4]
	b	.L1
.L16:
	ldr	r2, [r5]
	ldr	r3, [r6]
	ldr	r1, [r4]
	orr	r3, r3, r2
	orr	r1, r3, r1
	ldr	r0, [r0, #4]
	ldr	r2, .L17+20
	bl	open
	mov	r3, r0
	ldr	r0, [sp]
	str	r3, [r0]
	b	.L2
.L15:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC1
	.word	O_RDWR
	.word	O_CREAT
	.word	O_EXCL
	.word	O_CLOEXEC
	.word	438
	.word	errno
	.word	EINVAL
	.word	.LC0
	.size	create_tempfile, .-create_tempfile
	.comm	errno,4,4
	.comm	O_RDWR,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	O_CLOEXEC,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
