	.file	"extr_saf1761_otg.c_saf1761_host_intr_data_tx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"STATUS=0x%08x\n"
	.text
	.p2align 4
	.type	saf1761_host_intr_data_tx, @function
saf1761_host_intr_data_tx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR [rsi]
	cmp	rdi, QWORD PTR SOTG_HOST_CHANNEL_MAX[rip]
	jge	.L2
	call	SOTG_PTD@PLT
	add	eax, DWORD PTR SOTG_PTD_DW3[rip]
	mov	rdi, r12
	mov	esi, eax
	call	saf1761_peek_host_status_le_4@PLT
	lea	rsi, .LC0[rip]
	mov	edi, 5
	mov	ebx, eax
	mov	edx, eax
	call	DPRINTFN@PLT
	mov	r13d, ebx
	and	r13d, DWORD PTR SOTG_PTD_DW3_ACTIVE[rip]
	jne	.L17
	test	DWORD PTR SOTG_PTD_DW3_HALTED[rip], ebx
	jne	.L19
	cmp	QWORD PTR 16[rbp], 0
	jne	.L8
	mov	eax, DWORD PTR 24[rbp]
	test	eax, eax
	jne	.L7
.L8:
	mov	rsi, rbp
	mov	rdi, r12
	call	saf1761_host_channel_free@PLT
.L2:
	mov	rsi, rbp
	mov	rdi, r12
	call	saf1761_host_channel_alloc@PLT
	test	rax, rax
	jne	.L17
	movsx	rdx, DWORD PTR 28[rbp]
	mov	rax, QWORD PTR 16[rbp]
	mov	rbx, rdx
	cmp	rax, rdx
	jge	.L10
	mov	DWORD PTR 24[rbp], 1
	mov	ebx, eax
.L10:
	mov	edx, ebx
	mov	rsi, rbp
	mov	rdi, r12
	call	saf1761_write_host_memory@PLT
	cmp	QWORD PTR 56[rbp], 0
	je	.L11
	mov	QWORD PTR 56[rbp], 0
	mov	DWORD PTR 32[rbp], 1
.L11:
	mov	rdi, QWORD PTR 0[rbp]
	call	SOTG_PTD@PLT
	mov	esi, DWORD PTR SOTG_PTD_DW7[rip]
	xor	edx, edx
	mov	rdi, r12
	mov	r13d, eax
	add	esi, eax
	call	SAF1761_WRITE_LE_4@PLT
	mov	esi, DWORD PTR SOTG_PTD_DW6[rip]
	xor	edx, edx
	mov	rdi, r12
	add	esi, r13d
	call	SAF1761_WRITE_LE_4@PLT
	mov	edx, DWORD PTR 36[rbp]
	and	edx, DWORD PTR SOTG_PTD_DW1_ENABLE_SPLIT[rip]
	je	.L12
	mov	ecx, DWORD PTR 40[rbp]
	mov	edx, 252
	sal	edx, cl
	movzx	edx, dl
.L12:
	mov	esi, DWORD PTR SOTG_PTD_DW5[rip]
	mov	rdi, r12
	add	esi, r13d
	call	SAF1761_WRITE_LE_4@PLT
	mov	ecx, DWORD PTR 40[rbp]
	mov	edx, 1
	mov	rdi, r12
	mov	esi, DWORD PTR SOTG_PTD_DW4[rip]
	sal	edx, cl
	add	esi, r13d
	call	SAF1761_WRITE_LE_4@PLT
	mov	eax, DWORD PTR 32[rbp]
	mov	esi, DWORD PTR SOTG_PTD_DW3[rip]
	mov	rdi, r12
	mov	edx, DWORD PTR SOTG_PTD_DW3_ACTIVE[rip]
	or	edx, DWORD PTR SOTG_PTD_DW3_CERR_3[rip]
	sal	eax, 25
	add	esi, r13d
	or	edx, eax
	call	SAF1761_WRITE_LE_4@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	SOTG_DATA_ADDR@PLT
	mov	edi, eax
	call	SOTG_HC_MEMORY_ADDR@PLT
	mov	edx, DWORD PTR 44[rbp]
	mov	esi, DWORD PTR SOTG_PTD_DW2[rip]
	mov	rdi, r12
	sal	eax, 8
	and	edx, 248
	add	esi, r13d
	or	edx, eax
	call	SAF1761_WRITE_LE_4@PLT
	mov	edx, DWORD PTR 48[rbp]
	mov	esi, DWORD PTR SOTG_PTD_DW1[rip]
	mov	rdi, r12
	add	esi, r13d
	sar	edx
	or	edx, DWORD PTR 36[rbp]
	call	SAF1761_WRITE_LE_4@PLT
	lea	edx, 0[0+rbx*8]
	mov	ebx, DWORD PTR 48[rbp]
	mov	rdi, r12
	or	edx, DWORD PTR SOTG_PTD_DW0_VALID[rip]
	mov	esi, DWORD PTR SOTG_PTD_DW0[rip]
	sal	ebx, 31
	or	edx, ebx
	mov	ebx, DWORD PTR 28[rbp]
	add	esi, r13d
	sal	ebx, 18
	or	edx, ebx
	or	edx, 536870912
	call	SAF1761_WRITE_LE_4@PLT
	mov	edx, DWORD PTR [r12]
	mov	esi, DWORD PTR SOTG_INT_PTD_SKIP_PTD[rip]
	mov	rdi, r12
	not	edx
	or	edx, DWORD PTR 4[r12]
	call	SAF1761_WRITE_LE_4@PLT
	xor	DWORD PTR 32[rbp], 1
.L17:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	r13d, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	test	DWORD PTR SOTG_PTD_DW3_ERRORS[rip], ebx
	jne	.L6
	mov	DWORD PTR 8[rbp], 1
.L6:
	mov	DWORD PTR 12[rbp], 1
.L7:
	mov	rsi, rbp
	mov	rdi, r12
	call	saf1761_host_channel_free@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	saf1761_host_intr_data_tx, .-saf1761_host_intr_data_tx
	.comm	SOTG_PTD_DW7,4,4
	.comm	SOTG_PTD_DW6,4,4
	.comm	SOTG_PTD_DW5,4,4
	.comm	SOTG_PTD_DW4,4,4
	.comm	SOTG_PTD_DW3_HALTED,4,4
	.comm	SOTG_PTD_DW3_ERRORS,4,4
	.comm	SOTG_PTD_DW3_CERR_3,4,4
	.comm	SOTG_PTD_DW3_ACTIVE,4,4
	.comm	SOTG_PTD_DW3,4,4
	.comm	SOTG_PTD_DW2,4,4
	.comm	SOTG_PTD_DW1_ENABLE_SPLIT,4,4
	.comm	SOTG_PTD_DW1,4,4
	.comm	SOTG_PTD_DW0_VALID,4,4
	.comm	SOTG_PTD_DW0,4,4
	.comm	SOTG_INT_PTD_SKIP_PTD,4,4
	.comm	SOTG_HOST_CHANNEL_MAX,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_saf1761_otg.c_saf1761_host_intr_data_tx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"STATUS=0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	saf1761_host_intr_data_tx, %function
saf1761_host_intr_data_tx:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L22
	ldr	r3, [r1]
	ldr	r2, [r2]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, r2
	mov	r4, r1
	mov	r5, r0
	bge	.L2
	mov	r0, r3
	bl	SOTG_PTD
	mov	r1, r0
	ldr	r3, .L22+4
	mov	r0, r5
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	saf1761_peek_host_status_le_4
	mov	r7, r0
	mov	r2, r0
	ldr	r1, .L22+8
	mov	r0, #5
	bl	DPRINTFN
	ldr	r3, .L22+12
	ldr	r6, [r3]
	ands	r6, r7, r6
	bne	.L9
	ldr	r3, .L22+16
	ldr	r3, [r3]
	tst	r7, r3
	bne	.L21
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L7
.L8:
	mov	r1, r4
	mov	r0, r5
	bl	saf1761_host_channel_free
.L2:
	mov	r1, r4
	mov	r0, r5
	bl	saf1761_host_channel_alloc
	cmp	r0, #0
	bne	.L9
	ldr	r8, [r4, #20]
	ldr	r3, [r4, #12]
	mov	r1, r4
	cmp	r3, r8
	movlt	r8, r3
	movlt	r2, #1
	mov	r0, r5
	strlt	r2, [r4, #16]
	mov	r2, r8
	bl	saf1761_write_host_memory
	ldr	r3, [r4, #44]
	ldr	r0, [r4]
	cmp	r3, #0
	movne	r2, #0
	movne	r3, #1
	strne	r2, [r4, #44]
	strne	r3, [r4, #24]
	bl	SOTG_PTD
	mov	r7, r0
	ldr	r3, .L22+20
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r5
	add	r1, r7, r1
	bl	SAF1761_WRITE_LE_4
	ldr	r3, .L22+24
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r5
	add	r1, r7, r1
	bl	SAF1761_WRITE_LE_4
	ldr	r3, .L22+28
	ldr	r2, [r4, #28]
	ldr	r3, [r3]
	mov	r6, #1
	ands	r2, r2, r3
	movne	r2, #252
	ldrne	r3, [r4, #32]
	mov	r0, r5
	lslne	r2, r2, r3
	ldr	r3, .L22+32
	andne	r2, r2, #255
	ldr	r1, [r3]
	add	r1, r7, r1
	bl	SAF1761_WRITE_LE_4
	ldr	r3, .L22+36
	ldr	r2, [r4, #32]
	ldr	r1, [r3]
	lsl	r2, r6, r2
	add	r1, r7, r1
	mov	r0, r5
	bl	SAF1761_WRITE_LE_4
	ldr	r1, .L22+40
	ldr	r3, .L22+12
	ldr	r2, .L22+4
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r2, [r4, #24]
	orr	r3, r3, r0
	orr	r2, r3, r2, lsl #25
	add	r1, r7, r1
	mov	r0, r5
	bl	SAF1761_WRITE_LE_4
	ldr	r0, [r4]
	bl	SOTG_DATA_ADDR
	bl	SOTG_HC_MEMORY_ADDR
	ldr	r2, .L22+44
	ldr	r3, [r4, #36]
	ldr	r1, [r2]
	and	r3, r3, #248
	orr	r2, r3, r0, lsl #8
	add	r1, r7, r1
	mov	r0, r5
	bl	SAF1761_WRITE_LE_4
	ldr	r3, .L22+48
	ldr	r2, [r4, #40]
	ldr	r1, [r3]
	ldr	r3, [r4, #28]
	add	r1, r7, r1
	orr	r2, r3, r2, asr r6
	mov	r0, r5
	bl	SAF1761_WRITE_LE_4
	ldr	r3, .L22+52
	ldr	r0, [r4, #40]
	ldr	r2, [r3]
	ldr	r1, .L22+56
	ldr	r3, [r4, #20]
	orr	r2, r2, r8, lsl #3
	ldr	r1, [r1]
	orr	r2, r2, r0, lsl #31
	orr	r2, r2, r3, lsl #18
	add	r1, r7, r1
	mov	r0, r5
	orr	r2, r2, #536870912
	bl	SAF1761_WRITE_LE_4
	ldr	r3, [r5]
	ldr	r2, [r5, #4]
	mvn	r3, r3
	ldr	r1, .L22+60
	orr	r2, r3, r2
	mov	r0, r5
	ldr	r1, [r1]
	bl	SAF1761_WRITE_LE_4
	ldr	r3, [r4, #24]
	mov	r0, r6
	eor	r3, r3, r6
	str	r3, [r4, #24]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r6, #1
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	ldr	r3, .L22+64
	ldr	r3, [r3]
	tst	r7, r3
	moveq	r3, #1
	streq	r3, [r4, #4]
	mov	r3, #1
	str	r3, [r4, #8]
.L7:
	mov	r1, r4
	mov	r0, r5
	bl	saf1761_host_channel_free
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	.align	2
.L22:
	.word	SOTG_HOST_CHANNEL_MAX
	.word	SOTG_PTD_DW3
	.word	.LC0
	.word	SOTG_PTD_DW3_ACTIVE
	.word	SOTG_PTD_DW3_HALTED
	.word	SOTG_PTD_DW7
	.word	SOTG_PTD_DW6
	.word	SOTG_PTD_DW1_ENABLE_SPLIT
	.word	SOTG_PTD_DW5
	.word	SOTG_PTD_DW4
	.word	SOTG_PTD_DW3_CERR_3
	.word	SOTG_PTD_DW2
	.word	SOTG_PTD_DW1
	.word	SOTG_PTD_DW0_VALID
	.word	SOTG_PTD_DW0
	.word	SOTG_INT_PTD_SKIP_PTD
	.word	SOTG_PTD_DW3_ERRORS
	.size	saf1761_host_intr_data_tx, .-saf1761_host_intr_data_tx
	.comm	SOTG_PTD_DW7,4,4
	.comm	SOTG_PTD_DW6,4,4
	.comm	SOTG_PTD_DW5,4,4
	.comm	SOTG_PTD_DW4,4,4
	.comm	SOTG_PTD_DW3_HALTED,4,4
	.comm	SOTG_PTD_DW3_ERRORS,4,4
	.comm	SOTG_PTD_DW3_CERR_3,4,4
	.comm	SOTG_PTD_DW3_ACTIVE,4,4
	.comm	SOTG_PTD_DW3,4,4
	.comm	SOTG_PTD_DW2,4,4
	.comm	SOTG_PTD_DW1_ENABLE_SPLIT,4,4
	.comm	SOTG_PTD_DW1,4,4
	.comm	SOTG_PTD_DW0_VALID,4,4
	.comm	SOTG_PTD_DW0,4,4
	.comm	SOTG_INT_PTD_SKIP_PTD,4,4
	.comm	SOTG_HOST_CHANNEL_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
