	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_get_qp
_mlx4_en_get_qp:                        ## @mlx4_en_get_qp
	.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	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %r14
	movl	(%rax), %edi
	callq	_mlx4_mac_to_u64
	movl	%eax, %r12d
	movq	_DRV@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rsi
	callq	_en_dbg
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_mlx4_register_mac
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_en_info
	movq	(%r14), %rax
	movq	_MLX4_STEERING_MODE_A0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_mlx4_get_base_qpn
	addl	%r15d, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_3:
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_7
LBB0_4:
	movq	_MLX4_RESERVE_A0_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_RES_USAGE_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_mlx4_qp_reserve_range
	movl	%eax, %r15d
	movl	(%r13), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rsi
	callq	_en_dbg
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_en_err
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_mlx4_unregister_mac
	jmp	LBB0_7
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRV,4,2                        ## @DRV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Registering MAC: %pM for adding\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed adding MAC: %pM\n"

L_.str.2:                               ## @.str.2
	.asciz	"Steering Mode %d\n"

	.comm	_MLX4_STEERING_MODE_A0,8,3      ## @MLX4_STEERING_MODE_A0
	.comm	_MLX4_RESERVE_A0_QP,4,2         ## @MLX4_RESERVE_A0_QP
	.comm	_MLX4_RES_USAGE_DRIVER,4,2      ## @MLX4_RES_USAGE_DRIVER
L_.str.3:                               ## @.str.3
	.asciz	"Reserved qp %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to reserve qp for mac registration\n"

	.no_dead_strip	_mlx4_en_get_qp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_get_qp
_mlx4_en_get_qp:                        ; @mlx4_en_get_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldp	x9, x8, [x0, #8]
	ldr	x20, [x8]
	ldr	w0, [x9]
	bl	_mlx4_mac_to_u64
	mov	x22, x0
Lloh0:
	adrp	x23, _DRV@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DRV@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	x8, [x19, #8]
	ldr	w3, [x8]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	bl	_en_dbg
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	x2, x22
	bl	_mlx4_register_mac
	mov	x21, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x2, [x20]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_en_info
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _MLX4_STEERING_MODE_A0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX4_STEERING_MODE_A0@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_mlx4_get_base_qpn
	add	w8, w0, w21
	mov	w21, #0
	str	w8, [x19]
	b	LBB0_6
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_en_err
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _MLX4_RESERVE_A0_QP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX4_RESERVE_A0_QP@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
Lloh14:
	adrp	x8, _MLX4_RES_USAGE_DRIVER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MLX4_RES_USAGE_DRIVER@GOTPAGEOFF]
Lloh16:
	ldr	w5, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	mov	x3, x19
	bl	_mlx4_qp_reserve_range
	mov	x21, x0
	ldr	w0, [x23]
	ldr	w3, [x19]
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_en_dbg
	cbz	w21, LBB0_6
; %bb.5:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_en_err
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	x2, x22
	bl	_mlx4_unregister_mac
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DRV,4,2                        ; @DRV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Registering MAC: %pM for adding\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed adding MAC: %pM\n"

l_.str.2:                               ; @.str.2
	.asciz	"Steering Mode %d\n"

	.comm	_MLX4_STEERING_MODE_A0,8,3      ; @MLX4_STEERING_MODE_A0
	.comm	_MLX4_RESERVE_A0_QP,4,2         ; @MLX4_RESERVE_A0_QP
	.comm	_MLX4_RES_USAGE_DRIVER,4,2      ; @MLX4_RES_USAGE_DRIVER
l_.str.3:                               ; @.str.3
	.asciz	"Reserved qp %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to reserve qp for mac registration\n"

	.no_dead_strip	_mlx4_en_get_qp
.subsections_via_symbols
