	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iodyn_find_io
_iodyn_find_io:                         ## @iodyn_find_io
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	_MAX_IO_WIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.1:
	movl	%ecx, %r8d
	movq	%rdx, %r10
	movq	(%rdi), %r11
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %r9d
	shlq	$4, %rax
	xorl	%edx, %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$16, %rdx
	cmpq	%rdx, %rax
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r11,%rdx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r10), %ebx
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %ecx
	andl	%r9d, %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_7:
	movl	%r8d, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_IORESOURCE_BITS@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%r10, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	_MAX_IO_WIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	movl	%eax, %r15d
	callq	_resource_size
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_adjust_resource
	movq	_IORESOURCE_BITS@GOTPCREL(%rip), %rdx
	movq	_MAX_IO_WIN@GOTPCREL(%rip), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %r10                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	(%rcx), %rax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jge	LBB0_21
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rax
	movq	8(%rax,%r13), %r14
	testq	%r14, %r14
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r14), %eax
	xorl	%esi, %eax
	testl	%eax, (%rdx)
	jne	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r14), %eax
	movl	8(%r14), %r12d
	incl	%r12d
	movl	(%r10), %r15d
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r12d, %r15d
	je	LBB0_12
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	subl	%r8d, %eax
	cmpl	%eax, %r15d
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_resource_size
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_adjust_resource
	movq	_IORESOURCE_BITS@GOTPCREL(%rip), %rdx
	movq	_MAX_IO_WIN@GOTPCREL(%rip), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %r10                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movl	%r15d, (%r10)
	jmp	LBB0_14
LBB0_15:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movl	$65536, %ecx                    ## imm = 0x10000
	cmovnel	%eax, %ecx
	movl	(%r10), %esi
	movl	%r8d, %edx
	movl	%r8d, %r14d
	movq	%r10, %r15
	movq	%rdi, %rbx
	callq	___iodyn_find_io_region
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx,%r13)
	testq	%rax, %rax
	je	LBB0_21
## %bb.16:
	movl	(%rax), %edx
	movl	%edx, (%r15)
	movl	4(%rax), %edx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %esi
	movq	_IORESOURCE_BITS@GOTPCREL(%rip), %rdi
	andl	(%rdi), %esi
	xorl	%edx, %esi
	movl	%esi, 4(%rax)
	movl	%r14d, (%rcx,%r13)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_22:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	%r12d, (%r10)
LBB0_14:
	movq	(%rdi), %rax
	addl	%r8d, (%rax,%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_IO_WIN,4,2                 ## @MAX_IO_WIN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IORESOURCE_BITS,4,2            ## @IORESOURCE_BITS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iodyn_find_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iodyn_find_io
_iodyn_find_io:                         ; @iodyn_find_io
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x5, [sp]                        ; 8-byte Folded Spill
	str	w4, [sp, #12]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x28, _MAX_IO_WIN@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MAX_IO_WIN@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.1:
	mov	x13, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x10, [x0]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sub	w9, w9, #1
	add	x10, x10, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #16
	subs	x8, x8, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [x21]
	cbz	w12, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x11]
	and	w11, w11, w9
	cmp	w11, w12
	b.ne	LBB0_2
; %bb.6:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_19
LBB0_7:
	mov	x19, #0
	mov	x20, #0
Lloh4:
	adrp	x10, _IORESOURCE_BITS@GOTPAGE
Lloh5:
	ldr	x10, [x10, _IORESOURCE_BITS@GOTPAGEOFF]
	mov	w8, w13
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	str	w13, [sp, #28]                  ; 4-byte Folded Spill
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x25
	bl	_resource_size
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x2, x0, x8
	mov	x0, x25
	mov	x1, x27
	bl	_adjust_resource
Lloh6:
	adrp	x10, _IORESOURCE_BITS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IORESOURCE_BITS@GOTPAGEOFF]
	ldr	w13, [sp, #28]                  ; 4-byte Folded Reload
	cbz	x0, LBB0_21
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x28]
	add	x19, x19, #16
	cmp	x20, x8
	b.ge	LBB0_18
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x8, x8, x19
	ldr	x25, [x8, #8]
	cbz	x25, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x25, #4]
	ldr	w9, [x10]
	eor	w8, w8, w22
	tst	w8, w9
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x25, #8]
	add	w24, w8, #1
	ldr	w26, [x21]
	ldr	w27, [x25]
	cmp	w26, #0
	ccmp	w26, w24, #4, ne
	b.eq	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	w8, w27, w13
	cmp	w26, w8
	b.ne	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x25
	bl	_resource_size
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x2, x0, x8
	mov	x0, x25
	mov	x1, x26
	bl	_adjust_resource
Lloh8:
	adrp	x10, _IORESOURCE_BITS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IORESOURCE_BITS@GOTPAGEOFF]
	ldr	w13, [sp, #28]                  ; 4-byte Folded Reload
	cbnz	x0, LBB0_9
; %bb.15:
	str	w26, [x21]
	b	LBB0_22
LBB0_16:
	mov	w8, #65536
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w9, #0
	csel	w3, w8, w9, eq
	ldr	w1, [x21]
	mov	x0, x23
	mov	x2, x13
	mov	x20, x13
	bl	___iodyn_find_io_region
	ldr	x9, [x23]
	add	x10, x9, x19
	str	x0, [x10, #8]
	cbz	x0, LBB0_18
; %bb.17:
	mov	x8, x0
	mov	w0, #0
	ldr	w10, [x8]
	str	w10, [x21]
	ldr	w10, [x8, #4]
Lloh10:
	adrp	x11, _IORESOURCE_BITS@GOTPAGE
Lloh11:
	ldr	x11, [x11, _IORESOURCE_BITS@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	bic	w10, w10, w11
	and	w11, w11, w22
	orr	w10, w10, w11
	str	w10, [x8, #4]
	str	w20, [x9, x19]
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_20
LBB0_18:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_21:
	str	w24, [x21]
LBB0_22:
	ldr	x8, [x23]
	ldr	w9, [x8, x19]
	add	w9, w9, w13
	str	w9, [x8, x19]
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x25, [x8]
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_IO_WIN,4,2                 ; @MAX_IO_WIN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IORESOURCE_BITS,4,2            ; @IORESOURCE_BITS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iodyn_find_io
.subsections_via_symbols
