	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fix_packets
_fix_packets:                           ## @fix_packets
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	jle	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movslq	%esi, %rax
	leaq	(%rdi,%rax,4), %r14
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r15d, %rax
	leaq	(%rbx,%rax,4), %rbx
	cmpq	%r14, %rbx
	jae	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %edi
	callq	_htole32
	movq	%rax, -48(%rbp)
	movl	16(%rbx), %edi
	callq	_htole32
	movq	%rax, -56(%rbp)
	movl	(%rbx), %edi
	callq	_htole32
	movq	%rax, -64(%rbp)
	movl	4(%rbx), %edi
	callq	_htole32
	movq	%rax, -72(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -80(%rbp)
	movl	$1, %edi
	callq	_BPF_WORDALIGN
	movl	%eax, -76(%rbp)
	movslq	8(%rbx), %r13
	movl	(%rbx), %r15d
	cmpq	$40, %r13
	jb	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$255, %r13d
	jg	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13,4), %rax
	cmpq	%r14, %rax
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	-80(%rbp), %rsi
	movl	$40, %edx
	callq	_memcpy
	leaq	160(%rbx), %rdi
	leal	-40(%r13), %edx
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%r13d, %r15d
	movl	%r15d, %edi
	callq	_BPF_WORDALIGN
	movl	%eax, %r15d
	testl	%eax, %eax
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_9
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid header length %d"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid length"

	.no_dead_strip	_fix_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fix_packets
_fix_packets:                           ; @fix_packets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	add	x23, x0, w1, sxtw #2
Lloh0:
	adrp	x24, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
Lloh4:
	adrp	x21, l_.str.1@PAGE
Lloh5:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, w22, sxtw #2
	cmp	x19, x23
	b.hs	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #12]
	bl	_htole32
	str	x0, [sp, #40]
	ldr	w0, [x19, #16]
	bl	_htole32
	str	x0, [sp, #32]
	ldr	w0, [x19]
	bl	_htole32
	str	x0, [sp, #24]
	ldr	w0, [x19, #4]
	bl	_htole32
	str	x0, [sp, #16]
	ldr	w8, [x19, #8]
	str	w8, [sp, #8]
	mov	w0, #1
	bl	_BPF_WORDALIGN
	str	w0, [sp, #12]
	ldrsw	x25, [x19, #8]
	ldr	w26, [x19]
	subs	w22, w25, #40
	b.lo	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w25, #255
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x19, x25, lsl #2
	cmp	x8, x23
	b.hi	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #40
	bl	_memcpy
	add	x0, x19, #160
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x24]
	mov	x8, x25
	str	x8, [sp]
	mov	x1, x20
	bl	_err
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w0, w26, w25
	bl	_BPF_WORDALIGN
	mov	x22, x0
	cmp	w0, #0
	b.gt	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	bl	_err
	b	LBB0_2
LBB0_10:
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid header length %d"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid length"

	.no_dead_strip	_fix_packets
.subsections_via_symbols
