	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubd_get_config
_ubd_get_config:                        ## @ubd_get_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	%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	%rcx, %rbx
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_parse_unit
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_MAX_DEV@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_2
## %bb.3:
	movq	_ubd_devs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movl	%eax, %ebx
	movq	_ubd_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	shlq	$4, %rbx
	movq	(%r13,%rbx), %rcx
	leaq	L_.str.1(%rip), %r12
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_CONFIG_CHUNK
	cmpq	$0, 8(%r13,%rbx)
	je	LBB0_6
## %bb.5:
	addq	%r13, %rbx
	addq	$8, %rbx
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_CONFIG_CHUNK
	movq	(%rbx), %r12
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	%r12, %rcx
	movl	$1, %r8d
	callq	_CONFIG_CHUNK
	movq	_ubd_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movl	$-1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DEV,4,2                    ## @MAX_DEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ubd_get_config : device number out of range"

	.comm	_ubd_devs,8,3                   ## @ubd_devs
	.comm	_ubd_lock,4,2                   ## @ubd_lock
L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	","

	.no_dead_strip	_ubd_get_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubd_get_config
_ubd_get_config:                        ; @ubd_get_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	x21, x3
	mov	x19, x2
	mov	x20, x1
	str	x0, [sp, #8]
	add	x0, sp, #8
	bl	_parse_unit
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _MAX_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _ubd_devs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ubd_devs@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
	mov	w22, w0
Lloh6:
	adrp	x0, _ubd_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _ubd_lock@GOTPAGEOFF]
	bl	_mutex_lock
	lsl	x8, x22, #4
	ldr	x3, [x21, x8]
	cbz	x3, LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w4, #0
	bl	_CONFIG_CHUNK
	add	x21, x21, x22, lsl #4
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_6
; %bb.4:
Lloh8:
	adrp	x3, l_.str.2@PAGE
Lloh9:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w4, #0
	bl	_CONFIG_CHUNK
	ldr	x3, [x21]
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, l_.str@PAGE
Lloh11:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x21]
	mov	w0, #-1
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x3, l_.str.1@PAGE
Lloh13:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w4, #1
	bl	_CONFIG_CHUNK
Lloh14:
	adrp	x0, _ubd_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ubd_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DEV,4,2                    ; @MAX_DEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ubd_get_config : device number out of range"

	.comm	_ubd_devs,8,3                   ; @ubd_devs
	.comm	_ubd_lock,4,2                   ; @ubd_lock
l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	","

	.no_dead_strip	_ubd_get_config
.subsections_via_symbols
