	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macio_resource_quirks
_macio_resource_quirks:                 ## @macio_resource_quirks
	.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	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_25
## %bb.1:
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	testl	%edx, %edx
	je	LBB0_2
## %bb.4:
	cmpl	$2, %r14d
	jl	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_26
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	$131071, %eax                   ## imm = 0x1FFFF
	addl	8(%r12), %eax
	movl	%eax, 4(%r12)
LBB0_6:
	movl	8(%r12), %eax
	movl	%eax, %ecx
	andl	$126976, %ecx                   ## imm = 0x1F000
	cmpl	$32768, %ecx                    ## imm = 0x8000
	jne	LBB0_8
## %bb.7:
	addl	$255, %eax
	movl	%eax, 4(%r12)
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_26
## %bb.9:
	cmpl	$3, %r14d
	jl	LBB0_12
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	jne	LBB0_26
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	jne	LBB0_26
	jmp	LBB0_13
LBB0_12:
	testl	%r14d, %r14d
	jle	LBB0_14
LBB0_13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	jne	LBB0_26
LBB0_14:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_name_eq
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_is_type
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	leaq	L_.str.9(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_node_is_type
	testq	%rax, %rax
	je	LBB0_25
LBB0_18:
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.21:
	cmpl	$1, %r14d
	jne	LBB0_25
## %bb.22:
	movl	4(%r12), %ecx
	movl	8(%r12), %eax
	subl	%eax, %ecx
	cmpl	$256, %ecx                      ## imm = 0x100
	jl	LBB0_25
## %bb.23:
	addl	$255, %eax
	jmp	LBB0_24
LBB0_19:
	movl	4(%r12), %ecx
	movl	8(%r12), %eax
	subl	%eax, %ecx
	cmpl	$4096, %ecx                     ## imm = 0x1000
	jl	LBB0_25
## %bb.20:
	addl	$4095, %eax                     ## imm = 0xFFF
LBB0_24:
	movl	%eax, 4(%r12)
LBB0_25:
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gc"

L_.str.1:                               ## @.str.1
	.asciz	"radio"

L_.str.2:                               ## @.str.2
	.asciz	"escc"

L_.str.3:                               ## @.str.3
	.asciz	"ch-a"

L_.str.4:                               ## @.str.4
	.asciz	"ch-b"

L_.str.5:                               ## @.str.5
	.asciz	"media-bay"

L_.str.6:                               ## @.str.6
	.asciz	"IDE"

L_.str.7:                               ## @.str.7
	.asciz	"ATA"

L_.str.8:                               ## @.str.8
	.asciz	"ide"

L_.str.9:                               ## @.str.9
	.asciz	"ata"

	.no_dead_strip	_macio_resource_quirks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macio_resource_quirks
_macio_resource_quirks:                 ; @macio_resource_quirks
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cbz	w2, LBB0_4
; %bb.2:
	cmp	w20, #2
	b.lt	LBB0_6
; %bb.3:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_9
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x19, #8]
	mov	w9, #131071
	add	w8, w8, w9
	str	w8, [x19, #4]
LBB0_6:
	ldr	w8, [x19, #8]
	and	w9, w8, #0x1f000
	cmp	w9, #8, lsl #12                 ; =32768
	b.ne	LBB0_8
; %bb.7:
	add	w8, w8, #255
	str	w8, [x19, #4]
LBB0_8:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbz	x0, LBB0_10
LBB0_9:
	mov	w0, #1
	b	LBB0_27
LBB0_10:
	cmp	w20, #3
	b.lt	LBB0_13
; %bb.11:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_9
; %bb.12:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_9
	b	LBB0_14
LBB0_13:
	cmp	w20, #1
	b.lt	LBB0_15
LBB0_14:
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_9
LBB0_15:
Lloh15:
	adrp	x1, l_.str.6@PAGE
Lloh16:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_19
; %bb.16:
Lloh17:
	adrp	x1, l_.str.7@PAGE
Lloh18:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_of_node_name_eq
	cbnz	x0, LBB0_19
; %bb.17:
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x21
	bl	_of_node_is_type
	cbnz	x0, LBB0_19
; %bb.18:
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	bl	_of_node_is_type
	cbz	x0, LBB0_27
LBB0_19:
	cbz	w20, LBB0_23
; %bb.20:
	cmp	w20, #1
	b.ne	LBB0_26
; %bb.21:
	ldp	w9, w8, [x19, #4]
	sub	w9, w9, w8
	cmp	w9, #256
	b.lt	LBB0_26
; %bb.22:
	mov	w0, #0
	add	w8, w8, #255
	b	LBB0_25
LBB0_23:
	ldp	w9, w8, [x19, #4]
	sub	w9, w9, w8
	cmp	w9, #1, lsl #12                 ; =4096
	b.lt	LBB0_26
; %bb.24:
	mov	w0, #0
	add	w8, w8, #4095
LBB0_25:
	str	w8, [x19, #4]
	b	LBB0_27
LBB0_26:
	mov	w0, #0
LBB0_27:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gc"

l_.str.1:                               ; @.str.1
	.asciz	"radio"

l_.str.2:                               ; @.str.2
	.asciz	"escc"

l_.str.3:                               ; @.str.3
	.asciz	"ch-a"

l_.str.4:                               ; @.str.4
	.asciz	"ch-b"

l_.str.5:                               ; @.str.5
	.asciz	"media-bay"

l_.str.6:                               ; @.str.6
	.asciz	"IDE"

l_.str.7:                               ; @.str.7
	.asciz	"ATA"

l_.str.8:                               ; @.str.8
	.asciz	"ide"

l_.str.9:                               ; @.str.9
	.asciz	"ata"

	.no_dead_strip	_macio_resource_quirks
.subsections_via_symbols
