	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbp2_add_logical_unit
_sbp2_add_logical_unit:                 ## @sbp2_add_logical_unit
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	56(%rax), %rdi
	movl	$256, 56(%rax)                  ## imm = 0x100
	movq	_sbp2_status_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	%rbx, 64(%rbx)
	movq	_fw_high_memory_region@GOTPCREL(%rip), %rsi
	callq	_fw_core_add_address_handler
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	%r14, 48(%rbx)
	movzwl	%r15w, %eax
	movl	%eax, (%rbx)
	movq	_INVALID_LOGIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	$0, 4(%rbx)
	incl	4(%r14)
	leaq	24(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	_sbp2_login@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	leaq	16(%rbx), %rdi
	movq	_sbp2_lu_workfn@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	addq	$12, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_list_add_tail
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sbp2_status_write,4,2          ## @sbp2_status_write
	.comm	_fw_high_memory_region,4,2      ## @fw_high_memory_region
	.comm	_INVALID_LOGIN_ID,4,2           ## @INVALID_LOGIN_ID
	.comm	_sbp2_login,4,2                 ## @sbp2_login
	.comm	_sbp2_lu_workfn,4,2             ## @sbp2_lu_workfn
	.no_dead_strip	_sbp2_add_logical_unit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbp2_add_logical_unit
_sbp2_add_logical_unit:                 ; @sbp2_add_logical_unit
	.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	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	w8, #256
	str	w8, [x0, #56]!
Lloh3:
	adrp	x8, _sbp2_status_write@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sbp2_status_write@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #72]
	str	x20, [x20, #64]
Lloh6:
	adrp	x1, _fw_high_memory_region@GOTPAGE
Lloh7:
	ldr	x1, [x1, _fw_high_memory_region@GOTPAGEOFF]
	bl	_fw_core_add_address_handler
	tbnz	x0, #63, LBB0_3
; %bb.2:
	str	x19, [x20, #48]
	and	w8, w21, #0xffff
Lloh8:
	adrp	x9, _INVALID_LOGIN_ID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INVALID_LOGIN_ID@GOTPAGEOFF]
	stp	w8, wzr, [x20]
Lloh10:
	ldr	w8, [x9]
	str	w8, [x20, #40]
	str	xzr, [x20, #32]
	str	wzr, [x20, #8]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	add	x0, x20, #24
	bl	_INIT_LIST_HEAD
Lloh11:
	adrp	x8, _sbp2_login@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sbp2_login@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #20]
	add	x0, x20, #16
Lloh14:
	adrp	x8, _sbp2_lu_workfn@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sbp2_lu_workfn@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x0, x20, #12
	mov	x1, x19
	bl	_list_add_tail
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_kfree
LBB0_4:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sbp2_status_write,4,2          ; @sbp2_status_write
	.comm	_fw_high_memory_region,4,2      ; @fw_high_memory_region
	.comm	_INVALID_LOGIN_ID,4,2           ; @INVALID_LOGIN_ID
	.comm	_sbp2_login,4,2                 ; @sbp2_login
	.comm	_sbp2_lu_workfn,4,2             ; @sbp2_lu_workfn
	.no_dead_strip	_sbp2_add_logical_unit
.subsections_via_symbols
