	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cciss_add_gendisk
_cciss_add_gendisk:                     ## @cciss_add_gendisk
	.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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	%edx, %esi
	callq	_cciss_alloc_drive_info
	movl	$-1, %r14d
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.1:
	movl	%eax, %r15d
	movq	16(%rbx), %rax
	movslq	%r15d, %r13
	cmpq	$0, (%rax,%r13,8)
	jne	LBB0_4
## %bb.2:
	movq	_NWD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edi
	shll	%cl, %edi
	callq	_alloc_disk
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx,%r13,8)
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	movq	(%rbx), %rax
	movq	(%rax,%r13,8), %rax
	movl	8(%rax), %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_cciss_create_ld_sysfs_entry
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_cciss_free_gendisk
	jmp	LBB0_7
LBB0_5:
	movq	(%rbx), %rax
	movq	(%rax,%r13,8), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
	callq	_wmb
	movl	%r15d, %r14d
	jmp	LBB0_8
LBB0_3:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_cciss_free_drive_info
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NWD_SHIFT,4,2                  ## @NWD_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate a new disk %d\n"

	.no_dead_strip	_cciss_add_gendisk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cciss_add_gendisk
_cciss_add_gendisk:                     ; @cciss_add_gendisk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	mov	x1, x2
	bl	_cciss_alloc_drive_info
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #16]
	sxtw	x22, w19
	ldr	x8, [x8, w0, sxtw #3]
	cbnz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _NWD_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NWD_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w0, w9, w8
	bl	_alloc_disk
	ldr	x8, [x20, #16]
	str	x0, [x8, x22, lsl #3]
	cbz	x0, LBB0_6
LBB0_3:
	ldr	x8, [x20]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w0, [x8, #8]
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	mov	x0, x20
	mov	x1, x19
	bl	_cciss_create_ld_sysfs_entry
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_cciss_free_gendisk
	b	LBB0_7
LBB0_5:
	ldr	x8, [x20]
	ldr	x8, [x8, x22, lsl #3]
	str	xzr, [x8]
	bl	_wmb
	b	LBB0_9
LBB0_6:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_cciss_free_drive_info
LBB0_8:
	mov	w19, #-1
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NWD_SHIFT,4,2                  ; @NWD_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate a new disk %d\n"

	.no_dead_strip	_cciss_add_gendisk
.subsections_via_symbols
