	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macvtap_skb_from_vnet_hdr
_macvtap_skb_from_vnet_hdr:             ## @macvtap_skb_from_vnet_hdr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movq	_VIRTIO_NET_HDR_GSO_NONE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_2:
	movq	_VIRTIO_NET_HDR_GSO_ECN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%esi, %edx
	notl	%edx
	andl	%eax, %edx
	addl	$-128, %edx
	cmpl	$3, %edx
	jae	LBB0_3
## %bb.4:
	testl	%eax, %esi
	je	LBB0_5
## %bb.6:
	movq	_SKB_GSO_TCP_ECN@GOTPCREL(%rip), %rsi
	movzwl	(%rsi), %r12d
	cmpq	$0, 8(%r15)
	jne	LBB0_8
	jmp	LBB0_3
LBB0_5:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%r15)
	je	LBB0_3
LBB0_8:
	movslq	%edx, %rdx
	leaq	l_switch.table.macvtap_skb_from_vnet_hdr(%rip), %rsi
	movq	(%rsi,%rdx,8), %rdx
	orw	(%rdx), %r12w
LBB0_9:
	movq	_VIRTIO_NET_HDR_F_NEEDS_CSUM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 16(%r15)
	je	LBB0_12
## %bb.10:
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	movq	%r14, %rdi
	callq	_skb_partial_csum_set
	testl	%eax, %eax
	je	LBB0_3
## %bb.11:
	movl	(%r15), %eax
	movl	(%rbx), %ecx
LBB0_12:
	xorl	%ebx, %ebx
	cmpl	%ecx, %eax
	je	LBB0_14
## %bb.13:
	movq	8(%r15), %r15
	movq	%r14, %rdi
	callq	_skb_shinfo
	movq	%r15, (%rax)
	movq	%r14, %rdi
	callq	_skb_shinfo
	movw	%r12w, 8(%rax)
	movq	_SKB_GSO_DODGY@GOTPCREL(%rip), %rax
	movzwl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_skb_shinfo
	orw	%r15w, 8(%rax)
	movq	%r14, %rdi
	callq	_skb_shinfo
	movq	$0, 16(%rax)
	jmp	LBB0_14
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIRTIO_NET_HDR_GSO_NONE,4,2    ## @VIRTIO_NET_HDR_GSO_NONE
	.comm	_VIRTIO_NET_HDR_GSO_ECN,4,2     ## @VIRTIO_NET_HDR_GSO_ECN
	.comm	_SKB_GSO_TCPV4,2,1              ## @SKB_GSO_TCPV4
	.comm	_SKB_GSO_TCPV6,2,1              ## @SKB_GSO_TCPV6
	.comm	_SKB_GSO_UDP,2,1                ## @SKB_GSO_UDP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SKB_GSO_TCP_ECN,2,1            ## @SKB_GSO_TCP_ECN
	.comm	_VIRTIO_NET_HDR_F_NEEDS_CSUM,4,2 ## @VIRTIO_NET_HDR_F_NEEDS_CSUM
	.comm	_SKB_GSO_DODGY,2,1              ## @SKB_GSO_DODGY
	.no_dead_strip	_macvtap_skb_from_vnet_hdr
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.macvtap_skb_from_vnet_hdr
l_switch.table.macvtap_skb_from_vnet_hdr:
	.quad	_SKB_GSO_UDP
	.quad	_SKB_GSO_TCPV6
	.quad	_SKB_GSO_TCPV4

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macvtap_skb_from_vnet_hdr
_macvtap_skb_from_vnet_hdr:             ; @macvtap_skb_from_vnet_hdr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x22, _VIRTIO_NET_HDR_GSO_NONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VIRTIO_NET_HDR_GSO_NONE@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_5
LBB0_2:
Lloh2:
	adrp	x10, _VIRTIO_NET_HDR_GSO_ECN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VIRTIO_NET_HDR_GSO_ECN@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x10]
	bic	w10, w8, w11
	sub	w10, w10, #128
	cmp	w10, #3
	b.hs	LBB0_10
; %bb.3:
Lloh5:
	adrp	x12, _SKB_GSO_TCP_ECN@GOTPAGE
Lloh6:
	ldr	x12, [x12, _SKB_GSO_TCP_ECN@GOTPAGEOFF]
	ldrh	w12, [x12]
	tst	w11, w8
	csel	w11, wzr, w12, eq
	ldr	x12, [x20, #8]
	cbz	x12, LBB0_10
; %bb.4:
Lloh7:
	adrp	x12, l_switch.table.macvtap_skb_from_vnet_hdr@PAGE
Lloh8:
	add	x12, x12, l_switch.table.macvtap_skb_from_vnet_hdr@PAGEOFF
	ldr	x10, [x12, w10, sxtw #3]
	ldrh	w10, [x10]
	orr	w21, w11, w10
LBB0_5:
	ldr	w10, [x20, #16]
Lloh9:
	adrp	x11, _VIRTIO_NET_HDR_F_NEEDS_CSUM@GOTPAGE
Lloh10:
	ldr	x11, [x11, _VIRTIO_NET_HDR_F_NEEDS_CSUM@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_8
; %bb.6:
	ldp	w2, w1, [x20, #20]
	mov	x0, x19
	bl	_skb_partial_csum_set
	cbz	w0, LBB0_10
; %bb.7:
	ldr	w8, [x20]
	ldr	w9, [x22]
LBB0_8:
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
	mov	w0, #0
	b	LBB0_12
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	ldr	x20, [x20, #8]
	mov	x0, x19
	bl	_skb_shinfo
	str	x20, [x0]
	mov	x0, x19
	bl	_skb_shinfo
	strh	w21, [x0, #8]
Lloh15:
	adrp	x8, _SKB_GSO_DODGY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SKB_GSO_DODGY@GOTPAGEOFF]
	ldrh	w20, [x8]
	mov	x0, x19
	bl	_skb_shinfo
	ldrh	w8, [x0, #8]
	orr	w8, w8, w20
	strh	w8, [x0, #8]
	mov	x0, x19
	bl	_skb_shinfo
	mov	x8, x0
	mov	w0, #0
	str	xzr, [x8, #16]
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_VIRTIO_NET_HDR_GSO_NONE,4,2    ; @VIRTIO_NET_HDR_GSO_NONE
	.comm	_VIRTIO_NET_HDR_GSO_ECN,4,2     ; @VIRTIO_NET_HDR_GSO_ECN
	.comm	_SKB_GSO_TCPV4,2,1              ; @SKB_GSO_TCPV4
	.comm	_SKB_GSO_TCPV6,2,1              ; @SKB_GSO_TCPV6
	.comm	_SKB_GSO_UDP,2,1                ; @SKB_GSO_UDP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SKB_GSO_TCP_ECN,2,1            ; @SKB_GSO_TCP_ECN
	.comm	_VIRTIO_NET_HDR_F_NEEDS_CSUM,4,2 ; @VIRTIO_NET_HDR_F_NEEDS_CSUM
	.comm	_SKB_GSO_DODGY,2,1              ; @SKB_GSO_DODGY
	.no_dead_strip	_macvtap_skb_from_vnet_hdr
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.macvtap_skb_from_vnet_hdr
l_switch.table.macvtap_skb_from_vnet_hdr:
	.quad	_SKB_GSO_UDP
	.quad	_SKB_GSO_TCPV6
	.quad	_SKB_GSO_TCPV4

.subsections_via_symbols
