	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ugen20_readdir
_ugen20_readdir:                        ## @ugen20_readdir
	.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	%rdi, %r13
	leaq	48(%rdi), %r14
	movq	(%rdi), %rbx
	movq	_USB_READ_DIR@GOTPCREL(%rip), %r12
	testq	%rbx, %rbx
	jne	LBB0_4
	.p2align	4, 0x90
LBB0_2:
	movl	24(%r13), %eax
	addl	%eax, 56(%r13)
	movq	8(%r13), %rdi
	callq	_libusb20_pass_ptr
	movl	%eax, 52(%r13)
	movl	$8, 48(%r13)
	movq	$0, 24(%r13)
	movl	60(%r13), %r15d
	movl	(%r12), %edi
	callq	_IOUSB
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_ioctl
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	8(%r13), %rbx
	movq	%rbx, (%r13)
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 24(%r13)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%r13)
	xorl	%ebx, %ebx
	testq	%rbx, %rbx
	jne	LBB0_4
	jmp	LBB0_2
LBB0_8:
	leaq	8(%rbx), %rdi
	movq	%rdi, 32(%r13)
	callq	_strlen
	cltq
	addq	%rbx, %rax
	addq	$9, %rax
	movq	%rax, 40(%r13)
	movq	(%r13), %rax
	movq	(%rax), %rcx
	leaq	(%rax,%rcx,8), %rcx
	movq	%rcx, (%r13)
	incq	24(%r13)
	cmpq	8(%r13), %rcx
	jb	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	cmpq	16(%r13), %rcx
	jbe	LBB0_12
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_READ_DIR,4,2               ## @USB_READ_DIR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ugen20_readdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ugen20_readdir
_ugen20_readdir:                        ; @ugen20_readdir
	.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
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20], #48
	mov	w22, #8
Lloh0:
	adrp	x23, _USB_READ_DIR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _USB_READ_DIR@GOTPAGEOFF]
	cbnz	x8, LBB0_3
LBB0_1:
	ldr	w8, [x19, #24]
	ldr	w9, [x19, #56]
	add	w8, w9, w8
	str	w8, [x19, #56]
	ldr	x0, [x19, #8]
	bl	_libusb20_pass_ptr
	stp	w22, w0, [x19, #48]
	str	xzr, [x19, #24]
	ldr	w21, [x19, #60]
	ldr	w0, [x23]
	bl	_IOUSB
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_ioctl
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x19, #8]
	str	x8, [x19]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	cbnz	x9, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	str	xzr, [x19]
	cbnz	x8, LBB0_3
	b	LBB0_1
LBB0_6:
	add	x20, x8, #8
	str	x20, [x19, #32]
	mov	x0, x20
	bl	_strlen
	add	x8, x20, w0, sxtw
	add	x8, x8, #1
	str	x8, [x19, #40]
	ldp	x8, x9, [x19]
	ldr	x10, [x8]
	add	x8, x8, x10, lsl #3
	str	x8, [x19]
	ldr	x10, [x19, #24]
	add	x10, x10, #1
	str	x10, [x19, #24]
	cmp	x8, x9
	b.lo	LBB0_8
; %bb.7:
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ls	LBB0_12
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
LBB0_11:
	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
LBB0_12:
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_READ_DIR,4,2               ; @USB_READ_DIR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ugen20_readdir
.subsections_via_symbols
