	.file	"extr_pulse8-cec.c_pulse8_cec_adap_transmit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pulse8_cec_adap_transmit, @function
pulse8_cec_adap_transmit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r13, rsp
	call	cec_get_drvdata@PLT
	mov	ecx, DWORD PTR MSGCODE_COMMAND_ACCEPTED[rip]
	mov	edx, 2
	mov	rsi, r13
	mov	rbp, rax
	mov	eax, DWORD PTR MSGCODE_TRANSMIT_IDLETIME[rip]
	mov	r8d, 1
	mov	DWORD PTR 4[rsp], ebx
	mov	rdi, rbp
	mov	DWORD PTR [rsp], eax
	call	pulse8_send_and_wait@PLT
	mov	rdi, r14
	mov	r12d, eax
	mov	eax, DWORD PTR MSGCODE_TRANSMIT_ACK_POLARITY[rip]
	mov	DWORD PTR [rsp], eax
	call	cec_msg_is_broadcast@PLT
	mov	DWORD PTR 4[rsp], eax
	test	r12d, r12d
	je	.L21
.L2:
	cmp	DWORD PTR [r14], 1
	mov	eax, DWORD PTR MSGCODE_TRANSMIT[rip]
	jne	.L4
	mov	eax, DWORD PTR MSGCODE_TRANSMIT_EOM[rip]
.L4:
	mov	DWORD PTR [rsp], eax
	mov	rax, QWORD PTR 8[r14]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 4[rsp], eax
	test	r12d, r12d
	je	.L22
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	ecx, DWORD PTR MSGCODE_COMMAND_ACCEPTED[rip]
	mov	r8d, 1
	mov	rsi, r13
	mov	rdi, rbp
	mov	edx, 2
	call	pulse8_send_and_wait@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR [r14]
	cmp	eax, 1
	jle	.L1
	cmp	eax, 2
	mov	eax, DWORD PTR MSGCODE_TRANSMIT_EOM[rip]
	cmovne	eax, DWORD PTR MSGCODE_TRANSMIT[rip]
	mov	r8d, 1
	mov	ecx, DWORD PTR MSGCODE_COMMAND_ACCEPTED[rip]
	mov	edx, 2
	mov	rsi, r13
	mov	rdi, rbp
	mov	DWORD PTR [rsp], eax
	mov	rax, QWORD PTR 8[r14]
	mov	ebx, 2
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR 4[rsp], eax
	call	pulse8_send_and_wait@PLT
	test	eax, eax
	jne	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR [r14]
	cmp	edx, ebx
	jbe	.L1
	sub	edx, 1
	mov	eax, DWORD PTR MSGCODE_TRANSMIT_EOM[rip]
	mov	rsi, r13
	mov	rdi, rbp
	cmp	edx, ebx
	mov	edx, ebx
	mov	ecx, DWORD PTR MSGCODE_COMMAND_ACCEPTED[rip]
	mov	r8d, 1
	cmovne	eax, DWORD PTR MSGCODE_TRANSMIT[rip]
	add	ebx, 1
	mov	DWORD PTR [rsp], eax
	mov	rax, QWORD PTR 8[r14]
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	edx, 2
	mov	DWORD PTR 4[rsp], eax
	call	pulse8_send_and_wait@PLT
	test	eax, eax
	je	.L9
.L16:
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	ecx, DWORD PTR MSGCODE_COMMAND_ACCEPTED[rip]
	mov	r8d, 1
	mov	rsi, r13
	mov	rdi, rbp
	mov	edx, 2
	call	pulse8_send_and_wait@PLT
	mov	r12d, eax
	jmp	.L2
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pulse8_cec_adap_transmit, .-pulse8_cec_adap_transmit
	.comm	MSGCODE_TRANSMIT_IDLETIME,4,4
	.comm	MSGCODE_TRANSMIT_EOM,4,4
	.comm	MSGCODE_TRANSMIT_ACK_POLARITY,4,4
	.comm	MSGCODE_TRANSMIT,4,4
	.comm	MSGCODE_COMMAND_ACCEPTED,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_pulse8-cec.c_pulse8_cec_adap_transmit.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pulse8_cec_adap_transmit, %function
pulse8_cec_adap_transmit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	ldr	r3, .L22
	sub	sp, sp, #28
	mov	r9, #1
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	cec_get_drvdata
	ldr	r3, .L22+4
	ldr	r8, .L22+8
	ldr	ip, [r3]
	mov	r2, #2
	ldr	r3, [r8]
	add	r1, sp, #12
	str	r9, [sp]
	str	ip, [sp, #12]
	mov	r7, r0
	str	r4, [sp, #16]
	bl	pulse8_send_and_wait
	ldr	r3, .L22+12
	mov	r6, r0
	ldr	r3, [r3]
	mov	r0, r5
	str	r3, [sp, #12]
	bl	cec_msg_is_broadcast
	cmp	r6, #0
	str	r0, [sp, #16]
	beq	.L19
.L2:
	ldr	r3, [r5]
	cmp	r3, #1
	ldreq	r3, .L22+16
	ldrne	r3, .L22+20
	cmp	r6, #0
	ldr	r2, [r3]
	ldr	r3, [r5, #4]
	str	r2, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #16]
	beq	.L20
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r2, #1
	mov	r0, r7
	str	r2, [sp]
	ldr	r3, [r8]
	mov	r2, #2
	add	r1, sp, #12
	bl	pulse8_send_and_wait
	subs	r6, r0, #0
	bne	.L1
	ldr	r3, [r5]
	cmp	r3, #1
	ble	.L1
	mov	r9, #1
	cmp	r3, #2
	ldreq	r3, .L22+16
	ldrne	r3, .L22+20
	mov	r0, r7
	ldr	r2, [r3]
	ldr	r3, [r5, #4]
	str	r2, [sp, #12]
	ldr	ip, [r3, #4]
	mov	r2, #2
	ldr	r3, [r8]
	str	r9, [sp]
	add	r1, sp, #12
	str	ip, [sp, #16]
	bl	pulse8_send_and_wait
	cmp	r0, #0
	bne	.L16
	mov	r4, #2
	ldr	r10, .L22+20
	ldr	fp, .L22+16
.L9:
	ldr	r3, [r5]
	cmp	r3, r4
	bls	.L1
	sub	r3, r3, #1
	cmp	r3, r4
	ldreq	r2, [fp]
	ldrne	r2, [r10]
	ldr	r3, [r5, #4]
	str	r2, [sp, #12]
	ldr	ip, [r3, r4, lsl #2]
	mov	r2, #2
	mov	r0, r7
	ldr	r3, [r8]
	str	r9, [sp]
	add	r1, sp, #12
	str	ip, [sp, #16]
	bl	pulse8_send_and_wait
	cmp	r0, #0
	add	r4, r4, #1
	beq	.L9
.L16:
	mov	r6, r0
	b	.L1
.L19:
	mov	r2, #2
	mov	r0, r7
	ldr	r3, [r8]
	str	r9, [sp]
	add	r1, sp, #12
	bl	pulse8_send_and_wait
	mov	r6, r0
	b	.L2
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	MSGCODE_TRANSMIT_IDLETIME
	.word	MSGCODE_COMMAND_ACCEPTED
	.word	MSGCODE_TRANSMIT_ACK_POLARITY
	.word	MSGCODE_TRANSMIT_EOM
	.word	MSGCODE_TRANSMIT
	.size	pulse8_cec_adap_transmit, .-pulse8_cec_adap_transmit
	.comm	MSGCODE_TRANSMIT_IDLETIME,4,4
	.comm	MSGCODE_TRANSMIT_EOM,4,4
	.comm	MSGCODE_TRANSMIT_ACK_POLARITY,4,4
	.comm	MSGCODE_TRANSMIT,4,4
	.comm	MSGCODE_COMMAND_ACCEPTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
