	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_workqueues
_create_workqueues:                     ## @create_workqueues
	.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
	cmpl	$0, (%rdi)
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movl	$8, %ebx
	xorl	%r13d, %r13d
	movq	_WQ_MEM_RECLAIM@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%r14), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jge	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r15
	cmpq	$0, (%r15,%rbx)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_WQ_HIGHPRI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WQ_SYSFS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_WQ_CPU_INTENSIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r12), %esi
	movq	_HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%r14), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %r8d
	callq	_alloc_workqueue
	movq	%rax, (%r15,%rbx)
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -8(%r15,%rbx)
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %esi
	movq	_WQ_SYSFS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_WQ_UNBOUND@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	16(%r14), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	$1, %edx
	movl	%r13d, %r8d
	callq	_alloc_workqueue
	movq	%rax, -8(%r15,%rbx)
	testq	%rax, %rax
	jne	LBB0_2
LBB0_7:
	incl	%r13d
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	callq	_pr_err
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.8:
	movl	$8, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	movslq	(%r14), %rax
	addq	$16, %rbx
	cmpq	%rax, %r15
	jge	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r12
	movq	(%r12,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_destroy_workqueue
	movq	$0, (%r12,%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-8(%r12,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_destroy_workqueue
	movq	$0, -8(%r12,%rbx)
	jmp	LBB0_9
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hfi%d_%d"

	.comm	_WQ_SYSFS,4,2                   ## @WQ_SYSFS
	.comm	_WQ_HIGHPRI,4,2                 ## @WQ_HIGHPRI
	.comm	_WQ_CPU_INTENSIVE,4,2           ## @WQ_CPU_INTENSIVE
	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
	.comm	_HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES,4,2 ## @HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES
L_.str.1:                               ## @.str.1
	.asciz	"hfi_link_%d_%d"

	.comm	_WQ_UNBOUND,4,2                 ## @WQ_UNBOUND
L_.str.2:                               ## @.str.2
	.asciz	"alloc_workqueue failed for port %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_create_workqueues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_workqueues
_create_workqueues:                     ; @create_workqueues
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	mov	x20, #0
Lloh0:
	adrp	x24, _WQ_SYSFS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WQ_SYSFS@GOTPAGEOFF]
Lloh2:
	adrp	x27, _WQ_MEM_RECLAIM@GOTPAGE
Lloh3:
	ldr	x27, [x27, _WQ_MEM_RECLAIM@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
Lloh6:
	adrp	x28, _HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES@GOTPAGE
Lloh7:
	ldr	x28, [x28, _HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x23, x23, #16
	cmp	x20, x8
	b.ge	LBB0_14
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #8]
	add	x25, x26, x23
	ldr	x8, [x25, #8]
	cbnz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
Lloh10:
	adrp	x9, _WQ_HIGHPRI@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WQ_HIGHPRI@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _WQ_CPU_INTENSIVE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _WQ_CPU_INTENSIVE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x27]
	orr	w1, w8, w9
	ldr	w2, [x28]
	ldr	w3, [x19, #16]
	mov	x0, x21
	mov	x4, x20
	bl	_alloc_workqueue
	str	x0, [x25, #8]
	cbz	x0, LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, x23]
	cbnz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x27]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _WQ_UNBOUND@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WQ_UNBOUND@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w3, [x19, #16]
	mov	x0, x22
	mov	w2, #1
	mov	x4, x20
	bl	_alloc_workqueue
	str	x0, [x26, x23]
	cbnz	x0, LBB0_2
LBB0_7:
	add	w1, w20, #1
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.8:
	mov	x20, #0
	mov	x21, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #16
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x19, #8]
	add	x23, x22, x20
	ldr	x0, [x23, #8]
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_destroy_workqueue
	str	xzr, [x23, #8]
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x22, x20]
	cbz	x0, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_destroy_workqueue
	str	xzr, [x22, x20]
	b	LBB0_9
LBB0_14:
	mov	w0, #0
	b	LBB0_16
LBB0_15:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hfi%d_%d"

	.comm	_WQ_SYSFS,4,2                   ; @WQ_SYSFS
	.comm	_WQ_HIGHPRI,4,2                 ; @WQ_HIGHPRI
	.comm	_WQ_CPU_INTENSIVE,4,2           ; @WQ_CPU_INTENSIVE
	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
	.comm	_HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES,4,2 ; @HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES
l_.str.1:                               ; @.str.1
	.asciz	"hfi_link_%d_%d"

	.comm	_WQ_UNBOUND,4,2                 ; @WQ_UNBOUND
l_.str.2:                               ; @.str.2
	.asciz	"alloc_workqueue failed for port %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_create_workqueues
.subsections_via_symbols
