	.file	"extr_twe.c_twe_immediate_request.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	twe_immediate_request, @function
twe_immediate_request:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, 4
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	debug_called@PLT
	mov	r12, QWORD PTR 32[rbp]
	test	r13d, r13d
	je	.L2
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L2
	mov	eax, DWORD PTR TWE_CMD_IMMEDIATE[rip]
	mov	edx, DWORD PTR 8[rbp]
	or	DWORD PTR 24[rbp], eax
	cmp	edx, DWORD PTR DFLTPHYS[rip]
	mov	eax, DWORD PTR EINVAL[rip]
	jg	.L1
	mov	rsi, QWORD PTR [r12]
	call	bcopy@PLT
.L2:
	mov	rax, QWORD PTR TWE_CMD_BUSY[rip]
	mov	rdi, rbp
	mov	QWORD PTR 0[rbp], rax
	call	twe_map_request@PLT
	test	eax, eax
	jne	.L25
.L11:
	mov	ebx, 5000
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, 1000
	call	DELAY@PLT
	mov	esi, 1
	mov	rdi, r12
	call	twe_done@PLT
	sub	ebx, 1
	je	.L10
.L6:
	mov	rax, QWORD PTR TWE_CMD_BUSY[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L9
.L10:
	test	r13d, r13d
	jne	.L7
.L8:
	mov	rax, QWORD PTR TWE_CMD_COMPLETE[rip]
	cmp	QWORD PTR 0[rbp], rax
	setne	al
	movzx	eax, al
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	cmp	DWORD PTR EBUSY[rip], eax
	je	.L11
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rsi, QWORD PTR 16[rbp]
	test	rsi, rsi
	je	.L8
	mov	edx, DWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [r12]
	call	bcopy@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	twe_immediate_request, .-twe_immediate_request
	.comm	TWE_CMD_IMMEDIATE,4,4
	.comm	TWE_CMD_COMPLETE,8,8
	.comm	TWE_CMD_BUSY,8,8
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	DFLTPHYS,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_twe.c_twe_immediate_request.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	twe_immediate_request, %function
twe_immediate_request:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r1
	mov	r5, r0
	mov	r0, #4
	bl	debug_called
	cmp	r8, #0
	ldr	r7, [r5, #16]
	beq	.L2
	ldr	r0, [r5, #8]
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L25
	ldr	r1, .L25+4
	ldr	r2, [r3]
	ldr	r3, [r5, #12]
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r2, [r5, #4]
	str	r3, [r5, #12]
	cmp	r2, r1
	ble	.L3
	ldr	r3, .L25+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r1, [r7]
	bl	bcopy
.L2:
	ldr	r6, .L25+12
	mov	r0, r5
	ldr	r3, [r6]
	str	r3, [r5]
	bl	twe_map_request
	cmp	r0, #0
	bne	.L24
.L11:
	ldr	r4, .L25+16
	b	.L6
.L9:
	mov	r0, #1000
	bl	DELAY
	mov	r1, #1
	mov	r0, r7
	bl	twe_done
	subs	r4, r4, #1
	beq	.L10
.L6:
	ldr	r2, [r5]
	ldr	r3, [r6]
	cmp	r2, r3
	beq	.L9
.L10:
	cmp	r8, #0
	beq	.L8
	ldr	r1, [r5, #8]
	cmp	r1, #0
	beq	.L8
	ldr	r0, [r7]
	ldr	r2, [r5, #4]
	bl	bcopy
.L8:
	ldr	r3, .L25+20
	ldr	r0, [r5]
	ldr	r3, [r3]
	subs	r0, r0, r3
	movne	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	ldr	r3, .L25+24
	ldr	r3, [r3]
	cmp	r3, r0
	popne	{r4, r5, r6, r7, r8, pc}
	b	.L11
.L26:
	.align	2
.L25:
	.word	TWE_CMD_IMMEDIATE
	.word	DFLTPHYS
	.word	EINVAL
	.word	TWE_CMD_BUSY
	.word	5000
	.word	TWE_CMD_COMPLETE
	.word	EBUSY
	.size	twe_immediate_request, .-twe_immediate_request
	.comm	TWE_CMD_IMMEDIATE,4,4
	.comm	TWE_CMD_COMPLETE,4,4
	.comm	TWE_CMD_BUSY,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	DFLTPHYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
