	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_steering_mode
_choose_steering_mode:                  ## @choose_steering_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_mlx4_log_num_mgm_entry_size@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_1
LBB0_10:
	movq	8(%rbx), %rax
	movq	_MLX4_STEERING_DMFS_A0_NOT_SUPPORTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	_MLX4_STEERING_DMFS_A0_DISABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_12:
	movl	24(%rbx), %eax
	movq	_MLX4_DEV_CAP_FLAG_VEP_UC_STEER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.13:
	movq	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	movq	_MLX4_STEERING_MODE_B0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	jmp	LBB0_18
LBB0_1:
	movq	%rsi, %r14
	negl	%eax
	movq	_MLX4_DMFS_A0_STEERING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movq	8(%rbx), %rax
	movq	_MLX4_STEERING_DMFS_A0_NOT_SUPPORTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	cmpl	$0, (%r15)
	jg	LBB0_10
	jmp	LBB0_5
LBB0_16:
	movq	_MLX4_STEERING_MODE_A0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	movq	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
	jmp	LBB0_18
LBB0_15:
	movq	_MLX4_STEERING_MODE_A0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
LBB0_17:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_warn
LBB0_18:
	movl	(%r15), %eax
	testl	%eax, %eax
	jg	LBB0_20
## %bb.19:
	movq	_MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_20:
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_mlx4_get_qp_per_mgm
	movq	%rax, 16(%rbx)
	movl	28(%rbx), %edi
LBB0_21:
	callq	_mlx4_steering_mode_str
	movl	(%rbx), %ecx
	movl	(%r15), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_dbg                       ## TAILCALL
LBB0_3:
	movq	_MLX4_STEERING_DMFS_A0_STATIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_5:
	movq	_MLX4_DEV_CAP_FLAG2_FS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_mlx4_is_mfunc
	movq	8(%r14), %rdi
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	40(%rbx), %rax
	cmpq	(%rax), %rdi
	jle	LBB0_10
LBB0_8:
	callq	_choose_log_fs_mgm_entry_size
	movq	_MLX4_MIN_MGM_LOG_ENTRY_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.9:
	movq	8(%r14), %rdi
	callq	_choose_log_fs_mgm_entry_size
	movl	%eax, (%rbx)
	movq	_MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 28(%rbx)
	movq	8(%r14), %rax
	movq	%rax, 16(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 32(%rbx)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_mlx4_log_num_mgm_entry_size,4,2 ## @mlx4_log_num_mgm_entry_size
	.comm	_MLX4_DMFS_A0_STEERING,4,2      ## @MLX4_DMFS_A0_STEERING
	.comm	_MLX4_STEERING_DMFS_A0_NOT_SUPPORTED,8,3 ## @MLX4_STEERING_DMFS_A0_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMFS high rate mode not supported\n"

	.comm	_MLX4_STEERING_DMFS_A0_STATIC,8,3 ## @MLX4_STEERING_DMFS_A0_STATIC
	.comm	_MLX4_DEV_CAP_FLAG2_FS_EN,4,2   ## @MLX4_DEV_CAP_FLAG2_FS_EN
	.comm	_MLX4_MIN_MGM_LOG_ENTRY_SIZE,8,3 ## @MLX4_MIN_MGM_LOG_ENTRY_SIZE
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,4,2 ## @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_MLX4_STEERING_DMFS_A0_DISABLE,8,3 ## @MLX4_STEERING_DMFS_A0_DISABLE
	.comm	_MLX4_DEV_CAP_FLAG_VEP_UC_STEER,4,2 ## @MLX4_DEV_CAP_FLAG_VEP_UC_STEER
	.comm	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER,4,2 ## @MLX4_DEV_CAP_FLAG_VEP_MC_STEER
	.comm	_MLX4_STEERING_MODE_B0,4,2      ## @MLX4_STEERING_MODE_B0
	.comm	_MLX4_STEERING_MODE_A0,4,2      ## @MLX4_STEERING_MODE_A0
L_.str.1:                               ## @.str.1
	.asciz	"Must have both UC_STEER and MC_STEER flags set to use B0 steering - falling back to A0 steering mode\n"

	.comm	_MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE,4,2 ## @MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Steering mode is: %s, oper_log_mgm_entry_size = %d, modparam log_num_mgm_entry_size = %d\n"

	.no_dead_strip	_choose_steering_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_steering_mode
_choose_steering_mode:                  ; @choose_steering_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _mlx4_log_num_mgm_entry_size@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mlx4_log_num_mgm_entry_size@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _MLX4_STEERING_DMFS_A0_NOT_SUPPORTED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MLX4_STEERING_DMFS_A0_NOT_SUPPORTED@GOTPAGEOFF]
	cmp	w8, #0
	b.le	LBB0_6
LBB0_1:
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh4:
	adrp	x8, _MLX4_STEERING_DMFS_A0_DISABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MLX4_STEERING_DMFS_A0_DISABLE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_3:
	ldr	w8, [x19, #24]
Lloh7:
	adrp	x9, _MLX4_DEV_CAP_FLAG_VEP_UC_STEER@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_VEP_UC_STEER@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.4:
Lloh10:
	adrp	x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.5:
Lloh13:
	adrp	x8, _MLX4_STEERING_MODE_B0@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLX4_STEERING_MODE_B0@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	b	LBB0_12
LBB0_6:
	mov	x20, x1
	neg	w8, w8
Lloh16:
	adrp	x9, _MLX4_DMFS_A0_STEERING@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MLX4_DMFS_A0_STEERING@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.8:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
	ldr	w8, [x21]
	cmp	w8, #0
	b.gt	LBB0_1
	b	LBB0_15
LBB0_9:
Lloh21:
	adrp	x9, _MLX4_STEERING_MODE_A0@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MLX4_STEERING_MODE_A0@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	str	w9, [x19, #28]
Lloh24:
	adrp	x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_VEP_MC_STEER@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
	b	LBB0_12
LBB0_10:
Lloh27:
	adrp	x8, _MLX4_STEERING_MODE_A0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLX4_STEERING_MODE_A0@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #28]
LBB0_11:
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
LBB0_12:
	ldr	w8, [x21]
Lloh32:
	adrp	x9, _MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w8, w9, gt
	str	w8, [x19]
	mov	x0, x19
	bl	_mlx4_get_qp_per_mgm
	str	x0, [x19, #16]
	ldr	w0, [x19, #28]
LBB0_13:
	bl	_mlx4_steering_mode_str
	mov	x2, x0
	ldr	w3, [x19]
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	w4, [x21]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx4_dbg
LBB0_14:
Lloh37:
	adrp	x8, _MLX4_STEERING_DMFS_A0_STATIC@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MLX4_STEERING_DMFS_A0_STATIC@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_15:
	ldr	w8, [x20]
Lloh40:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_FS_EN@GOTPAGE
Lloh41:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_FS_EN@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.16:
	mov	x0, x19
	bl	_mlx4_is_mfunc
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbz	w8, LBB0_18
; %bb.17:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_1
LBB0_18:
	bl	_choose_log_fs_mgm_entry_size
Lloh43:
	adrp	x8, _MLX4_MIN_MGM_LOG_ENTRY_SIZE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MLX4_MIN_MGM_LOG_ENTRY_SIZE@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_1
; %bb.19:
	ldr	x0, [x20, #8]
	bl	_choose_log_fs_mgm_entry_size
	str	w0, [x19]
Lloh46:
	adrp	x8, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ldr	x8, [x20, #8]
	str	x8, [x19, #16]
	ldr	w8, [x20, #16]
	stp	w0, w8, [x19, #28]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_mlx4_log_num_mgm_entry_size,4,2 ; @mlx4_log_num_mgm_entry_size
	.comm	_MLX4_DMFS_A0_STEERING,4,2      ; @MLX4_DMFS_A0_STEERING
	.comm	_MLX4_STEERING_DMFS_A0_NOT_SUPPORTED,8,3 ; @MLX4_STEERING_DMFS_A0_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMFS high rate mode not supported\n"

	.comm	_MLX4_STEERING_DMFS_A0_STATIC,8,3 ; @MLX4_STEERING_DMFS_A0_STATIC
	.comm	_MLX4_DEV_CAP_FLAG2_FS_EN,4,2   ; @MLX4_DEV_CAP_FLAG2_FS_EN
	.comm	_MLX4_MIN_MGM_LOG_ENTRY_SIZE,8,3 ; @MLX4_MIN_MGM_LOG_ENTRY_SIZE
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,4,2 ; @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_MLX4_STEERING_DMFS_A0_DISABLE,8,3 ; @MLX4_STEERING_DMFS_A0_DISABLE
	.comm	_MLX4_DEV_CAP_FLAG_VEP_UC_STEER,4,2 ; @MLX4_DEV_CAP_FLAG_VEP_UC_STEER
	.comm	_MLX4_DEV_CAP_FLAG_VEP_MC_STEER,4,2 ; @MLX4_DEV_CAP_FLAG_VEP_MC_STEER
	.comm	_MLX4_STEERING_MODE_B0,4,2      ; @MLX4_STEERING_MODE_B0
	.comm	_MLX4_STEERING_MODE_A0,4,2      ; @MLX4_STEERING_MODE_A0
l_.str.1:                               ; @.str.1
	.asciz	"Must have both UC_STEER and MC_STEER flags set to use B0 steering - falling back to A0 steering mode\n"

	.comm	_MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE,4,2 ; @MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Steering mode is: %s, oper_log_mgm_entry_size = %d, modparam log_num_mgm_entry_size = %d\n"

	.no_dead_strip	_choose_steering_mode
.subsections_via_symbols
