	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_device_init
_ena_device_init:                       ## @ena_device_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	4(%rsi), %r15
	callq	_ena_com_mmio_reg_read_request_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_ENA_MMIO_DISABLE_REG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	(%rbx), %eax
	sete	%sil
	movq	%r12, %rdi
	callq	_ena_com_set_mmio_read_mode
	movq	_ENA_REGS_RESET_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ena_com_dev_reset
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %r15
	movq	%r12, %rdi
	callq	_ena_com_validate_version
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	%r12, %rdi
	callq	_ena_com_mmio_reg_read_request_destroy
LBB0_8:
	movl	%ebx, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	callq	_ena_com_get_dma_width
	testl	%eax, %eax
	js	LBB0_13
## %bb.11:
	movl	%eax, %edi
	movl	%eax, %ebx
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_16
LBB0_14:
	movl	%ebx, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	leaq	L_.str.5(%rip), %rsi
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	movl	%eax, %edx
LBB0_17:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_18:
	movq	_aenq_handlers@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_ena_com_admin_init
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_6
LBB0_20:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_ena_com_set_admin_polling_mode
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ena_config_host_info
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ena_com_get_dev_attr_feat
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_24
LBB0_22:
	movq	_ENA_ADMIN_LINK_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_ENA_ADMIN_FATAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movq	_ENA_ADMIN_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ENA_ADMIN_NOTIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	orl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	orl	%r15d, %ebx
	movq	_ENA_ADMIN_KEEP_ALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	orl	%ebx, %r15d
	andl	(%r14), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_ena_com_set_aenq_config
	testl	%eax, %eax
	je	LBB0_25
## %bb.23:
	leaq	L_.str.8(%rip), %rsi
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	callq	_ena_com_delete_host_info
	movq	%r12, %rdi
	callq	_ena_com_admin_destroy
	jmp	LBB0_7
LBB0_25:
	movq	_ENA_ADMIN_KEEP_ALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	xorl	%ecx, %ecx
	testl	%r15d, %eax
	setne	%cl
	movl	%ecx, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init mmio read less\n"

	.comm	_ENA_MMIO_DISABLE_REG_READ,4,2  ## @ENA_MMIO_DISABLE_REG_READ
	.comm	_ENA_REGS_RESET_NORMAL,4,2      ## @ENA_REGS_RESET_NORMAL
L_.str.1:                               ## @.str.1
	.asciz	"Can not reset device\n"

L_.str.2:                               ## @.str.2
	.asciz	"device version is too low\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid dma width value %d"

L_.str.4:                               ## @.str.4
	.asciz	"pci_set_dma_mask failed 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"err_pci_set_consistent_dma_mask failed 0x%x\n"

	.comm	_aenq_handlers,4,2              ## @aenq_handlers
L_.str.6:                               ## @.str.6
	.asciz	"Can not initialize ena admin queue with device\n"

L_.str.7:                               ## @.str.7
	.asciz	"Cannot get attribute for ena device rc=%d\n"

	.comm	_ENA_ADMIN_LINK_CHANGE,4,2      ## @ENA_ADMIN_LINK_CHANGE
	.comm	_ENA_ADMIN_FATAL_ERROR,4,2      ## @ENA_ADMIN_FATAL_ERROR
	.comm	_ENA_ADMIN_WARNING,4,2          ## @ENA_ADMIN_WARNING
	.comm	_ENA_ADMIN_NOTIFICATION,4,2     ## @ENA_ADMIN_NOTIFICATION
	.comm	_ENA_ADMIN_KEEP_ALIVE,4,2       ## @ENA_ADMIN_KEEP_ALIVE
L_.str.8:                               ## @.str.8
	.asciz	"Cannot configure aenq groups rc= %d\n"

	.no_dead_strip	_ena_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_device_init
_ena_device_init:                       ; @ena_device_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	add	x20, x1, #4
	bl	_ena_com_mmio_reg_read_request_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _ENA_MMIO_DISABLE_REG_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ENA_MMIO_DISABLE_REG_READ@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, eq
	mov	x0, x19
	bl	_ena_com_set_mmio_read_mode
Lloh5:
	adrp	x8, _ENA_REGS_RESET_NORMAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENA_REGS_RESET_NORMAL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ena_com_dev_reset
	cbz	w0, LBB0_4
; %bb.3:
	mov	x23, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_ena_com_validate_version
	cbz	w0, LBB0_9
; %bb.5:
	mov	x23, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_dev_err
LBB0_7:
	mov	x0, x19
	bl	_ena_com_mmio_reg_read_request_destroy
LBB0_8:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
LBB0_9:
	mov	x0, x19
	bl	_ena_com_get_dma_width
	mov	x23, x0
	tbnz	w0, #31, LBB0_12
; %bb.10:
	mov	x0, x23
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x24
	bl	_pci_set_dma_mask
	cbz	w0, LBB0_13
; %bb.11:
	mov	x25, x0
	str	x25, [sp]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x23, x25
	b	LBB0_7
LBB0_12:
	str	x23, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_13:
	mov	x0, x23
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x24
	bl	_pci_set_consistent_dma_mask
	cbz	w0, LBB0_15
; %bb.14:
	mov	x23, x0
	str	x23, [sp]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_7
LBB0_15:
Lloh18:
	adrp	x1, _aenq_handlers@GOTPAGE
Lloh19:
	ldr	x1, [x1, _aenq_handlers@GOTPAGEOFF]
	mov	x0, x19
	bl	_ena_com_admin_init
	cbz	w0, LBB0_17
; %bb.16:
	mov	x23, x0
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_6
LBB0_17:
	mov	x0, x19
	mov	w1, #1
	bl	_ena_com_set_admin_polling_mode
	mov	x0, x19
	mov	x1, x24
	bl	_ena_config_host_info
	mov	x0, x19
	mov	x1, x22
	bl	_ena_com_get_dev_attr_feat
	cbz	w0, LBB0_19
; %bb.18:
	mov	x23, x0
	str	x23, [sp]
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_21
LBB0_19:
Lloh24:
	adrp	x8, _ENA_ADMIN_LINK_CHANGE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENA_ADMIN_LINK_CHANGE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_BIT
	mov	x23, x0
Lloh27:
	adrp	x8, _ENA_ADMIN_FATAL_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENA_ADMIN_FATAL_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_BIT
	orr	w23, w0, w23
Lloh30:
	adrp	x8, _ENA_ADMIN_WARNING@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENA_ADMIN_WARNING@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_BIT
	orr	w23, w23, w0
Lloh33:
	adrp	x8, _ENA_ADMIN_NOTIFICATION@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENA_ADMIN_NOTIFICATION@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_BIT
	orr	w23, w23, w0
Lloh36:
	adrp	x24, _ENA_ADMIN_KEEP_ALIVE@GOTPAGE
Lloh37:
	ldr	x24, [x24, _ENA_ADMIN_KEEP_ALIVE@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_BIT
	orr	w8, w23, w0
	ldr	w9, [x22]
	and	w22, w8, w9
	mov	x0, x19
	mov	x1, x22
	bl	_ena_com_set_aenq_config
	mov	x23, x0
	cbz	w0, LBB0_22
; %bb.20:
	str	x23, [sp]
Lloh38:
	adrp	x1, l_.str.8@PAGE
Lloh39:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_21:
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	mov	x0, x19
	bl	_ena_com_delete_host_info
	mov	x0, x19
	bl	_ena_com_admin_destroy
	b	LBB0_7
LBB0_22:
	ldr	w0, [x24]
	bl	_BIT
	tst	w0, w22
	cset	w8, ne
	str	w8, [x21]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init mmio read less\n"

	.comm	_ENA_MMIO_DISABLE_REG_READ,4,2  ; @ENA_MMIO_DISABLE_REG_READ
	.comm	_ENA_REGS_RESET_NORMAL,4,2      ; @ENA_REGS_RESET_NORMAL
l_.str.1:                               ; @.str.1
	.asciz	"Can not reset device\n"

l_.str.2:                               ; @.str.2
	.asciz	"device version is too low\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid dma width value %d"

l_.str.4:                               ; @.str.4
	.asciz	"pci_set_dma_mask failed 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"err_pci_set_consistent_dma_mask failed 0x%x\n"

	.comm	_aenq_handlers,4,2              ; @aenq_handlers
l_.str.6:                               ; @.str.6
	.asciz	"Can not initialize ena admin queue with device\n"

l_.str.7:                               ; @.str.7
	.asciz	"Cannot get attribute for ena device rc=%d\n"

	.comm	_ENA_ADMIN_LINK_CHANGE,4,2      ; @ENA_ADMIN_LINK_CHANGE
	.comm	_ENA_ADMIN_FATAL_ERROR,4,2      ; @ENA_ADMIN_FATAL_ERROR
	.comm	_ENA_ADMIN_WARNING,4,2          ; @ENA_ADMIN_WARNING
	.comm	_ENA_ADMIN_NOTIFICATION,4,2     ; @ENA_ADMIN_NOTIFICATION
	.comm	_ENA_ADMIN_KEEP_ALIVE,4,2       ; @ENA_ADMIN_KEEP_ALIVE
l_.str.8:                               ; @.str.8
	.asciz	"Cannot configure aenq groups rc= %d\n"

	.no_dead_strip	_ena_device_init
.subsections_via_symbols
