	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_init_affinity_hint
_mlx4_init_affinity_hint:               ## @mlx4_init_affinity_hint
	.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
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_mlx4_priv
	cmpl	%r12d, (%rbx)
	jge	LBB0_1
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$0, %r14d
	cmpl	$2, %r13d
	jl	LBB0_4
## %bb.2:
	xorl	%r14d, %r14d
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mlx4_get_eqs_per_port
	addl	%eax, %r14d
	incl	%r15d
	cmpl	%r15d, %r13d
	jne	LBB0_3
LBB0_4:
	movl	%r12d, %r15d
	subl	%r14d, %r15d
	movq	_MLX4_EQ_ASYNC@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r12d, (%rax)
	setl	%cl
	subl	%ecx, %r15d
	js	LBB0_10
## %bb.5:
	movslq	%r12d, %rbx
	shlq	$2, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_zalloc_cpumask_var
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_cpumask_set_cpu
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLX4_EQ_ASYNC,4,2              ## @MLX4_EQ_ASYNC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx4_init_affinity_hint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_init_affinity_hint
_mlx4_init_affinity_hint:               ; @mlx4_init_affinity_hint
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_mlx4_priv
	ldr	w8, [x22]
	cmp	w8, w19
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	mov	x20, x0
	cmp	w21, #2
	b.lt	LBB0_5
; %bb.3:
	mov	w24, #0
	mov	w23, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_mlx4_get_eqs_per_port
	add	w24, w24, w0
	add	w23, w23, #1
	cmp	w21, w23
	b.ne	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w24, #0
LBB0_6:
Lloh2:
	adrp	x8, _MLX4_EQ_ASYNC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX4_EQ_ASYNC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w8, lt
	sub	w9, w19, w24
	subs	w21, w9, w8
	b.mi	LBB0_9
; %bb.7:
	ldr	x8, [x20]
	add	x19, x8, w19, sxtw #2
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_zalloc_cpumask_var
	cbz	w0, LBB0_10
; %bb.8:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_cpumask_set_cpu
LBB0_9:
	mov	w0, #0
	b	LBB0_12
LBB0_10:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLX4_EQ_ASYNC,4,2              ; @MLX4_EQ_ASYNC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx4_init_affinity_hint
.subsections_via_symbols
