	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gve_setup_device_resources
_gve_setup_device_resources:            ## @gve_setup_device_resources
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_gve_alloc_counter_array
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_gve_alloc_notify_blocks
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	20(%r14), %esi
	movl	16(%r14), %edx
	movl	8(%r14), %r8d
	movl	12(%r14), %ecx
	movq	%r14, %rdi
	callq	_gve_adminq_configure_device_resources
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_gve_free_notify_blocks
LBB0_4:
	movq	%r14, %rdi
	callq	_gve_free_counter_array
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_gve_set_device_resources_ok
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not setup device_resources: err=%d\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_gve_setup_device_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gve_setup_device_resources
_gve_setup_device_resources:            ; @gve_setup_device_resources
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_gve_alloc_counter_array
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_gve_alloc_notify_blocks
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldp	w2, w1, [x19, #16]
	ldp	w4, w3, [x19, #8]
	mov	x0, x19
	bl	_gve_adminq_configure_device_resources
	mov	x20, x0
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _ENXIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_gve_free_notify_blocks
LBB0_4:
	mov	x0, x19
	bl	_gve_free_counter_array
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_gve_set_device_resources_ok
	mov	w20, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not setup device_resources: err=%d\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_gve_setup_device_resources
.subsections_via_symbols
