	.file	"extr_main.c_setup_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/tmp/priv.XXXXXXXXXXX"
.LC1:
	.string	"test %s: mkstemp"
.LC2:
	.string	"test %s: fchown(%s, %d, %d)"
.LC3:
	.string	"test %s: chmod(%s, 0%o)"
	.text
	.p2align 4
	.globl	setup_file
	.type	setup_file, @function
setup_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rdi, r12
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	strcpy@PLT
	mov	rdi, r12
	call	mkstemp@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L7
.L2:
	mov	edx, r14d
	mov	esi, r13d
	mov	edi, ebp
	call	fchown@PLT
	test	rax, rax
	js	.L8
.L3:
	mov	esi, ebx
	mov	edi, ebp
	call	fchmod@PLT
	test	rax, rax
	js	.L9
.L4:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, ebp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	close@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdx, r15
	lea	rsi, .LC1[rip]
	mov	edi, -1
	xor	eax, eax
	call	err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r8d, ebx
	mov	rcx, r12
	mov	rdx, r15
	mov	edi, -1
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	err@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r9d, r14d
	mov	r8d, r13d
	mov	rcx, r12
	mov	rdx, r15
	lea	rsi, .LC2[rip]
	mov	edi, -1
	xor	eax, eax
	call	err@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	setup_file, .-setup_file
	.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_main.c_setup_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/tmp/priv.XXXXXXXXXXX\000"
	.align	2
.LC1:
	.ascii	"test %s: mkstemp\000"
	.align	2
.LC2:
	.ascii	"test %s: fchown(%s, %d, %d)\000"
	.align	2
.LC3:
	.ascii	"test %s: chmod(%s, 0%o)\000"
	.text
	.align	2
	.global	setup_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_file, %function
setup_file:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r1
	sub	sp, sp, #12
	mov	r8, r0
	mov	r6, r2
	mov	r0, r1
	mov	r2, #22
	ldr	r1, .L10
	mov	r7, r3
	ldr	r9, [sp, #40]
	bl	memcpy
	mov	r0, r5
	bl	mkstemp
	subs	r4, r0, #0
	blt	.L7
.L2:
	mov	r2, r7
	mov	r1, r6
	mov	r0, r4
	bl	fchown
	cmp	r0, #0
	blt	.L8
.L3:
	mov	r1, r9
	mov	r0, r4
	bl	fchmod
	cmp	r0, #0
	blt	.L9
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	close
.L7:
	mov	r2, r8
	ldr	r1, .L10+4
	mvn	r0, #0
	bl	err
	b	.L2
.L9:
	mov	r3, r5
	mov	r2, r8
	ldr	r1, .L10+8
	str	r9, [sp]
	mvn	r0, #0
	bl	err
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	close
.L8:
	mov	r3, r5
	mov	r2, r8
	stm	sp, {r6, r7}
	ldr	r1, .L10+12
	mvn	r0, #0
	bl	err
	b	.L3
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.size	setup_file, .-setup_file
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
