	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubd_config
_ubd_config:                            ## @ubd_config
	.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
	movq	%rsi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kstrdup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	-28(%rbp), %rsi
	movq	%rax, %rdi
	movq	%r14, %rdx
	callq	_ubd_setup_common
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	cmpl	$-1, -28(%rbp)
	je	LBB0_7
## %bb.4:
	movq	_ubd_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	-28(%rbp), %edi
	movq	%r14, %rsi
	callq	_ubd_add
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_ubd_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-28(%rbp), %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_6:
	movq	_ubd_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_kfree
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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	"Failed to allocate memory"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ubd_lock,4,2                   ## @ubd_lock
	.comm	_ubd_devs,8,3                   ## @ubd_devs
	.no_dead_strip	_ubd_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubd_config
_ubd_config:                            ; @ubd_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kstrdup
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	add	x1, sp, #12
	mov	x2, x19
	bl	_ubd_setup_common
	ldr	w8, [sp, #12]
	cmp	w0, #0
	ccmn	w8, #1, #4, eq
	b.ne	LBB0_4
; %bb.2:
	mov	x20, x0
	mov	x0, x21
	bl	_kfree
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19]
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x0, _ubd_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ubd_lock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w0, [sp, #12]
	mov	x1, x19
	bl	_ubd_add
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _ubd_devs@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ubd_devs@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldrsw	x9, [sp, #12]
	str	xzr, [x8, x9, lsl #3]
LBB0_6:
Lloh13:
	adrp	x0, _ubd_lock@GOTPAGE
Lloh14:
	ldr	x0, [x0, _ubd_lock@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ubd_lock,4,2                   ; @ubd_lock
	.comm	_ubd_devs,8,3                   ; @ubd_devs
	.no_dead_strip	_ubd_config
.subsections_via_symbols
