	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function to_dev_offset
_to_dev_offset:                         ## @to_dev_offset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_7
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_resource_size
	cmpq	%rax, %r12
	jl	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_resource_size
	subq	%rax, %r12
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_7:
	addq	$4, %r14
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_8
LBB0_3:
	movl	%r15d, %r15d
	addq	%r12, %r15
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_resource_size
	cmpq	%rax, %r15
	jle	LBB0_5
## %bb.4:
	addq	$4, %r14
	leaq	L_.str(%rip), %rdx
LBB0_8:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dev_WARN_ONCE
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_9:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	addq	(%rax), %r12
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"illegal request\n"

	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
L_.str.1:                               ## @.str.1
	.asciz	"request out of range\n"

	.no_dead_strip	_to_dev_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function to_dev_offset
_to_dev_offset:                         ; @to_dev_offset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x22, lsl #3]
	bl	_resource_size
	cmp	x19, x0
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x22, lsl #3]
	bl	_resource_size
	sub	x19, x19, x0
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_4:
	add	x0, x20, #4
Lloh0:
	adrp	x2, l_.str.1@PAGE
Lloh1:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	add	x21, x19, w21, uxtw
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x22, lsl #3]
	bl	_resource_size
	cmp	x21, x0
	b.le	LBB0_9
; %bb.6:
	add	x0, x20, #4
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
LBB0_7:
	mov	w1, #1
	bl	_dev_WARN_ONCE
Lloh4:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x8, [x8]
	add	x0, x8, x19
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"illegal request\n"

	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
l_.str.1:                               ; @.str.1
	.asciz	"request out of range\n"

	.no_dead_strip	_to_dev_offset
.subsections_via_symbols
