	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_dev_enum                    ## -- Begin function ub_dev_enum
	.p2align	4, 0x90
_ub_dev_enum:                           ## @ub_dev_enum
	.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	_UB_MAX_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$3, %edx
	movq	_devices@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	(%r14), %rbx
	movq	_API_DEV_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_syscall
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	addq	$8, %rbx
	xorl	%r13d, %r13d
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -8(%rbx)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_UB_MAX_DEV@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	movq	-8(%rax,%r15,8), %rax
	movq	%rax, (%rbx)
	movq	_API_DEV_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_syscall
	incl	%r13d
	incq	%r15
	addq	$8, %rbx
	testl	%eax, %eax
	jne	LBB0_2
	jmp	LBB0_7
LBB0_3:
	movl	%r13d, %r12d
	jmp	LBB0_7
LBB0_6:
	movl	%r15d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_devices,8,3                    ## @devices
	.comm	_UB_MAX_DEV,4,2                 ## @UB_MAX_DEV
	.comm	_API_DEV_ENUM,4,2               ## @API_DEV_ENUM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_dev_enum                    ; -- Begin function ub_dev_enum
	.p2align	2
_ub_dev_enum:                           ; @ub_dev_enum
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x21, _UB_MAX_DEV@GOTPAGE
Lloh1:
	ldr	x21, [x21, _UB_MAX_DEV@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w2, w8, #3
Lloh2:
	adrp	x19, _devices@GOTPAGE
Lloh3:
	ldr	x19, [x19, _devices@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	x20, [x19]
Lloh4:
	adrp	x22, _API_DEV_ENUM@GOTPAGE
Lloh5:
	ldr	x22, [x22, _API_DEV_ENUM@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, #0
	mov	x2, x20
	bl	_syscall
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x0, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.ge	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8, x0, lsl #3]
	str	x8, [x20, #8]!
	ldr	w0, [x22]
	mov	x1, #0
	mov	x2, x20
	bl	_syscall
	mov	x8, x0
	mov	x0, x23
	cbnz	w8, LBB0_2
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	add	w0, w0, #1
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_devices,8,3                    ; @devices
	.comm	_UB_MAX_DEV,4,2                 ; @UB_MAX_DEV
	.comm	_API_DEV_ENUM,4,2               ; @API_DEV_ENUM
.subsections_via_symbols
