	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_buddy_data                ## -- Begin function read_buddy_data
	.p2align	4, 0x90
_read_buddy_data:                       ## @read_buddy_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	24(%rdi), %r13
	movzwl	(%r13), %edi
	callq	_ntohs
	movl	%eax, %r15d
	movzwl	2(%r13), %edi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%eax, %ebx
	subl	(%r12), %ebx
	addl	$4, %ebx
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rbx
	callq	_buddy_get
	testl	%eax, %eax
	je	LBB0_23
## %bb.1:
	movl	$0, (%r12)
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.2:
	cmpq	$0, 8(%rbx)
	je	LBB0_23
## %bb.3:
	cmpl	%r15d, (%rbx)
	jne	LBB0_4
## %bb.7:
	movl	4(%rbx), %eax
	addl	$-32, %eax
	movq	-104(%rbp), %r14                ## 8-byte Reload
	cmpl	%r14d, %eax
	jne	LBB0_8
## %bb.10:
	movq	24(%rbx), %rax
	movq	(%rax), %rcx
	movq	_IEEE80211_FC1_DIR_TODS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%rcx)
	je	LBB0_12
## %bb.11:
	movl	8(%rax), %esi
	leaq	-60(%rbp), %rdi
	movl	$6, %edx
	callq	_memcpy
	leaq	-54(%rbp), %rdi
	movq	24(%rbx), %rax
	addq	$16, %rax
	jmp	LBB0_13
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.5:
	leaq	L_str.4(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.9:
	leaq	L_str(%rip), %rdi
LBB0_6:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_12:
	movl	12(%rax), %esi
	leaq	-60(%rbp), %rdi
	movl	$6, %edx
	callq	_memcpy
	leaq	-54(%rbp), %rdi
	movq	24(%rbx), %rax
	addq	$8, %rax
LBB0_13:
	movl	(%rax), %esi
	movl	$6, %edx
	callq	_memcpy
	leaq	-60(%rbp), %rax
	movq	%rax, -96(%rbp)
	movl	$12, -88(%rbp)
	addq	$10, %r13
	movq	%r13, -80(%rbp)
	leal	-6(%r14), %eax
	movl	%eax, -72(%rbp)
	movl	20(%r12), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_writev
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_15:
	addl	$6, %r14d
	cmpl	%r14d, %r15d
	jne	LBB0_25
## %bb.16:
	movq	$0, 8(%rbx)
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, 8(%r12)
	movq	%rax, %rdx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rcx
	movq	16(%rdx), %rdx
	testq	%rdx, %rdx
	jne	LBB0_19
## %bb.20:
	movq	%rbx, 16(%rcx)
	movq	$0, 16(%rbx)
	jmp	LBB0_21
LBB0_17:
	movq	8(%r12), %rax
LBB0_21:
	movq	_S_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r12)
	cmpq	$0, 8(%rax)
	je	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	callq	_send_queue
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.26:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
LBB0_25:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_FC1_DIR_TODS,4,2     ## @IEEE80211_FC1_DIR_TODS
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"writev()"

L_.str.3:                               ## @.str.3
	.asciz	"Short write %d\n"

	.comm	_S_START,4,2                    ## @S_START
L_str:                                  ## @str
	.asciz	"Diff len"

L_str.4:                                ## @str.4
	.asciz	"Diff ID"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_buddy_data                ; -- Begin function read_buddy_data
	.p2align	2
_read_buddy_data:                       ; @read_buddy_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x24, [x0, #24]
	ldr	x23, [x0, #8]
	ldrh	w0, [x24]
	bl	_ntohs
	mov	x21, x0
	ldrh	w0, [x24, #2]
	bl	_ntohs
	mov	x20, x0
	ldr	w8, [x19]
	sub	w8, w0, w8
	add	w22, w8, #4
	cmp	w22, #0
	cset	w0, gt
	bl	_assert
	mov	x0, x19
	mov	x1, x22
	bl	_buddy_get
	cbz	w0, LBB0_23
; %bb.1:
	str	wzr, [x19]
	cbz	x23, LBB0_23
; %bb.2:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_23
; %bb.3:
	ldr	w8, [x23]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x23, #4]
	sub	w8, w8, #32
	cmp	w8, w20
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x23, #24]
	ldr	x9, [x8]
	ldr	w9, [x9, #4]
Lloh3:
	adrp	x10, _IEEE80211_FC1_DIR_TODS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IEEE80211_FC1_DIR_TODS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.6:
	ldr	w1, [x8, #8]
	add	x21, sp, #44
	add	x0, sp, #44
	mov	w2, #6
	bl	_memcpy
	add	x0, x21, #6
	ldr	x8, [x23, #24]
	add	x8, x8, #16
	b	LBB0_13
LBB0_7:
	ldr	x8, [sp, #56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.8:
Lloh9:
	adrp	x0, l_str.4@PAGE
Lloh10:
	add	x0, x0, l_str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	x8, [sp, #56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.10:
Lloh14:
	adrp	x0, l_str@PAGE
Lloh15:
	add	x0, x0, l_str@PAGEOFF
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_puts
LBB0_12:
	ldr	w1, [x8, #12]
	add	x21, sp, #44
	add	x0, sp, #44
	mov	w2, #6
	bl	_memcpy
	add	x0, x21, #6
	ldr	x8, [x23, #24]
	add	x8, x8, #8
LBB0_13:
	ldr	w1, [x8]
	mov	w2, #6
	bl	_memcpy
	add	x8, sp, #44
	str	x8, [sp, #8]
	mov	w8, #12
	str	w8, [sp, #16]
	add	x8, x24, #10
	str	x8, [sp, #24]
	sub	w8, w20, #6
	str	w8, [sp, #32]
	ldr	w0, [x19, #20]
	add	x1, sp, #8
	mov	w2, #2
	bl	_writev
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_15
; %bb.14:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_15:
	add	w8, w20, #6
	cmp	w21, w8
	b.ne	LBB0_26
; %bb.16:
	str	xzr, [x23, #8]
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_20
; %bb.17:
	str	x8, [x19, #8]
	mov	x10, x8
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x9, x10
	ldr	x10, [x10, #16]
	cbnz	x10, LBB0_18
; %bb.19:
	str	x23, [x9, #16]
	str	xzr, [x23, #16]
	b	LBB0_21
LBB0_20:
	ldr	x8, [x19, #8]
LBB0_21:
Lloh18:
	adrp	x9, _S_START@GOTPAGE
Lloh19:
	ldr	x9, [x9, _S_START@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_send_queue
LBB0_23:
	ldr	x8, [sp, #56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	bl	___stack_chk_fail
LBB0_26:
	str	x21, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_FC1_DIR_TODS,4,2     ; @IEEE80211_FC1_DIR_TODS
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"writev()"

l_.str.3:                               ; @.str.3
	.asciz	"Short write %d\n"

	.comm	_S_START,4,2                    ; @S_START
l_str:                                  ; @str
	.asciz	"Diff len"

l_str.4:                                ; @str.4
	.asciz	"Diff ID"

.subsections_via_symbols
