	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xennet_tx_setup_grant
_xennet_tx_setup_grant:                 ## @xennet_tx_setup_grant
	.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
	movq	%rcx, %rbx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rcx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rcx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rcx), %r14
	leaq	40(%r14), %rdi
	movq	16(%r14), %rsi
	callq	_get_id_from_freelist
	movl	%eax, %r12d
	leaq	36(%r14), %rdi
	movl	36(%r14), %esi
	leal	1(%rsi), %eax
	movl	%eax, 36(%r14)
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_RING_GET_REQUEST
	movq	%rax, %r15
	leaq	32(%r14), %rdi
	callq	_gnttab_claim_grant_reference
	movq	%rax, %r13
	movslq	%r13d, %rdi
	callq	_IS_ERR_VALUE
	movl	%eax, %edi
	callq	_WARN_ON_ONCE
	movq	24(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_GNTMAP_readonly@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_gnttab_grant_foreign_access_ref
	movq	16(%r14), %rax
	movl	%r12d, %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	8(%r14), %rax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	(%r14), %rax
	movq	%r13, (%rax,%rcx,8)
	movl	%r12d, (%r15)
	movq	%r13, 24(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r15)
	movq	$0, 16(%r15)
	movq	%r15, 8(%rbx)
	addl	%eax, (%rbx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GNTMAP_readonly,4,2            ## @GNTMAP_readonly
	.no_dead_strip	_xennet_tx_setup_grant
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xennet_tx_setup_grant
_xennet_tx_setup_grant:                 ; @xennet_tx_setup_grant
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldp	x27, x26, [x3, #24]
	ldr	x28, [x3, #16]
	add	x0, x27, #40
	ldr	x1, [x27, #16]
	bl	_get_id_from_freelist
	mov	x23, x0
	mov	x0, x27
	ldr	w1, [x0, #36]!
	add	w8, w1, #1
	str	w8, [x0]
	bl	_RING_GET_REQUEST
	mov	x24, x0
	add	x0, x27, #32
	bl	_gnttab_claim_grant_reference
	mov	x25, x0
	sxtw	x0, w0
	bl	_IS_ERR_VALUE
	bl	_WARN_ON_ONCE
	ldr	x8, [x27, #24]
	ldr	x8, [x8]
	ldr	w1, [x8]
Lloh0:
	adrp	x8, _GNTMAP_readonly@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GNTMAP_readonly@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x25
	mov	x2, x22
	bl	_gnttab_grant_foreign_access_ref
	ldp	x9, x8, [x27, #8]
	mov	w10, w23
	lsl	x10, x10, #3
	str	x28, [x8, x10]
	str	x26, [x9, x10]
	ldr	x8, [x27]
	str	x25, [x8, x10]
	stp	w23, w21, [x24]
	str	w20, [x24, #8]
	stp	xzr, x25, [x24, #16]
	str	x24, [x19, #8]
	ldr	w8, [x19]
	add	w8, w8, w20
	str	w8, [x19]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GNTMAP_readonly,4,2            ; @GNTMAP_readonly
	.no_dead_strip	_xennet_tx_setup_grant
.subsections_via_symbols
