	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isapnp_set_resources
_isapnp_set_resources:                  ## @isapnp_set_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, %r12
	leaq	8(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_pnp_dbg
	movq	16(%r12), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	_isapnp_cfg_begin
	movl	$1, (%r12)
	movq	_ISAPNP_MAX_PORT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	_ISAPNP_MAX_PORT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$2, %r15d
	cmpq	%rax, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_pnp_get_resource
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_pnp_resource_enabled
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r13), %rcx
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	movslq	%r15d, %rdi
	movq	_ISAPNP_CFG_PORT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	(%r13), %esi
	callq	_isapnp_write_word
	jmp	LBB0_4
LBB0_5:
	movq	_ISAPNP_MAX_IRQ@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.6:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_pnp_dbg
	movslq	%r15d, %rdi
	movq	_ISAPNP_CFG_IRQ@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	%r13d, %esi
	callq	_isapnp_write_byte
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	_ISAPNP_MAX_IRQ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$2, %r15d
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_pnp_get_resource
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_pnp_resource_enabled
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %eax
	movl	$9, %r13d
	cmpl	$2, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %r13d
	jmp	LBB0_10
LBB0_12:
	movq	_ISAPNP_MAX_DMA@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.13:
	movq	_IORESOURCE_DMA@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movq	_ISAPNP_MAX_DMA@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_pnp_get_resource
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_pnp_resource_enabled
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	(%r13), %rcx
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	movq	_ISAPNP_CFG_DMA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	(%r13), %esi
	callq	_isapnp_write_byte
	jmp	LBB0_16
LBB0_17:
	movq	_ISAPNP_MAX_MEM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_22
## %bb.18:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	movq	_ISAPNP_MAX_MEM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$8, %r15d
	cmpq	%rax, %rbx
	jge	LBB0_22
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_pnp_get_resource
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_pnp_resource_enabled
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movslq	(%r13), %rcx
	movq	%r14, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	movslq	%r15d, %rdi
	movq	_ISAPNP_CFG_MEM@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movzwl	1(%r13), %esi
	callq	_isapnp_write_word
	jmp	LBB0_21
LBB0_22:
	movl	4(%r12), %edi
	callq	_isapnp_activate
	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	"set resources\n"

	.comm	_ISAPNP_MAX_PORT,4,2            ## @ISAPNP_MAX_PORT
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
L_.str.1:                               ## @.str.1
	.asciz	"  set io  %d to %#llx\n"

	.comm	_ISAPNP_CFG_PORT,8,3            ## @ISAPNP_CFG_PORT
	.comm	_ISAPNP_MAX_IRQ,4,2             ## @ISAPNP_MAX_IRQ
	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
L_.str.2:                               ## @.str.2
	.asciz	"  set irq %d to %d\n"

	.comm	_ISAPNP_CFG_IRQ,8,3             ## @ISAPNP_CFG_IRQ
	.comm	_ISAPNP_MAX_DMA,4,2             ## @ISAPNP_MAX_DMA
	.comm	_IORESOURCE_DMA,4,2             ## @IORESOURCE_DMA
L_.str.3:                               ## @.str.3
	.asciz	"  set dma %d to %lld\n"

	.comm	_ISAPNP_CFG_DMA,8,3             ## @ISAPNP_CFG_DMA
	.comm	_ISAPNP_MAX_MEM,4,2             ## @ISAPNP_MAX_MEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.4:                               ## @.str.4
	.asciz	"  set mem %d to %#llx\n"

	.comm	_ISAPNP_CFG_MEM,8,3             ## @ISAPNP_CFG_MEM
	.no_dead_strip	_isapnp_set_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isapnp_set_resources
_isapnp_set_resources:                  ; @isapnp_set_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	add	x20, x0, #8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_pnp_dbg
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_isapnp_cfg_begin
	mov	w8, #1
	str	w8, [x19]
Lloh2:
	adrp	x24, _ISAPNP_MAX_PORT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ISAPNP_MAX_PORT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w25, #0
	mov	x21, #0
Lloh4:
	adrp	x26, _IORESOURCE_IO@GOTPAGE
Lloh5:
	ldr	x26, [x26, _IORESOURCE_IO@GOTPAGEOFF]
Lloh6:
	adrp	x27, _ISAPNP_CFG_PORT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _ISAPNP_CFG_PORT@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	add	w25, w25, #2
	cmp	x21, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x21
	bl	_pnp_get_resource
	mov	x23, x0
	bl	_pnp_resource_enabled
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x23]
	stp	x21, x8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_pnp_dbg
	ldr	x8, [x27]
	add	x0, x8, w25, sxtw
	ldr	w1, [x23]
	bl	_isapnp_write_word
	b	LBB0_2
LBB0_5:
Lloh10:
	adrp	x24, _ISAPNP_MAX_IRQ@GOTPAGE
Lloh11:
	ldr	x24, [x24, _ISAPNP_MAX_IRQ@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	w25, #0
	mov	x21, #0
Lloh12:
	adrp	x26, _IORESOURCE_IRQ@GOTPAGE
Lloh13:
	ldr	x26, [x26, _IORESOURCE_IRQ@GOTPAGEOFF]
	mov	w27, #9
Lloh14:
	adrp	x28, _ISAPNP_CFG_IRQ@GOTPAGE
Lloh15:
	ldr	x28, [x28, _ISAPNP_CFG_IRQ@GOTPAGEOFF]
Lloh16:
	adrp	x22, l_.str.2@PAGE
Lloh17:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	add	w25, w25, #2
	cmp	x21, x8
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x21
	bl	_pnp_get_resource
	mov	x23, x0
	bl	_pnp_resource_enabled
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x23]
	cmp	w8, #2
	csel	w23, w27, w8, eq
	stp	x21, x23, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_pnp_dbg
	ldr	x8, [x28]
	add	x0, x8, w25, sxtw
	mov	x1, x23
	bl	_isapnp_write_byte
	b	LBB0_7
LBB0_10:
Lloh18:
	adrp	x24, _ISAPNP_MAX_DMA@GOTPAGE
Lloh19:
	ldr	x24, [x24, _ISAPNP_MAX_DMA@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x21, #0
Lloh20:
	adrp	x25, _IORESOURCE_DMA@GOTPAGE
Lloh21:
	ldr	x25, [x25, _IORESOURCE_DMA@GOTPAGEOFF]
Lloh22:
	adrp	x26, _ISAPNP_CFG_DMA@GOTPAGE
Lloh23:
	ldr	x26, [x26, _ISAPNP_CFG_DMA@GOTPAGEOFF]
Lloh24:
	adrp	x22, l_.str.3@PAGE
Lloh25:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x21
	bl	_pnp_get_resource
	mov	x23, x0
	bl	_pnp_resource_enabled
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldrsw	x8, [x23]
	stp	x21, x8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_pnp_dbg
	ldr	x8, [x26]
	add	x0, x21, x8
	ldr	w1, [x23]
	bl	_isapnp_write_byte
	b	LBB0_12
LBB0_15:
Lloh26:
	adrp	x24, _ISAPNP_MAX_MEM@GOTPAGE
Lloh27:
	ldr	x24, [x24, _ISAPNP_MAX_MEM@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.16:
	mov	w25, #0
	mov	x21, #0
Lloh28:
	adrp	x26, _IORESOURCE_MEM@GOTPAGE
Lloh29:
	ldr	x26, [x26, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh30:
	adrp	x27, _ISAPNP_CFG_MEM@GOTPAGE
Lloh31:
	ldr	x27, [x27, _ISAPNP_CFG_MEM@GOTPAGEOFF]
Lloh32:
	adrp	x22, l_.str.4@PAGE
Lloh33:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	add	w25, w25, #8
	cmp	x21, x8
	b.ge	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x21
	bl	_pnp_get_resource
	mov	x23, x0
	bl	_pnp_resource_enabled
	cbz	x0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldrsw	x8, [x23]
	stp	x21, x8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_pnp_dbg
	ldr	x8, [x27]
	add	x0, x8, w25, sxtw
	ldurh	w1, [x23, #1]
	bl	_isapnp_write_word
	b	LBB0_17
LBB0_20:
	ldr	w0, [x19, #4]
	bl	_isapnp_activate
	bl	_isapnp_cfg_end
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set resources\n"

	.comm	_ISAPNP_MAX_PORT,4,2            ; @ISAPNP_MAX_PORT
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
l_.str.1:                               ; @.str.1
	.asciz	"  set io  %d to %#llx\n"

	.comm	_ISAPNP_CFG_PORT,8,3            ; @ISAPNP_CFG_PORT
	.comm	_ISAPNP_MAX_IRQ,4,2             ; @ISAPNP_MAX_IRQ
	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
l_.str.2:                               ; @.str.2
	.asciz	"  set irq %d to %d\n"

	.comm	_ISAPNP_CFG_IRQ,8,3             ; @ISAPNP_CFG_IRQ
	.comm	_ISAPNP_MAX_DMA,4,2             ; @ISAPNP_MAX_DMA
	.comm	_IORESOURCE_DMA,4,2             ; @IORESOURCE_DMA
l_.str.3:                               ; @.str.3
	.asciz	"  set dma %d to %lld\n"

	.comm	_ISAPNP_CFG_DMA,8,3             ; @ISAPNP_CFG_DMA
	.comm	_ISAPNP_MAX_MEM,4,2             ; @ISAPNP_MAX_MEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.4:                               ; @.str.4
	.asciz	"  set mem %d to %#llx\n"

	.comm	_ISAPNP_CFG_MEM,8,3             ; @ISAPNP_CFG_MEM
	.no_dead_strip	_isapnp_set_resources
.subsections_via_symbols
