	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_alloc_demux_ctx
_mlx4_ib_alloc_demux_ctx:               ## @mlx4_ib_alloc_demux_ctx
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r13, 40(%rbx)
	movl	%r15d, (%rbx)
	leaq	8(%r13), %rax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, 32(%rbx)
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	8(%rax), %rax
	movl	(%rax), %esi
	incl	%esi
	callq	_min
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	leal	-1(%r15), %r12d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	8(%rax), %rax
	movl	(%rax), %esi
	incl	%esi
	callq	_min
	cltq
	addq	$4, %r14
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_mlx4_get_active_ports
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rcx
	addq	%r14, %rcx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_alloc_pv_object
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_8:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_mlx4_ib_mcg_port_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_19
LBB0_10:
	leaq	L_.str.1(%rip), %rdx
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	movq	_WQ_MEM_RECLAIM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_alloc_ordered_workqueue
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	leaq	L_.str.3(%rip), %rdx
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_alloc_ordered_workqueue
	movq	%rax, 24(%r14)
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_19
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	16(%r14), %rdi
	callq	_destroy_workqueue
	movq	$0, 16(%r14)
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	negl	%r12d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mlx4_ib_mcg_port_cleanup
LBB0_15:
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.16:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_free_pv_object
	incl	%ebx
	movq	(%r13), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_17
LBB0_18:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed initializing mcg para-virt (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"mlx4_ibt%d"

	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to create tunnelling WQ for port %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"mlx4_ibud%d"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to create up/down WQ for port %d\n"

	.no_dead_strip	_mlx4_ib_alloc_demux_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_alloc_demux_ctx
_mlx4_ib_alloc_demux_ctx:               ; @mlx4_ib_alloc_demux_ctx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.1:
	str	x21, [x19, #40]
	str	w20, [x19]
	mov	x8, x21
	ldr	x9, [x8], #8
	str	x8, [x19, #32]
	ldr	w0, [x9]
	ldr	x8, [x9, #8]
	ldr	w8, [x8]
	add	w1, w8, #1
	bl	_min
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x24, #0
	mov	x22, #0
	sub	w23, w20, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	add	w1, w8, #1
	bl	_min
	add	x24, x24, #4
	cmp	x22, w0, sxtw
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	mov	x1, x22
	bl	_mlx4_get_active_ports
	mov	x1, x0
	mov	x0, x23
	bl	_test_bit
	cbz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	add	x3, x8, x24
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_alloc_pv_object
	cbz	w0, LBB0_3
; %bb.6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_7:
	mov	x0, x19
	bl	_mlx4_ib_mcg_port_init
	cbz	w0, LBB0_10
; %bb.8:
	mov	x22, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
	b	LBB0_16
LBB0_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_10:
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #12
	mov	w1, #12
	mov	x3, x20
	bl	_snprintf
Lloh16:
	adrp	x22, _WQ_MEM_RECLAIM@GOTPAGE
Lloh17:
	ldr	x22, [x22, _WQ_MEM_RECLAIM@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x0, sp, #12
	bl	_alloc_ordered_workqueue
	str	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.11:
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x0, sp, #12
	mov	w1, #12
	mov	x3, x20
	bl	_snprintf
	ldr	w1, [x22]
	add	x0, sp, #12
	bl	_alloc_ordered_workqueue
	str	x0, [x19, #24]
	cbz	x0, LBB0_14
; %bb.12:
	mov	w22, #0
	b	LBB0_20
LBB0_13:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pr_err
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
	b	LBB0_15
LBB0_14:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_pr_err
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w22, [x8]
	ldr	x0, [x19, #16]
	bl	_destroy_workqueue
	str	xzr, [x19, #16]
LBB0_15:
	neg	w22, w22
	mov	x0, x19
	mov	w1, #1
	bl	_mlx4_ib_mcg_port_cleanup
LBB0_16:
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.17:
	mov	w23, #0
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_free_pv_object
	add	w23, w23, #1
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w23, w8
	b.lt	LBB0_18
LBB0_19:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_20:
	ldr	x8, [sp, #24]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed initializing mcg para-virt (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"mlx4_ibt%d"

	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to create tunnelling WQ for port %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"mlx4_ibud%d"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to create up/down WQ for port %d\n"

	.no_dead_strip	_mlx4_ib_alloc_demux_ctx
.subsections_via_symbols
