	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cciss_allocate_sg_chain_blocks
_cciss_allocate_sg_chain_blocks:        ## @cciss_allocate_sg_chain_blocks
	.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
	testl	%esi, %esi
	jle	LBB0_7
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	leal	(,%r14,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	shll	$2, %ebx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	movq	%rax, (%r12,%r14,8)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_5
	jmp	LBB0_8
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_cciss_free_sg_chain_blocks
LBB0_7:
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot get memory for s/g chains.\n"

	.no_dead_strip	_cciss_allocate_sg_chain_blocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cciss_allocate_sg_chain_blocks
_cciss_allocate_sg_chain_blocks:        ; @cciss_allocate_sg_chain_blocks
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cmp	w1, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	lsl	w0, w2, #3
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_kmalloc
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.2:
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.3:
	lsl	w22, w22, #2
	mov	x24, x20
	mov	w25, w19
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x22
	bl	_kmalloc
	str	x0, [x24]
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #8
	subs	x25, x25, #1
	b.ne	LBB0_4
	b	LBB0_8
LBB0_6:
	ldr	x0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	mov	x1, x19
	bl	_cciss_free_sg_chain_blocks
LBB0_7:
	mov	x20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot get memory for s/g chains.\n"

	.no_dead_strip	_cciss_allocate_sg_chain_blocks
.subsections_via_symbols
