	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_netfront
_setup_netfront:                        ## @setup_netfront
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_GRANT_INVALID_REF@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rsi)
	movq	(%rax), %rax
	movq	%rax, 8(%rsi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsi)
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movq	___GFP_HIGH@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	orl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	leaq	24(%r13), %rbx
	movq	%rax, %rdi
	callq	_SHARED_RING_INIT
	movq	_XEN_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_FRONT_RING_INIT
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_xenbus_grant_ring
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movq	-48(%rbp), %rax
	movq	%rax, (%r13)
	movl	(%r12), %edi
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r12
	leaq	16(%r13), %rbx
	movq	%rax, %rdi
	callq	_SHARED_RING_INIT
	movq	_XEN_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_FRONT_RING_INIT
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_xenbus_grant_ring
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r13)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_setup_netfront_split
	testl	%eax, %eax
	je	LBB0_17
LBB0_6:
	movq	%r13, %rdi
	callq	_setup_netfront_single
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:
	movl	%eax, %ebx
	movq	8(%r13), %rdi
	xorl	%esi, %esi
	callq	_gnttab_end_foreign_access_ref
	jmp	LBB0_12
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_xenbus_dev_fatal
	jmp	LBB0_15
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_xenbus_dev_fatal
	jmp	LBB0_13
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	movq	%r12, %rdi
	callq	_free_page
LBB0_13:
	movq	(%r13), %rdi
	xorl	%esi, %esi
	callq	_gnttab_end_foreign_access_ref
LBB0_14:
	movq	%r14, %rdi
	callq	_free_page
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GRANT_INVALID_REF,8,3          ## @GRANT_INVALID_REF
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	___GFP_HIGH,4,2                 ## @__GFP_HIGH
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocating tx ring page"

	.comm	_XEN_PAGE_SIZE,4,2              ## @XEN_PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"allocating rx ring page"

	.no_dead_strip	_setup_netfront
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_netfront
_setup_netfront:                        ; @setup_netfront
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GRANT_INVALID_REF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRANT_INVALID_REF@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x1]
	ldr	x8, [x8]
	str	x8, [x1, #8]
	mov	x25, x1
	str	xzr, [x25, #16]!
Lloh2:
	adrp	x24, _GFP_NOIO@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GFP_NOIO@GOTPAGEOFF]
	str	xzr, [x1, #24]
	ldr	w8, [x24]
Lloh4:
	adrp	x26, ___GFP_HIGH@GOTPAGE
Lloh5:
	ldr	x26, [x26, ___GFP_HIGH@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	add	x23, x19, #24
	bl	_SHARED_RING_INIT
Lloh6:
	adrp	x27, _XEN_PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _XEN_PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x23
	mov	x1, x20
	bl	_FRONT_RING_INIT
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_xenbus_grant_ring
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	x8, [sp, #8]
	str	x8, [x19]
	ldr	w8, [x24]
	ldr	w9, [x26]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	cbz	x0, LBB0_10
; %bb.3:
	mov	x24, x0
	bl	_SHARED_RING_INIT
	ldr	w2, [x27]
	mov	x0, x25
	mov	x1, x24
	bl	_FRONT_RING_INIT
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x24
	mov	w2, #1
	bl	_xenbus_grant_ring
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	cbz	w22, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_setup_netfront_split
	cbz	w0, LBB0_16
LBB0_6:
	mov	x0, x19
	bl	_setup_netfront_single
	mov	x23, x0
	cbz	w0, LBB0_15
; %bb.7:
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_gnttab_end_foreign_access_ref
	b	LBB0_12
LBB0_8:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w23, w8
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x1, x23
	bl	_xenbus_dev_fatal
	b	LBB0_15
LBB0_9:
	mov	x23, x0
	b	LBB0_14
LBB0_10:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w23, w8
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x1, x23
	bl	_xenbus_dev_fatal
	b	LBB0_13
LBB0_11:
	mov	x23, x0
LBB0_12:
	mov	x0, x24
	bl	_free_page
LBB0_13:
	ldr	x0, [x19]
	mov	w1, #0
	bl	_gnttab_end_foreign_access_ref
LBB0_14:
	mov	x0, x20
	bl	_free_page
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	mov	w23, #0
	b	LBB0_15
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GRANT_INVALID_REF,8,3          ; @GRANT_INVALID_REF
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	___GFP_HIGH,4,2                 ; @__GFP_HIGH
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocating tx ring page"

	.comm	_XEN_PAGE_SIZE,4,2              ; @XEN_PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"allocating rx ring page"

	.no_dead_strip	_setup_netfront
.subsections_via_symbols
