	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_init_tavor
_mthca_init_tavor:                      ## @mthca_init_tavor
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_mthca_SYS_EN
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_mthca_err
	jmp	LBB0_17
LBB0_2:
	movq	%r14, %rdi
	callq	_mthca_QUERY_FW
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_15
LBB0_4:
	movq	%r14, %rdi
	callq	_mthca_QUERY_DDR
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_6:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mthca_dev_lim
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_15:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mthca_err
LBB0_16:
	movq	%r14, %rdi
	callq	_mthca_SYS_DIS
LBB0_17:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_hca_profile@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	-32(%rbp), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	_MTHCA_FLAG_SRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.9:
	movl	-28(%rbp), %eax
	movl	%eax, -44(%rbp)
LBB0_10:
	leaq	-48(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	movq	%r14, %rdi
	callq	_mthca_make_profile
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mthca_INIT_HCA
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SYS_EN command returned %d, aborting.\n"

L_.str.1:                               ## @.str.1
	.asciz	"QUERY_FW command returned %d, aborting.\n"

L_.str.2:                               ## @.str.2
	.asciz	"QUERY_DDR command returned %d, aborting.\n"

L_.str.3:                               ## @.str.3
	.asciz	"QUERY_DEV_LIM command returned %d, aborting.\n"

	.comm	_hca_profile,16,3               ## @hca_profile
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MTHCA_FLAG_SRQ,4,2             ## @MTHCA_FLAG_SRQ
L_.str.4:                               ## @.str.4
	.asciz	"INIT_HCA command returned %d, aborting.\n"

	.no_dead_strip	_mthca_init_tavor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_init_tavor
_mthca_init_tavor:                      ; @mthca_init_tavor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	bl	_mthca_SYS_EN
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_mthca_err
	b	LBB0_10
LBB0_2:
	mov	x0, x19
	bl	_mthca_QUERY_FW
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	bl	_mthca_QUERY_DDR
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	add	x1, sp, #24
	mov	x0, x19
	bl	_mthca_dev_lim
	cbz	w0, LBB0_11
; %bb.7:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x0, x19
	mov	x2, x20
	bl	_mthca_err
LBB0_9:
	mov	x0, x19
	bl	_mthca_SYS_DIS
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
Lloh8:
	adrp	x8, _hca_profile@GOTPAGE
Lloh9:
	ldr	x8, [x8, _hca_profile@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w9, [sp, #24]
Lloh11:
	adrp	x10, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	sdiv	w9, w9, w10
	stp	x8, xzr, [sp, #8]
	str	w9, [sp, #8]
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _MTHCA_FLAG_SRQ@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MTHCA_FLAG_SRQ@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	w8, [sp, #28]
	str	w8, [sp, #12]
LBB0_13:
	add	x1, sp, #8
	add	x2, sp, #24
	mov	x3, sp
	mov	x0, x19
	bl	_mthca_make_profile
	tbnz	w0, #31, LBB0_16
; %bb.14:
	mov	x1, sp
	mov	x0, x19
	bl	_mthca_INIT_HCA
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.15:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_16:
	mov	x20, x0
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SYS_EN command returned %d, aborting.\n"

l_.str.1:                               ; @.str.1
	.asciz	"QUERY_FW command returned %d, aborting.\n"

l_.str.2:                               ; @.str.2
	.asciz	"QUERY_DDR command returned %d, aborting.\n"

l_.str.3:                               ; @.str.3
	.asciz	"QUERY_DEV_LIM command returned %d, aborting.\n"

	.comm	_hca_profile,16,3               ; @hca_profile
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MTHCA_FLAG_SRQ,4,2             ; @MTHCA_FLAG_SRQ
l_.str.4:                               ; @.str.4
	.asciz	"INIT_HCA command returned %d, aborting.\n"

	.no_dead_strip	_mthca_init_tavor
.subsections_via_symbols
