	.file	"extr_drm_dp_aux_dev.c_auxdev_write_iter.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	auxdev_write_iter, @function
auxdev_write_iter:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rsi
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	mov	QWORD PTR -80[rbp], rdi
	mov	rbx, QWORD PTR [rbx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	rdi, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rdi
	call	atomic_inc_not_zero@PLT
	test	eax, eax
	jne	.L2
	mov	r15, QWORD PTR ENODEV[rip]
	neg	r15
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -40[rbp]
	mov	rax, r15
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, QWORD PTR AUX_MAX_OFFSET[rip]
	mov	rdi, r12
	xor	r15d, r15d
	sub	rsi, rbx
	call	iov_iter_truncate@PLT
	mov	rdi, r12
	call	iov_iter_count@PLT
	test	rax, rax
	je	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movsx	rax, DWORD PTR DP_AUX_MAX_PAYLOAD_BYTES[rip]
	mov	rcx, rsp
	mov	r13, rsp
	mov	r14, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L6
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L26
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L7
	or	QWORD PTR -8[rsp+rdx], 0
.L7:
	mov	rdi, r12
	mov	r15, rsp
	call	iov_iter_count@PLT
	lea	esi, 0[0+r14*4]
	mov	rdi, rax
	call	min@PLT
	mov	edi, DWORD PTR current[rip]
	mov	r14, rax
	call	signal_pending@PLT
	test	rax, rax
	jne	.L27
	mov	rdx, r12
	mov	rsi, r14
	mov	rdi, r15
	call	copy_from_iter_full@PLT
	test	eax, eax
	je	.L28
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, r14
	mov	rdx, r15
	mov	rsi, rbx
	mov	rdi, QWORD PTR 8[rax]
	cmp	QWORD PTR [rdi], 0
	je	.L11
	call	drm_dp_mst_dpcd_write@PLT
	mov	r15, rax
	test	r15, r15
	jle	.L9
.L29:
	mov	rdi, r12
	mov	rsp, r13
	add	rbx, r15
	call	iov_iter_count@PLT
	test	rax, rax
	jne	.L14
.L13:
	mov	rcx, QWORD PTR -80[rbp]
	mov	rdx, rbx
	mov	rdi, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rcx], rbx
	sub	rdx, rax
	cmp	rbx, rax
	cmovne	r15, rdx
	call	atomic_dec_and_test@PLT
	test	rax, rax
	je	.L1
	mov	rdi, QWORD PTR -72[rbp]
	call	wake_up_var@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	call	drm_dp_dpcd_write@PLT
	mov	r15, rax
	test	r15, r15
	jg	.L29
.L9:
	mov	rsp, r13
	jmp	.L13
.L27:
	mov	r15, QWORD PTR ERESTARTSYS[rip]
	mov	rsp, r13
	neg	r15
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	mov	r15, QWORD PTR EFAULT[rip]
	mov	rsp, r13
	neg	r15
	jmp	.L13
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	auxdev_write_iter, .-auxdev_write_iter
	.comm	current,4,4
	.comm	ERESTARTSYS,8,8
	.comm	ENODEV,8,8
	.comm	EFAULT,8,8
	.comm	DP_AUX_MAX_PAYLOAD_BYTES,4,4
	.comm	AUX_MAX_OFFSET,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_drm_dp_aux_dev.c_auxdev_write_iter.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	auxdev_write_iter, %function
auxdev_write_iter:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	mov	r2, r0
	ldr	r3, [r0, #4]
	str	r0, [fp, #-48]
	ldr	r8, [r3]
	ldr	r3, .L24
	mov	r0, r8
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r5, [r2]
	bl	atomic_inc_not_zero
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L24+4
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L24+8
	mov	r0, r4
	ldr	r1, [r3]
	mov	r6, #0
	sub	r1, r1, r5
	bl	iov_iter_truncate
	ldr	r10, .L24+12
	b	.L4
.L22:
	bl	drm_dp_mst_dpcd_write
	mov	r6, r0
	cmp	r6, #0
	ble	.L6
.L23:
	mov	sp, r7
	add	r5, r5, r6
.L4:
	mov	r0, r4
	bl	iov_iter_count
	cmp	r0, #0
	beq	.L10
	ldr	r6, [r10]
	mov	r7, sp
	lsl	r6, r6, #2
	add	r3, r6, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r0, r4
	bl	iov_iter_count
	mov	r1, r6
	bl	min
	ldr	r3, .L24+16
	mov	r9, r0
	ldr	r0, [r3]
	bl	signal_pending
	cmp	r0, #0
	mov	r6, sp
	bne	.L20
	mov	r2, r4
	mov	r1, r9
	mov	r0, r6
	bl	copy_from_iter_full
	cmp	r0, #0
	beq	.L21
	ldr	r0, [r8, #4]
	mov	r3, r9
	ldr	r2, [r0]
	mov	r1, r5
	cmp	r2, #0
	mov	r2, r6
	bne	.L22
	bl	drm_dp_dpcd_write
	mov	r6, r0
	cmp	r6, #0
	bgt	.L23
.L6:
	mov	sp, r7
.L10:
	ldr	r3, [fp, #-48]
	mov	r0, r8
	ldr	r3, [r3]
	cmp	r5, r3
	subne	r6, r5, r3
	ldr	r3, [fp, #-48]
	str	r5, [r3]
	bl	atomic_dec_and_test
	cmp	r0, #0
	beq	.L1
	mov	r0, r8
	bl	wake_up_var
	b	.L1
.L20:
	ldr	r3, .L24+20
	ldr	r6, [r3]
	mov	sp, r7
	rsb	r6, r6, #0
	b	.L10
.L21:
	ldr	r3, .L24+24
	ldr	r6, [r3]
	mov	sp, r7
	rsb	r6, r6, #0
	b	.L10
.L19:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	ENODEV
	.word	AUX_MAX_OFFSET
	.word	DP_AUX_MAX_PAYLOAD_BYTES
	.word	current
	.word	ERESTARTSYS
	.word	EFAULT
	.size	auxdev_write_iter, .-auxdev_write_iter
	.comm	current,4,4
	.comm	ERESTARTSYS,4,4
	.comm	ENODEV,4,4
	.comm	EFAULT,4,4
	.comm	DP_AUX_MAX_PAYLOAD_BYTES,4,4
	.comm	AUX_MAX_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
