	.file	"extr_binderfs_test.c_write_to_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s - Failed to open file %s\n"
.LC1:
	.string	"Failed to write to file %s\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"%s - Failed to write to file %s\n"
	.text
	.p2align 4
	.type	write_to_file, @function
write_to_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	mov	esi, DWORD PTR O_WRONLY[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	or	esi, DWORD PTR O_CLOEXEC[rip]
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	call	open@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L13
.L2:
	mov	rdx, rbx
	mov	rsi, r14
	mov	edi, ebp
	call	write_nointr@PLT
	test	rax, rax
	js	.L14
	cmp	rbx, rax
	je	.L15
	mov	ebx, DWORD PTR errno[rip]
	mov	edi, ebp
	call	close@PLT
	mov	DWORD PTR errno[rip], ebx
.L6:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	xor	eax, eax
	pop	r12
	.cfi_def_cfa_offset 24
	lea	rdi, .LC1[rip]
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	ksft_exit_fail_msg@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	r14d, DWORD PTR errno[rip]
	mov	edi, ebp
	test	r13d, r13d
	je	.L4
	cmp	r13d, r14d
	je	.L11
.L4:
	call	close@PLT
	mov	edi, r14d
	mov	DWORD PTR errno[rip], r14d
	call	strerror@PLT
	mov	rdx, r12
	lea	rdi, .LC2[rip]
	movsx	rsi, eax
	xor	eax, eax
	call	ksft_exit_fail_msg@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	mov	rdx, r12
	lea	rdi, .LC0[rip]
	movsx	rsi, eax
	xor	eax, eax
	call	ksft_exit_fail_msg@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, ebp
.L11:
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	close@PLT
	.cfi_endproc
.LFE0:
	.size	write_to_file, .-write_to_file
	.comm	errno,4,4
	.comm	O_WRONLY,4,4
	.comm	O_CLOEXEC,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_binderfs_test.c_write_to_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s - Failed to open file %s\012\000"
	.align	2
.LC1:
	.ascii	"Failed to write to file %s\012\000"
	.align	2
.LC2:
	.ascii	"%s - Failed to write to file %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_to_file, %function
write_to_file:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, .L16
	ldr	lr, .L16+4
	ldr	ip, [ip]
	ldr	lr, [lr]
	mov	r8, r1
	orr	r1, lr, ip
	mov	r5, r2
	mov	r7, r3
	mov	r6, r0
	bl	open
	subs	r4, r0, #0
	blt	.L13
.L2:
	mov	r1, r8
	mov	r2, r5
	mov	r0, r4
	bl	write_nointr
	cmp	r0, #0
	blt	.L14
	cmp	r5, r0
	beq	.L15
	ldr	r5, .L16+8
	mov	r0, r4
	ldr	r4, [r5]
	bl	close
	mov	r1, r6
	str	r4, [r5]
	ldr	r0, .L16+12
	pop	{r4, r5, r6, r7, r8, lr}
	b	ksft_exit_fail_msg
.L14:
	ldr	r8, .L16+8
	cmp	r7, #0
	mov	r0, r4
	ldr	r5, [r8]
	beq	.L4
	cmp	r7, r5
	beq	.L11
.L4:
	bl	close
	mov	r0, r5
	str	r5, [r8]
	bl	strerror
	mov	r2, r6
	mov	r1, r0
	ldr	r0, .L16+16
	bl	ksft_exit_fail_msg
	mov	r1, r6
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, .L16+12
	b	ksft_exit_fail_msg
.L13:
	ldr	r3, .L16+8
	ldr	r0, [r3]
	bl	strerror
	mov	r2, r6
	mov	r1, r0
	ldr	r0, .L16+20
	bl	ksft_exit_fail_msg
	b	.L2
.L15:
	mov	r0, r4
.L11:
	pop	{r4, r5, r6, r7, r8, lr}
	b	close
.L17:
	.align	2
.L16:
	.word	O_CLOEXEC
	.word	O_WRONLY
	.word	errno
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.size	write_to_file, .-write_to_file
	.comm	errno,4,4
	.comm	O_WRONLY,4,4
	.comm	O_CLOEXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
