	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ena_com_validate_version       ## -- Begin function ena_com_validate_version
	.p2align	4, 0x90
_ena_com_validate_version:              ## @ena_com_validate_version
	.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, %rbx
	movq	_ENA_REGS_VERSION_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ena_com_reg_bar_read32
	movl	%eax, %r12d
	movq	_ENA_REGS_CONTROLLER_VERSION_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ena_com_reg_bar_read32
	movl	%eax, %r14d
	movq	_ENA_MMIO_READ_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r12d
	sete	%cl
	cmpl	%eax, %r14d
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_4
LBB0_2:
	movq	_ENA_REGS_VERSION_MAJOR_VERSION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%r12d, %esi
	movq	_ENA_REGS_VERSION_MAJOR_VERSION_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movq	_ENA_REGS_VERSION_MINOR_VERSION_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_pr_info
	movq	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	andl	%r14d, %esi
	movq	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movq	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	andl	%r14d, %edx
	movq	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	_ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	andl	%r14d, %eax
	movq	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	andl	%r14d, %r8d
	movq	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r8d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_info
	movl	(%r13), %eax
	orl	(%r12), %eax
	orl	(%rbx), %eax
	andl	%r14d, %eax
	movq	_MIN_ENA_CTRL_VER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	movl	$-1, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_REGS_VERSION_OFF,4,2       ## @ENA_REGS_VERSION_OFF
	.comm	_ENA_REGS_CONTROLLER_VERSION_OFF,4,2 ## @ENA_REGS_CONTROLLER_VERSION_OFF
	.comm	_ENA_MMIO_READ_TIMEOUT,4,2      ## @ENA_MMIO_READ_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reg read timeout occurred\n"

	.comm	_ETIME,4,2                      ## @ETIME
L_.str.1:                               ## @.str.1
	.asciz	"ena device version: %d.%d\n"

	.comm	_ENA_REGS_VERSION_MAJOR_VERSION_MASK,4,2 ## @ENA_REGS_VERSION_MAJOR_VERSION_MASK
	.comm	_ENA_REGS_VERSION_MAJOR_VERSION_SHIFT,4,2 ## @ENA_REGS_VERSION_MAJOR_VERSION_SHIFT
	.comm	_ENA_REGS_VERSION_MINOR_VERSION_MASK,4,2 ## @ENA_REGS_VERSION_MINOR_VERSION_MASK
L_.str.2:                               ## @.str.2
	.asciz	"ena controller version: %d.%d.%d implementation version %d\n"

	.comm	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK,4,2 ## @ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT,4,2 ## @ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT
	.comm	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK,4,2 ## @ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT,4,2 ## @ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT
	.comm	_ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK,4,2 ## @ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK,4,2 ## @ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT,4,2 ## @ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT
	.comm	_MIN_ENA_CTRL_VER,4,2           ## @MIN_ENA_CTRL_VER
L_.str.3:                               ## @.str.3
	.asciz	"ENA ctrl version is lower than the minimal ctrl version the driver supports\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ena_com_validate_version       ; -- Begin function ena_com_validate_version
	.p2align	2
_ena_com_validate_version:              ; @ena_com_validate_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x8, _ENA_REGS_VERSION_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENA_REGS_VERSION_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ena_com_reg_bar_read32
	mov	x20, x0
Lloh3:
	adrp	x8, _ENA_REGS_CONTROLLER_VERSION_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENA_REGS_CONTROLLER_VERSION_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ena_com_reg_bar_read32
	mov	x19, x0
Lloh6:
	adrp	x8, _ENA_MMIO_READ_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENA_MMIO_READ_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w20, w8
	ccmp	w0, w8, #4, ne
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _ETIME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
Lloh14:
	adrp	x8, _ENA_REGS_VERSION_MAJOR_VERSION_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENA_REGS_VERSION_MAJOR_VERSION_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh17:
	adrp	x9, _ENA_REGS_VERSION_MAJOR_VERSION_SHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ENA_REGS_VERSION_MAJOR_VERSION_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	asr	w1, w8, w9
Lloh20:
	adrp	x8, _ENA_REGS_VERSION_MINOR_VERSION_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENA_REGS_VERSION_MINOR_VERSION_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w2, w8, w20
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
Lloh25:
	adrp	x20, _ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK@GOTPAGE
Lloh26:
	ldr	x20, [x20, _ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK@GOTPAGEOFF]
	ldr	w8, [x20]
	and	w8, w8, w19
Lloh27:
	adrp	x9, _ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	asr	w1, w8, w9
Lloh30:
	adrp	x21, _ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK@GOTPAGE
Lloh31:
	ldr	x21, [x21, _ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	and	w8, w8, w19
Lloh32:
	adrp	x9, _ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	asr	w2, w8, w9
Lloh35:
	adrp	x22, _ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK@GOTPAGE
Lloh36:
	ldr	x22, [x22, _ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w8, w8, w19
Lloh37:
	adrp	x9, _ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	and	w9, w9, w19
Lloh40:
	adrp	x10, _ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT@GOTPAGE
Lloh41:
	ldr	x10, [x10, _ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	asr	w9, w9, w10
	stp	x8, x9, [sp]
Lloh43:
	adrp	x0, l_.str.2@PAGE
Lloh44:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	w8, [x20]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w8, w8, w9
	and	w8, w8, w19
Lloh45:
	adrp	x9, _MIN_ENA_CTRL_VER@GOTPAGE
Lloh46:
	ldr	x9, [x9, _MIN_ENA_CTRL_VER@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.3:
Lloh48:
	adrp	x0, l_.str.3@PAGE
Lloh49:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_REGS_VERSION_OFF,4,2       ; @ENA_REGS_VERSION_OFF
	.comm	_ENA_REGS_CONTROLLER_VERSION_OFF,4,2 ; @ENA_REGS_CONTROLLER_VERSION_OFF
	.comm	_ENA_MMIO_READ_TIMEOUT,4,2      ; @ENA_MMIO_READ_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reg read timeout occurred\n"

	.comm	_ETIME,4,2                      ; @ETIME
l_.str.1:                               ; @.str.1
	.asciz	"ena device version: %d.%d\n"

	.comm	_ENA_REGS_VERSION_MAJOR_VERSION_MASK,4,2 ; @ENA_REGS_VERSION_MAJOR_VERSION_MASK
	.comm	_ENA_REGS_VERSION_MAJOR_VERSION_SHIFT,4,2 ; @ENA_REGS_VERSION_MAJOR_VERSION_SHIFT
	.comm	_ENA_REGS_VERSION_MINOR_VERSION_MASK,4,2 ; @ENA_REGS_VERSION_MINOR_VERSION_MASK
l_.str.2:                               ; @.str.2
	.asciz	"ena controller version: %d.%d.%d implementation version %d\n"

	.comm	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK,4,2 ; @ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT,4,2 ; @ENA_REGS_CONTROLLER_VERSION_MAJOR_VERSION_SHIFT
	.comm	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK,4,2 ; @ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT,4,2 ; @ENA_REGS_CONTROLLER_VERSION_MINOR_VERSION_SHIFT
	.comm	_ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK,4,2 ; @ENA_REGS_CONTROLLER_VERSION_SUBMINOR_VERSION_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK,4,2 ; @ENA_REGS_CONTROLLER_VERSION_IMPL_ID_MASK
	.comm	_ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT,4,2 ; @ENA_REGS_CONTROLLER_VERSION_IMPL_ID_SHIFT
	.comm	_MIN_ENA_CTRL_VER,4,2           ; @MIN_ENA_CTRL_VER
l_.str.3:                               ; @.str.3
	.asciz	"ENA ctrl version is lower than the minimal ctrl version the driver supports\n"

.subsections_via_symbols
