	.file	"extr_redir.c_read_buddy_data.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Diff ID"
.LC1:
	.string	"Diff len"
.LC2:
	.string	"writev()"
.LC3:
	.string	"Short write %d\n"
	.text
	.p2align 4
	.globl	read_buddy_data
	.type	read_buddy_data, @function
read_buddy_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	r13, QWORD PTR 24[rdi]
	mov	r15, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	movzx	edi, WORD PTR 0[r13]
	call	ntohs@PLT
	movzx	edi, WORD PTR 2[r13]
	mov	r14d, eax
	call	ntohs@PLT
	xor	edi, edi
	lea	r12d, 4[rax]
	sub	r12d, DWORD PTR 0[rbp]
	mov	ebx, eax
	test	r12d, r12d
	setg	dil
	call	assert@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	buddy_get@PLT
	test	eax, eax
	je	.L1
	mov	DWORD PTR 0[rbp], 0
	test	r15, r15
	je	.L1
	cmp	QWORD PTR 8[r15], 0
	je	.L1
	cmp	DWORD PTR [r15], r14d
	jne	.L23
	mov	eax, DWORD PTR 4[r15]
	sub	eax, 32
	cmp	ebx, eax
	jne	.L24
	mov	rax, QWORD PTR 24[r15]
	mov	rdx, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rdx]
	test	DWORD PTR IEEE80211_FC1_DIR_TODS[rip], edx
	je	.L6
	mov	esi, DWORD PTR 8[rax]
	lea	r12, 44[rsp]
	mov	edx, 6
	mov	rdi, r12
	call	memcpy@PLT
	mov	rax, QWORD PTR 24[r15]
	lea	rdi, 50[rsp]
	mov	edx, 6
	mov	esi, DWORD PTR 16[rax]
	call	memcpy@PLT
.L7:
	mov	edi, DWORD PTR 20[rbp]
	lea	eax, -6[rbx]
	add	r13, 10
	mov	rsi, rsp
	mov	edx, 2
	mov	QWORD PTR [rsp], r12
	mov	DWORD PTR 8[rsp], 12
	mov	QWORD PTR 16[rsp], r13
	mov	DWORD PTR 24[rsp], eax
	call	writev@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L25
.L8:
	add	ebx, 6
	cmp	ebx, r12d
	je	.L9
	lea	rdi, .LC3[rip]
	mov	esi, r12d
	xor	eax, eax
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rcx, QWORD PTR 16[r15]
	mov	QWORD PTR 8[r15], 0
	test	rcx, rcx
	je	.L26
	mov	QWORD PTR 8[rbp], rcx
	mov	rax, rcx
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, rax
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L12
	mov	QWORD PTR 16[rdx], r15
	mov	QWORD PTR 16[r15], 0
.L11:
	mov	eax, DWORD PTR S_START[rip]
	cmp	QWORD PTR 8[rcx], 0
	mov	DWORD PTR 16[rbp], eax
	je	.L1
	mov	rdi, rbp
	call	send_queue@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR 12[rax]
	lea	r12, 44[rsp]
	mov	edx, 6
	mov	rdi, r12
	call	memcpy@PLT
	mov	rax, QWORD PTR 24[r15]
	lea	rdi, 50[rsp]
	mov	edx, 6
	mov	esi, DWORD PTR 8[rax]
	call	memcpy@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rcx, QWORD PTR 8[rbp]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC2[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_buddy_data, .-read_buddy_data
	.comm	S_START,4,4
	.comm	IEEE80211_FC1_DIR_TODS,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_redir.c_read_buddy_data.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Diff ID\000"
	.align	2
.LC1:
	.ascii	"Diff len\000"
	.align	2
.LC2:
	.ascii	"writev()\000"
	.align	2
.LC3:
	.ascii	"Short write %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_buddy_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_buddy_data, %function
read_buddy_data:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r8, [r0, #16]
	ldr	r3, .L33
	sub	sp, sp, #36
	ldrh	r0, [r8]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r7, [r4, #4]
	bl	ntohs
	mov	r9, r0
	ldrh	r0, [r8, #2]
	bl	ntohs
	ldr	r1, [r4]
	add	r5, r0, #4
	sub	r5, r5, r1
	cmp	r5, #0
	mov	r6, r0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	mov	r1, r5
	mov	r0, r4
	bl	buddy_get
	cmp	r0, #0
	beq	.L1
	mov	r3, #0
	cmp	r7, r3
	str	r3, [r4]
	beq	.L1
	ldr	r3, [r7, #8]
	cmp	r3, #0
	beq	.L1
	ldr	r3, [r7]
	cmp	r3, r9
	bne	.L29
	ldr	r3, [r7, #4]
	sub	r3, r3, #24
	cmp	r6, r3
	bne	.L30
	ldr	r3, [r7, #16]
	ldr	r2, .L33+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1, #4]
	add	r5, sp, #16
	tst	r1, r2
	beq	.L6
	ldr	r1, [r3, #4]
	mov	r2, #6
	mov	r0, r5
	bl	memcpy
	ldr	r3, [r7, #16]
	mov	r2, #6
	ldr	r1, [r3, #12]
	add	r0, sp, #22
	bl	memcpy
.L7:
	mov	r0, #12
	sub	r3, r6, #6
	str	r0, [sp, #4]
	mov	r2, #2
	mov	r1, sp
	ldr	r0, [r4, #12]
	add	r8, r8, #10
	str	r5, [sp]
	str	r8, [sp, #8]
	str	r3, [sp, #12]
	bl	writev
	cmn	r0, #1
	mov	r5, r0
	beq	.L31
.L8:
	add	r6, r6, #6
	cmp	r6, r5
	beq	.L9
	mov	r1, r5
	ldr	r0, .L33+8
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	mov	r3, #0
	ldr	r1, [r7, #12]
	str	r3, [r7, #8]
	cmp	r1, r3
	ldreq	r1, [r4, #4]
	beq	.L11
	mov	r3, r1
	str	r1, [r4, #4]
.L12:
	mov	r2, r3
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L12
	str	r7, [r2, #12]
	str	r3, [r7, #12]
.L11:
	ldr	r3, .L33+12
	ldr	r2, [r1, #8]
	ldr	r3, [r3]
	cmp	r2, #0
	str	r3, [r4, #8]
	beq	.L1
	mov	r0, r4
	bl	send_queue
.L1:
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L30:
	ldr	r0, .L33+16
	bl	puts
	b	.L1
.L29:
	ldr	r0, .L33+20
	bl	puts
	b	.L1
.L6:
	ldr	r1, [r3, #8]
	mov	r0, r5
	mov	r2, #6
	bl	memcpy
	ldr	r3, [r7, #16]
	mov	r2, #6
	ldr	r1, [r3, #4]
	add	r0, sp, #22
	bl	memcpy
	b	.L7
.L31:
	ldr	r1, .L33+24
	mov	r0, #1
	bl	err
	b	.L8
.L32:
	bl	__stack_chk_fail
.L34:
	.align	2
.L33:
	.word	.LC4
	.word	IEEE80211_FC1_DIR_TODS
	.word	.LC3
	.word	S_START
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.size	read_buddy_data, .-read_buddy_data
	.comm	S_START,4,4
	.comm	IEEE80211_FC1_DIR_TODS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
