	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_chain_alloc                ## -- Begin function qed_chain_alloc
	.p2align	4, 0x90
_qed_chain_alloc:                       ## @qed_chain_alloc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movl	$1, %r14d
	cmpl	$128, %edx
	je	LBB0_2
## %bb.1:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_QED_CHAIN_PAGE_CNT
	movl	%eax, %r14d
LBB0_2:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	movl	%r14d, %ecx
	callq	_qed_chain_alloc_sanity_check
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_NOTICE
	movq	%r12, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	%r13d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_DP_NOTICE
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_qed_chain_init_params
	xorl	%ebx, %ebx
	cmpl	$128, %r15d
	je	LBB0_8
## %bb.5:
	cmpl	$129, %r15d
	je	LBB0_9
## %bb.6:
	cmpl	$130, %r15d
	jne	LBB0_12
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rbp), %r15
	movq	%r15, %rsi
	callq	_qed_chain_alloc_next_ptr
	jmp	LBB0_10
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rbp), %r15
	movq	%r15, %rsi
	callq	_qed_chain_alloc_single
	jmp	LBB0_10
LBB0_9:
	movq	24(%rbp), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rbp), %r15
	movq	%r15, %rsi
	callq	_qed_chain_alloc_pbl
LBB0_10:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_qed_chain_free
	movl	%r14d, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %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	"Cannot allocate a chain with the given arguments:\n"

L_.str.1:                               ## @.str.1
	.asciz	"[use_mode %d, mode %d, cnt_type %d, num_elems %d, elem_size %zu]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_chain_alloc                ; -- Begin function qed_chain_alloc
	.p2align	2
_qed_chain_alloc:                       ; @qed_chain_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x22, x7
	mov	x20, x6
	mov	x26, x5
	mov	x27, x4
	mov	x24, x3
	mov	x21, x2
	mov	x25, x1
	mov	x19, x0
	cmp	w2, #128
	b.ne	LBB0_2
; %bb.1:
	mov	w28, #1
	b	LBB0_3
LBB0_2:
	mov	x0, x27
	mov	x1, x26
	mov	x2, x21
	bl	_QED_CHAIN_PAGE_CNT
	mov	x28, x0
LBB0_3:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x26
	mov	x3, x28
	bl	_qed_chain_alloc_sanity_check
	cbz	w0, LBB0_5
; %bb.4:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
	stp	x27, x26, [sp, #24]
	stp	x21, x24, [sp, #8]
	str	x25, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
	b	LBB0_13
LBB0_5:
	mov	x0, x20
	mov	x1, x28
	mov	x2, x26
	mov	x3, x25
	mov	x4, x21
	mov	x5, x24
	bl	_qed_chain_init_params
	cmp	w21, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w21, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w21, #130
	b.ne	LBB0_12
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_qed_chain_alloc_next_ptr
	mov	x23, x0
	cbnz	w0, LBB0_11
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_qed_chain_alloc_single
	mov	x23, x0
	cbnz	w0, LBB0_11
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_qed_chain_alloc_pbl
	mov	x23, x0
	cbz	w0, LBB0_13
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_qed_chain_free
	b	LBB0_13
LBB0_12:
	mov	w23, #0
LBB0_13:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate a chain with the given arguments:\n"

l_.str.1:                               ; @.str.1
	.asciz	"[use_mode %d, mode %d, cnt_type %d, num_elems %d, elem_size %zu]\n"

.subsections_via_symbols
