	.file	"extr_testapp.c_test_binary_replace_impl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	test_binary_replace_impl, @function
test_binary_replace_impl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 2080
	.cfi_def_cfa_offset 2128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 2072[rsp], rax
	xor	eax, eax
	lea	r12, 16[rsp]
	lea	rbx, 12[rsp]
	mov	DWORD PTR 12[rsp], -559035650
	call	strlen@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 2136
	mov	r9, rbx
	mov	rcx, r13
	push	0
	.cfi_def_cfa_offset 2144
	mov	r8d, eax
	mov	edx, ebp
	mov	esi, 1024
	push	0
	.cfi_def_cfa_offset 2152
	mov	rdi, r12
	push	4
	.cfi_def_cfa_offset 2160
	call	storage_command@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 2128
	xor	edx, edx
	mov	rdi, r12
	lea	r14, 1040[rsp]
	mov	rsi, rax
	call	safe_send@PLT
	mov	esi, 1024
	mov	rdi, r14
	call	safe_recv_packet@PLT
	mov	edx, DWORD PTR PROTOCOL_BINARY_RESPONSE_KEY_ENOENT[rip]
	mov	esi, ebp
	mov	rdi, r14
	call	validate_response_header@PLT
	mov	rdi, r13
	call	strlen@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 2136
	mov	r9, rbx
	mov	rcx, r13
	push	0
	.cfi_def_cfa_offset 2144
	mov	edx, DWORD PTR PROTOCOL_BINARY_CMD_ADD[rip]
	mov	r8d, eax
	mov	esi, 1024
	push	0
	.cfi_def_cfa_offset 2152
	mov	rdi, r12
	push	4
	.cfi_def_cfa_offset 2160
	call	storage_command@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 2128
	xor	edx, edx
	mov	rdi, r12
	mov	rsi, rax
	call	safe_send@PLT
	mov	esi, 1024
	mov	rdi, r14
	call	safe_recv_packet@PLT
	mov	edx, DWORD PTR PROTOCOL_BINARY_RESPONSE_SUCCESS[rip]
	mov	esi, DWORD PTR PROTOCOL_BINARY_CMD_ADD[rip]
	mov	rdi, r14
	call	validate_response_header@PLT
	mov	rdi, r13
	call	strlen@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 2136
	mov	r9, rbx
	mov	rcx, r13
	push	0
	.cfi_def_cfa_offset 2144
	mov	r8d, eax
	mov	edx, ebp
	mov	esi, 1024
	push	0
	.cfi_def_cfa_offset 2152
	mov	rdi, r12
	mov	ebx, 10
	push	4
	.cfi_def_cfa_offset 2160
	call	storage_command@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 2128
	mov	r13, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	sub	ebx, 1
	je	.L9
.L3:
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, r12
	call	safe_send@PLT
	cmp	DWORD PTR PROTOCOL_BINARY_CMD_REPLACE[rip], ebp
	jne	.L2
	mov	esi, 1024
	mov	rdi, r14
	call	safe_recv_packet@PLT
	mov	edx, DWORD PTR PROTOCOL_BINARY_RESPONSE_SUCCESS[rip]
	mov	esi, DWORD PTR PROTOCOL_BINARY_CMD_REPLACE[rip]
	mov	rdi, r14
	call	validate_response_header@PLT
	sub	ebx, 1
	jne	.L3
.L9:
	cmp	DWORD PTR PROTOCOL_BINARY_CMD_REPLACEQ[rip], ebp
	je	.L10
.L4:
	mov	rcx, QWORD PTR 2072[rsp]
	xor	rcx, QWORD PTR fs:40
	mov	eax, DWORD PTR TEST_PASS[rip]
	jne	.L11
	add	rsp, 2080
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L10:
	.cfi_restore_state
	xor	eax, eax
	call	test_binary_noop@PLT
	jmp	.L4
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_binary_replace_impl, .-test_binary_replace_impl
	.comm	TEST_PASS,4,4
	.comm	PROTOCOL_BINARY_RESPONSE_SUCCESS,4,4
	.comm	PROTOCOL_BINARY_RESPONSE_KEY_ENOENT,4,4
	.comm	PROTOCOL_BINARY_CMD_REPLACEQ,4,4
	.comm	PROTOCOL_BINARY_CMD_REPLACE,4,4
	.comm	PROTOCOL_BINARY_CMD_ADD,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_testapp.c_test_binary_replace_impl.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_binary_replace_impl, %function
test_binary_replace_impl:
	@ args = 0, pretend = 0, frame = 2056
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, .L12
	ldr	r3, .L12+4
	sub	sp, sp, #2080
	ldr	r3, [r3]
	str	r3, [sp, #2076]
	mov	r3,#0
	mov	r4, #0
	mov	r6, r0
	mov	r5, r1
	mov	r9, #4
	str	r2, [sp, #24]
	bl	strlen
	add	r7, sp, #24
	mov	r3, r6
	mov	r2, r5
	mov	r1, #1024
	str	r0, [sp]
	str	r7, [sp, #4]
	str	r4, [sp, #16]
	str	r4, [sp, #12]
	add	r0, sp, #28
	str	r9, [sp, #8]
	bl	storage_command
	mov	r2, r4
	mov	r1, r0
	add	r0, sp, #28
	bl	safe_send
	add	r0, sp, #1040
	mov	r1, #1024
	add	r0, r0, #12
	bl	safe_recv_packet
	ldr	r3, .L12+8
	add	r0, sp, #1040
	ldr	r2, [r3]
	mov	r1, r5
	add	r0, r0, #12
	bl	validate_response_header
	mov	r0, r6
	bl	strlen
	ldr	r10, .L12+12
	mov	r3, r6
	mov	r1, #1024
	ldr	r2, [r10]
	str	r7, [sp, #4]
	str	r4, [sp, #16]
	str	r4, [sp, #12]
	str	r0, [sp]
	str	r9, [sp, #8]
	add	r0, sp, #28
	bl	storage_command
	mov	r2, r4
	mov	r1, r0
	add	r0, sp, #28
	bl	safe_send
	add	r0, sp, #1040
	mov	r1, #1024
	ldr	r8, .L12+16
	add	r0, r0, #12
	bl	safe_recv_packet
	add	r0, sp, #1040
	ldr	r1, [r10]
	ldr	r2, [r8]
	add	r0, r0, #12
	bl	validate_response_header
	mov	r0, r6
	bl	strlen
	mov	r3, r6
	str	r7, [sp, #4]
	str	r4, [sp, #16]
	str	r4, [sp, #12]
	str	r0, [sp]
	mov	r2, r5
	mov	r1, #1024
	str	r9, [sp, #8]
	add	r0, sp, #28
	bl	storage_command
	mov	r4, #10
	mov	r7, r0
	ldr	r6, .L12+20
	b	.L3
.L2:
	subs	r4, r4, #1
	beq	.L9
.L3:
	mov	r2, #0
	mov	r1, r7
	add	r0, sp, #28
	bl	safe_send
	ldr	r3, [r6]
	cmp	r3, r5
	bne	.L2
	add	r0, sp, #1040
	mov	r1, #1024
	add	r0, r0, #12
	bl	safe_recv_packet
	add	r0, sp, #1040
	ldr	r2, [r8]
	ldr	r1, [r6]
	add	r0, r0, #12
	bl	validate_response_header
	subs	r4, r4, #1
	bne	.L3
.L9:
	ldr	r3, .L12+24
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L10
.L4:
	ldr	r3, .L12+28
	ldr	r0, [r3]
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [sp, #2076]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #2080
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	bl	test_binary_noop
	b	.L4
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	-559035650
	.word	.LC0
	.word	PROTOCOL_BINARY_RESPONSE_KEY_ENOENT
	.word	PROTOCOL_BINARY_CMD_ADD
	.word	PROTOCOL_BINARY_RESPONSE_SUCCESS
	.word	PROTOCOL_BINARY_CMD_REPLACE
	.word	PROTOCOL_BINARY_CMD_REPLACEQ
	.word	TEST_PASS
	.size	test_binary_replace_impl, .-test_binary_replace_impl
	.comm	TEST_PASS,4,4
	.comm	PROTOCOL_BINARY_RESPONSE_SUCCESS,4,4
	.comm	PROTOCOL_BINARY_RESPONSE_KEY_ENOENT,4,4
	.comm	PROTOCOL_BINARY_CMD_REPLACEQ,4,4
	.comm	PROTOCOL_BINARY_CMD_REPLACE,4,4
	.comm	PROTOCOL_BINARY_CMD_ADD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
