	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netmap_init
_netmap_init:                           ## @netmap_init
	.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	%rcx, %r14
	movl	%edx, %r15d
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	(%rbx), %rdi
	movl	$8, %edx
	callq	_strlcpy
	movq	(%rbx), %rax
	movb	$0, 7(%rax)
	movq	(%rbx), %rdi
	movq	_NETMAP_NO_TX_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_nm_open
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	8(%rax), %ecx
	movl	%ecx, 44(%rbx)
	movl	4(%rax), %edi
	xorl	%esi, %esi
	callq	_NETMAP_TXRING
	movl	%eax, 40(%rbx)
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	xorl	%esi, %esi
	callq	_NETMAP_RXRING
	movl	%eax, 36(%rbx)
	movl	%r15d, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movl	%edi, (%r13)
	movq	_EVF_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_mevent_add_disabled
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_WPRINTF
	jmp	LBB0_4
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rdi
	callq	_WPRINTF
	movq	%rbx, %rdi
	callq	_free
LBB0_4:
	movl	$-1, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETMAP_NO_TX_POLL,4,2          ## @NETMAP_NO_TX_POLL
	.comm	_errno,4,2                      ## @errno
	.comm	_EVF_READ,4,2                   ## @EVF_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Could not register event\n"

	.no_dead_strip	_netmap_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netmap_init
_netmap_init:                           ; @netmap_init
	.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, x3
	mov	x21, x2
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldr	x0, [x19]
	mov	w2, #8
	bl	_strlcpy
	ldr	x8, [x19]
	strb	wzr, [x8, #7]
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _NETMAP_NO_TX_POLL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETMAP_NO_TX_POLL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, #0
	mov	x3, #0
	bl	_nm_open
	str	x0, [x19, #16]
	cbz	x0, LBB0_3
; %bb.1:
	ldp	w0, w8, [x0, #4]
	str	w8, [x19, #44]
	mov	w1, #0
	bl	_NETMAP_TXRING
	str	w0, [x19, #40]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	mov	w1, #0
	bl	_NETMAP_RXRING
	stp	w21, w0, [x19, #32]
	str	x20, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	str	w0, [x22]
Lloh3:
	adrp	x8, _EVF_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVF_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x21
	mov	x3, x20
	bl	_mevent_add_disabled
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	cbnz	x8, LBB0_5
; %bb.2:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WPRINTF
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_WPRINTF
	mov	x0, x19
	bl	_free
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NETMAP_NO_TX_POLL,4,2          ; @NETMAP_NO_TX_POLL
	.comm	_errno,4,2                      ; @errno
	.comm	_EVF_READ,4,2                   ; @EVF_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Could not register event\n"

	.no_dead_strip	_netmap_init
.subsections_via_symbols
