	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hamachi_init_ring
_hamachi_init_ring:                     ## @hamachi_init_ring
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	$0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rax)
	movq	$0, 72(%rax)
	movl	(%r14), %esi
	cmpl	$1493, %esi                     ## imm = 0x5D5
	jge	LBB0_1
## %bb.2:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_3
LBB0_1:
	addl	$49, %esi
	andl	$-8, %esi
LBB0_3:
	movl	%esi, 8(%r15)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.8:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.9:
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_4:
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_14:
	movl	%eax, %edx
	andl	$-2, %edx
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rbx
	movq	$0, (%rbx,%rdi)
	movq	48(%r15), %rbx
	movq	$0, (%rbx,%rcx,8)
	movq	32(%r15), %rbx
	movq	$0, 16(%rbx,%rdi)
	movq	48(%r15), %rbx
	movq	$0, 8(%rbx,%rcx,8)
	addq	$2, %rcx
	addq	$32, %rdi
	cmpq	%rcx, %rdx
	jne	LBB0_15
LBB0_10:
	testb	$1, %al
	je	LBB0_12
## %bb.11:
	movq	32(%r15), %rax
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	$0, (%rax,%rdx)
	movq	48(%r15), %rax
	movq	$0, (%rax,%rcx,8)
LBB0_12:
	addl	$2, %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb
	movq	%rax, %rbx
	movq	48(%r15), %rax
	movq	%rbx, (%rax)
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.18:
	movl	$1, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movl	8(%r15), %edx
	movl	40(%r15), %edi
	movl	(%rbx), %esi
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %edi
	callq	_cpu_to_leXX
	movq	32(%r15), %rcx
	movl	%eax, 8(%rcx,%r12)
	movq	_DescEndPacket@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DescOwn@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_DescIntr@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	8(%r15), %edi
	addl	$-2, %edi
	orl	%eax, %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, (%rcx,%r12)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_5
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	8(%r15), %esi
	addl	$2, %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb
	movq	%rax, %rbx
	movq	48(%r15), %rax
	movq	%rbx, (%rax,%r13,8)
	incq	%r13
	addq	$16, %r12
	testq	%rbx, %rbx
	jne	LBB0_19
## %bb.16:
	decq	%r13
	jmp	LBB0_17
LBB0_13:
	xorl	%r13d, %r13d
LBB0_17:
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	subl	%eax, %r13d
	movl	%r13d, (%r15)
	movq	_DescEndRing@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	shlq	$4, %rdx
	orq	%rax, -16(%rdx,%rcx)
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_25
## %bb.6:
	cmpl	$1, %eax
	jne	LBB0_21
## %bb.7:
	xorl	%ecx, %ecx
	jmp	LBB0_23
LBB0_21:
	movl	%eax, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	16(%r15), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	24(%r15), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	movq	16(%r15), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_22
LBB0_23:
	testb	$1, %al
	je	LBB0_25
## %bb.24:
	movq	24(%r15), %rax
	movq	$0, (%rax,%rcx,8)
	movq	16(%r15), %rax
	movq	$0, (%rax,%rcx,8)
LBB0_25:
	movl	(%r14), %edi
	callq	_cpu_to_le32
	movq	16(%r15), %rcx
	movslq	(%rbx), %rdx
	orq	%rax, -8(%rcx,%rdx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_DescOwn,4,2                    ## @DescOwn
	.comm	_DescEndPacket,4,2              ## @DescEndPacket
	.comm	_DescIntr,4,2                   ## @DescIntr
	.comm	_DescEndRing,4,2                ## @DescEndRing
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.no_dead_strip	_hamachi_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hamachi_init_ring
_hamachi_init_ring:                     ; @hamachi_init_ring
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	str	xzr, [x0]
	stp	xzr, xzr, [x0, #64]
	str	xzr, [x0, #56]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PKT_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w10, w8, #49
	and	w10, w10, #0xfffffff8
	cmp	w8, #1493
	csel	w9, w9, w10, lt
	str	w9, [x0, #8]
Lloh3:
	adrp	x22, _RX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x10, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x19, #32]
	lsl	x12, x10, #4
	str	xzr, [x11, x12]
	ldr	x11, [x19, #48]
	str	xzr, [x11, x10, lsl #3]
	add	x10, x10, #1
	cmp	x10, x8
	b.ne	LBB0_2
; %bb.3:
	add	w1, w9, #2
	mov	x0, x20
	bl	_netdev_alloc_skb
	ldr	x8, [x19, #48]
	str	x0, [x8]
	cbz	x0, LBB0_9
; %bb.4:
	mov	x21, x0
	mov	x24, #0
	mov	w23, #1
Lloh5:
	adrp	x25, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh7:
	adrp	x26, _DescOwn@GOTPAGE
Lloh8:
	ldr	x26, [x26, _DescOwn@GOTPAGEOFF]
Lloh9:
	adrp	x27, _DescEndPacket@GOTPAGE
Lloh10:
	ldr	x27, [x27, _DescEndPacket@GOTPAGEOFF]
Lloh11:
	adrp	x28, _DescIntr@GOTPAGE
Lloh12:
	ldr	x28, [x28, _DescIntr@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #2
	bl	_skb_reserve
	ldr	w0, [x19, #40]
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
	ldr	w3, [x25]
	bl	_pci_map_single
	bl	_cpu_to_leXX
	ldr	x8, [x19, #32]
	add	x8, x8, x24
	str	w0, [x8, #8]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x28]
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	sub	w9, w9, #2
	orr	w0, w8, w9
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	str	x0, [x8, x24]
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	add	w1, w8, #2
	mov	x0, x20
	bl	_netdev_alloc_skb
	mov	x21, x0
	ldr	x8, [x19, #48]
	str	x0, [x8, x23, lsl #3]
	add	x23, x23, #1
	add	x24, x24, #16
	cbnz	x0, LBB0_5
; %bb.7:
	sub	x23, x23, #1
	ldr	w8, [x22]
	b	LBB0_11
LBB0_8:
	mov	w23, #0
	b	LBB0_11
LBB0_9:
	mov	x23, #0
	ldr	w8, [x22]
	b	LBB0_11
LBB0_10:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_11:
	sub	w8, w23, w8
	str	w8, [x19]
Lloh13:
	adrp	x20, _DescEndRing@GOTPAGE
Lloh14:
	ldr	x20, [x20, _DescEndRing@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #4
	ldur	x9, [x8, #-16]
	orr	x9, x9, x0
	stur	x9, [x8, #-16]
Lloh15:
	adrp	x21, _TX_RING_SIZE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	str	xzr, [x10, x8]
	ldr	x10, [x19, #16]
	str	xzr, [x10, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_13
LBB0_14:
	ldr	w0, [x20]
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #3
	ldur	x9, [x8, #-8]
	orr	x9, x9, x0
	stur	x9, [x8, #-8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_DescOwn,4,2                    ; @DescOwn
	.comm	_DescEndPacket,4,2              ; @DescEndPacket
	.comm	_DescIntr,4,2                   ; @DescIntr
	.comm	_DescEndRing,4,2                ; @DescEndRing
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.no_dead_strip	_hamachi_init_ring
.subsections_via_symbols
