	.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	24(%rdi), %rax
	movq	(%rax), %r14
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_mlx4_en_mac_to_u64
	movl	%eax, %r15d
	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	%r15d, %edx
	callq	_mlx4_register_mac
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movq	_MLX4_STEERING_MODE_A0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_mlx4_get_base_qpn
	addl	%r12d, %eax
	movl	%eax, (%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_1:
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_mlx4_qp_reserve_range
	movl	%eax, %r12d
	movl	(%r13), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rsi
	callq	_en_dbg
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_10
LBB0_6:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_mlx4_en_uc_steer_add
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_mlx4_qp_release_range
LBB0_10:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_mlx4_unregister_mac
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.12:
	movq	%rax, %r12
	movq	(%rax), %rdi
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movl	$8, %edx
	callq	_memcpy
	movl	-44(%rbp), %eax
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	addq	$8, %rdi
	movq	(%r12), %rax
	movq	_MLX4_EN_MAC_HASH_IDX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	shlq	$2, %rsi
	addq	16(%rbx), %rsi
	callq	_hlist_add_head_rcu
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movl	-44(%rbp), %ecx
	movq	%rbx, %rdi
	callq	_mlx4_en_uc_steer_release
	jmp	LBB0_9
	.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"

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

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

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_EN_MAC_HASH_IDX,8,3       ## @MLX4_EN_MAC_HASH_IDX
	.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
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_mlx4_en_mac_to_u64
	mov	x21, 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, x21
	bl	_mlx4_register_mac
	mov	x22, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _MLX4_STEERING_MODE_A0@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MLX4_STEERING_MODE_A0@GOTPAGEOFF]
Lloh6:
	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, w22
	mov	w22, #0
	str	w8, [x19]
	b	LBB0_9
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_en_err
	b	LBB0_9
LBB0_4:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	mov	x3, x19
	bl	_mlx4_qp_reserve_range
	mov	x22, x0
	ldr	w0, [x23]
	ldr	w3, [x19]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_en_dbg
	cbz	w22, LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_en_err
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	x2, x19
	bl	_mlx4_en_uc_steer_add
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_7:
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #1
	bl	_mlx4_qp_release_range
LBB0_8:
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	x2, x21
	bl	_mlx4_unregister_mac
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_12
; %bb.11:
	mov	x22, x0
	ldr	x0, [x0]
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	w2, #8
	bl	_memcpy
	ldr	w8, [sp, #12]
	str	w8, [x22, #12]
	add	x0, x22, #8
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
Lloh16:
	adrp	x10, _MLX4_EN_MAC_HASH_IDX@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MLX4_EN_MAC_HASH_IDX@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	add	x1, x8, x9, lsl #2
	bl	_hlist_add_head_rcu
	mov	w22, #0
	b	LBB0_9
LBB0_12:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	ldr	w2, [x19]
	ldr	w3, [sp, #12]
	mov	x0, x19
	bl	_mlx4_en_uc_steer_release
	b	LBB0_7
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.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"

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

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

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_EN_MAC_HASH_IDX,8,3       ; @MLX4_EN_MAC_HASH_IDX
	.no_dead_strip	_mlx4_en_get_qp
.subsections_via_symbols
