	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isapnp_get_resources
_isapnp_get_resources:                  ## @isapnp_get_resources
	.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, %r15
	addq	$24, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_pnp_dbg
	movq	%r15, %rdi
	callq	_pnp_init_resources
	movq	16(%r15), %rax
	movl	(%rax), %edi
	movl	8(%r15), %esi
	callq	_isapnp_cfg_begin
	movq	_ISAPNP_CFG_ACTIVATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_isapnp_read_byte
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	_ISAPNP_MAX_PORT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	movq	_ISAPNP_CFG_PORT@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%eax, %edx
	callq	_pnp_add_io_resource
	incq	%r13
	movslq	(%r14), %rax
	addl	$2, %ebx
	cmpq	%rax, %r13
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rdi
	addq	(%r12), %rdi
	callq	_isapnp_read_word
	movl	$0, %ecx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_5
LBB0_6:
	movq	_ISAPNP_MAX_MEM@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	movq	_ISAPNP_CFG_MEM@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%eax, %edx
	callq	_pnp_add_mem_resource
	incq	%r13
	movslq	(%r14), %rax
	addl	$8, %ebx
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rdi
	addq	(%r12), %rdi
	callq	_isapnp_read_word
	shll	$8, %eax
	movl	$0, %ecx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_10
LBB0_11:
	movq	_ISAPNP_MAX_IRQ@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.12:
	xorl	%ebx, %ebx
	movq	_ISAPNP_CFG_IRQ@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	callq	_pnp_add_irq_resource
	incq	%r13
	movslq	(%r14), %rax
	addl	$2, %ebx
	cmpq	%rax, %r13
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rdi
	addq	(%r12), %rdi
	callq	_isapnp_read_word
	movl	%eax, %esi
	sarl	$8, %esi
	movl	$0, %edx
	cmpl	$256, %eax                      ## imm = 0x100
	jae	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_15
LBB0_16:
	movq	_ISAPNP_MAX_DMA@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	movq	_ISAPNP_CFG_DMA@GOTPCREL(%rip), %r12
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %r13
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pnp_add_dma_resource
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	callq	_isapnp_read_byte
	movl	$0, %edx
	cmpl	$4, %eax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	(%r13), %edx
	jmp	LBB0_20
LBB0_21:
	xorl	%eax, %eax
	callq	_isapnp_cfg_end
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get resources\n"

	.comm	_ISAPNP_CFG_ACTIVATE,8,3        ## @ISAPNP_CFG_ACTIVATE
	.comm	_ISAPNP_MAX_PORT,4,2            ## @ISAPNP_MAX_PORT
	.comm	_ISAPNP_CFG_PORT,8,3            ## @ISAPNP_CFG_PORT
	.comm	_IORESOURCE_DISABLED,4,2        ## @IORESOURCE_DISABLED
	.comm	_ISAPNP_MAX_MEM,4,2             ## @ISAPNP_MAX_MEM
	.comm	_ISAPNP_CFG_MEM,8,3             ## @ISAPNP_CFG_MEM
	.comm	_ISAPNP_MAX_IRQ,4,2             ## @ISAPNP_MAX_IRQ
	.comm	_ISAPNP_CFG_IRQ,8,3             ## @ISAPNP_CFG_IRQ
	.comm	_ISAPNP_MAX_DMA,4,2             ## @ISAPNP_MAX_DMA
	.comm	_ISAPNP_CFG_DMA,8,3             ## @ISAPNP_CFG_DMA
	.no_dead_strip	_isapnp_get_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isapnp_get_resources
_isapnp_get_resources:                  ; @isapnp_get_resources
	.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
	add	x0, x0, #24
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pnp_dbg
	mov	x0, x19
	bl	_pnp_init_resources
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_isapnp_cfg_begin
Lloh2:
	adrp	x8, _ISAPNP_CFG_ACTIVATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISAPNP_CFG_ACTIVATE@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_isapnp_read_byte
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.1:
Lloh5:
	adrp	x21, _ISAPNP_MAX_PORT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ISAPNP_MAX_PORT@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh7:
	adrp	x20, _IORESOURCE_DISABLED@GOTPAGE
Lloh8:
	ldr	x20, [x20, _IORESOURCE_DISABLED@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w22, #0
	mov	x23, #0
Lloh9:
	adrp	x24, _ISAPNP_CFG_PORT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ISAPNP_CFG_PORT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, w22, sxtw
	bl	_isapnp_read_word
	mov	x1, x0
	ldr	w8, [x20]
	cmp	w0, #0
	csel	w3, w8, wzr, eq
	mov	x0, x19
	mov	x2, x1
	bl	_pnp_add_io_resource
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	w22, w22, #2
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_4:
Lloh11:
	adrp	x21, _ISAPNP_MAX_MEM@GOTPAGE
Lloh12:
	ldr	x21, [x21, _ISAPNP_MAX_MEM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w22, #0
	mov	x23, #0
Lloh13:
	adrp	x24, _ISAPNP_CFG_MEM@GOTPAGE
Lloh14:
	ldr	x24, [x24, _ISAPNP_CFG_MEM@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, w22, sxtw
	bl	_isapnp_read_word
	lsl	w1, w0, #8
	ldr	w8, [x20]
	cmp	w1, #0
	csel	w3, w8, wzr, eq
	mov	x0, x19
	mov	x2, x1
	bl	_pnp_add_mem_resource
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	w22, w22, #8
	cmp	x23, x8
	b.lt	LBB0_6
LBB0_7:
Lloh15:
	adrp	x21, _ISAPNP_MAX_IRQ@GOTPAGE
Lloh16:
	ldr	x21, [x21, _ISAPNP_MAX_IRQ@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w22, #0
	mov	x23, #0
Lloh17:
	adrp	x24, _ISAPNP_CFG_IRQ@GOTPAGE
Lloh18:
	ldr	x24, [x24, _ISAPNP_CFG_IRQ@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, w22, sxtw
	bl	_isapnp_read_word
	asr	w1, w0, #8
	ldr	w8, [x20]
	cmp	w0, #256
	csel	w2, w8, wzr, lo
	mov	x0, x19
	bl	_pnp_add_irq_resource
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	w22, w22, #2
	cmp	x23, x8
	b.lt	LBB0_9
LBB0_10:
Lloh19:
	adrp	x21, _ISAPNP_MAX_DMA@GOTPAGE
Lloh20:
	ldr	x21, [x21, _ISAPNP_MAX_DMA@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x22, #0
Lloh21:
	adrp	x23, _ISAPNP_CFG_DMA@GOTPAGE
Lloh22:
	ldr	x23, [x23, _ISAPNP_CFG_DMA@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x0, x22, x8
	bl	_isapnp_read_byte
	mov	x1, x0
	ldr	w8, [x20]
	cmp	w1, #4
	csel	w2, w8, wzr, eq
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pnp_add_dma_resource
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_12
LBB0_13:
	bl	_isapnp_cfg_end
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get resources\n"

	.comm	_ISAPNP_CFG_ACTIVATE,8,3        ; @ISAPNP_CFG_ACTIVATE
	.comm	_ISAPNP_MAX_PORT,4,2            ; @ISAPNP_MAX_PORT
	.comm	_ISAPNP_CFG_PORT,8,3            ; @ISAPNP_CFG_PORT
	.comm	_IORESOURCE_DISABLED,4,2        ; @IORESOURCE_DISABLED
	.comm	_ISAPNP_MAX_MEM,4,2             ; @ISAPNP_MAX_MEM
	.comm	_ISAPNP_CFG_MEM,8,3             ; @ISAPNP_CFG_MEM
	.comm	_ISAPNP_MAX_IRQ,4,2             ; @ISAPNP_MAX_IRQ
	.comm	_ISAPNP_CFG_IRQ,8,3             ; @ISAPNP_CFG_IRQ
	.comm	_ISAPNP_MAX_DMA,4,2             ; @ISAPNP_MAX_DMA
	.comm	_ISAPNP_CFG_DMA,8,3             ; @ISAPNP_CFG_DMA
	.no_dead_strip	_isapnp_get_resources
.subsections_via_symbols
