	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_hwdev_ifup               ## -- Begin function hinic_hwdev_ifup
	.p2align	4, 0x90
_hinic_hwdev_ifup:                      ## @hinic_hwdev_ifup
	.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	%rdi, %r14
	movq	8(%rdi), %r12
	movq	(%r12), %rbx
	leaq	-60(%rbp), %rsi
	callq	_get_base_qpn
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%r14), %r13
	movq	%r12, %rdi
	callq	_HINIC_HWIF_NUM_AEQS
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_HINIC_HWIF_NUM_CEQS
	movl	%eax, %r15d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r8
	shlq	$2, %r8
	addq	(%r14), %r8
	movl	20(%r14), %edx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %ecx
	callq	_hinic_io_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_12
LBB0_4:
	movl	16(%r14), %ebx
	movq	(%r14), %rax
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movslq	%r15d, %rdx
	leaq	(%rax,%rdx,4), %rcx
	addl	%ebx, %edx
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %r8
	movl	-60(%rbp), %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_hinic_io_create_qps
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_11
LBB0_6:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_wait_for_db_state
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movq	_HINIC_DB_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_hinic_db_state_set
LBB0_8:
	movq	_HINIC_SQ_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HINIC_RQ_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_set_hw_ioctxt
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_hinic_io_destroy_qps
LBB0_11:
	movq	%r15, %rdi
	callq	_hinic_io_free
LBB0_12:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%r13d, %r13d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get global base qp number\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to init IO channel\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create QPs\n"

L_.str.3:                               ## @.str.3
	.asciz	"db - disabled, try again\n"

	.comm	_HINIC_DB_ENABLE,4,2            ## @HINIC_DB_ENABLE
	.comm	_HINIC_SQ_DEPTH,4,2             ## @HINIC_SQ_DEPTH
	.comm	_HINIC_RQ_DEPTH,4,2             ## @HINIC_RQ_DEPTH
L_.str.4:                               ## @.str.4
	.asciz	"Failed to set HW IO ctxt\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_hwdev_ifup               ; -- Begin function hinic_hwdev_ifup
	.p2align	2
_hinic_hwdev_ifup:                      ; @hinic_hwdev_ifup
	.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, x0
	ldr	x22, [x0, #8]
	ldr	x19, [x22]
	add	x1, sp, #12
	bl	_get_base_qpn
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	add	x20, x21, #24
	mov	x0, x22
	bl	_HINIC_HWIF_NUM_AEQS
	mov	x25, x0
	mov	x0, x22
	bl	_HINIC_HWIF_NUM_CEQS
	mov	x26, x0
	ldr	x8, [x21]
	add	x4, x8, w25, sxtw #2
	ldr	w2, [x21, #20]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x26
	bl	_hinic_io_init
	cbz	w0, LBB0_6
; %bb.3:
	mov	x23, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
LBB0_5:
	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_6:
	ldr	w24, [x21, #16]
	ldr	x8, [x21]
	add	w9, w26, w25
	add	w10, w24, w9
	add	x3, x8, w9, sxtw #2
	add	x4, x8, w10, sxtw #2
	ldr	w1, [sp, #12]
	mov	x0, x20
	mov	x2, x24
	bl	_hinic_io_create_qps
	cbz	w0, LBB0_8
; %bb.7:
	mov	x23, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_12
LBB0_8:
	mov	x0, x21
	bl	_wait_for_db_state
	cbz	w0, LBB0_10
; %bb.9:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh8:
	adrp	x8, _HINIC_DB_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HINIC_DB_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_hinic_db_state_set
LBB0_10:
Lloh11:
	adrp	x8, _HINIC_SQ_DEPTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HINIC_SQ_DEPTH@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _HINIC_RQ_DEPTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HINIC_RQ_DEPTH@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_set_hw_ioctxt
	mov	x23, x0
	cbz	w0, LBB0_5
; %bb.11:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	mov	x1, x24
	bl	_hinic_io_destroy_qps
LBB0_12:
	mov	x0, x20
	bl	_hinic_io_free
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get global base qp number\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to init IO channel\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create QPs\n"

l_.str.3:                               ; @.str.3
	.asciz	"db - disabled, try again\n"

	.comm	_HINIC_DB_ENABLE,4,2            ; @HINIC_DB_ENABLE
	.comm	_HINIC_SQ_DEPTH,4,2             ; @HINIC_SQ_DEPTH
	.comm	_HINIC_RQ_DEPTH,4,2             ; @HINIC_RQ_DEPTH
l_.str.4:                               ; @.str.4
	.asciz	"Failed to set HW IO ctxt\n"

.subsections_via_symbols
