	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_get_device                 ## -- Begin function ubi_get_device
	.p2align	4, 0x90
_ubi_get_device:                        ## @ubi_get_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	movq	_ubi_devices_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_ubi_devices@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ubi_assert
	incq	(%rbx)
	leaq	8(%rbx), %rdi
	callq	_get_device
LBB0_2:
	movq	_ubi_devices_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ubi_devices_lock,4,2           ## @ubi_devices_lock
	.comm	_ubi_devices,8,3                ## @ubi_devices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_get_device                 ; -- Begin function ubi_get_device
	.p2align	2
_ubi_get_device:                        ; @ubi_get_device
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, _ubi_devices_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ubi_devices_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh2:
	adrp	x8, _ubi_devices@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ubi_devices@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x19, [x8, w19, sxtw #3]
	cbz	x19, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_ubi_assert
	ldr	x8, [x19]
	add	x8, x8, #1
	mov	x0, x19
	str	x8, [x0], #8
	bl	_get_device
LBB0_2:
Lloh5:
	adrp	x0, _ubi_devices_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ubi_devices_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ubi_devices_lock,4,2           ; @ubi_devices_lock
	.comm	_ubi_devices,8,3                ; @ubi_devices
.subsections_via_symbols
