	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pnp_assign_irq
_pnp_assign_irq:                        ## @pnp_assign_irq
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rsi), %esi
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	callq	_pnp_find_resource
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %ecx
	movl	4(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	jmp	LBB0_15
LBB0_2:
	movq	_IORESOURCE_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r13), %ebx
	movl	%ebx, -52(%rbp)
	movl	$-1, -56(%rbp)
	movl	$-1, -48(%rbp)
	movl	4(%r13), %edi
	movq	_PNP_IRQ_NR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_bitmap_empty
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, -52(%rbp)
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	jmp	LBB0_14
LBB0_5:
	movl	4(%r13), %edi
	movl	(%r12), %esi
	movl	$16, %edx
	callq	_find_next_bit
	movl	%eax, -56(%rbp)
	cmpl	(%r12), %eax
	jge	LBB0_6
## %bb.13:
	movl	%eax, -48(%rbp)
	jmp	LBB0_14
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %r12
	cmpq	$32, %r12
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	_pnp_assign_irq.xtab(%rip), %rax
	movzwl	(%r12,%rax), %ebx
	movl	4(%r13), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, -48(%rbp)
	movl	%ebx, -56(%rbp)
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	callq	_pnp_check_irq
	testq	%rax, %rax
	je	LBB0_9
LBB0_14:
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edx
	movq	%r15, %rdi
	callq	_pnp_add_irq_resource
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_IORESOURCE_IRQ_OPTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.11:
	movl	$-1, -56(%rbp)
	movl	$-1, -48(%rbp)
	movq	_IORESOURCE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -52(%rbp)
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pnp_dbg
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @pnp_assign_irq.xtab
_pnp_assign_irq.xtab:
	.short	5                               ## 0x5
	.short	10                              ## 0xa
	.short	11                              ## 0xb
	.short	12                              ## 0xc
	.short	9                               ## 0x9
	.short	14                              ## 0xe
	.short	15                              ## 0xf
	.short	7                               ## 0x7
	.short	3                               ## 0x3
	.short	4                               ## 0x4
	.short	13                              ## 0xd
	.short	0                               ## 0x0
	.short	1                               ## 0x1
	.short	6                               ## 0x6
	.short	8                               ## 0x8
	.short	2                               ## 0x2

	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  irq %d already set to %d flags %#lx\n"

	.comm	_IORESOURCE_AUTO,4,2            ## @IORESOURCE_AUTO
	.comm	_PNP_IRQ_NR,4,2                 ## @PNP_IRQ_NR
	.comm	_IORESOURCE_DISABLED,4,2        ## @IORESOURCE_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"  irq %d disabled\n"

	.comm	_IORESOURCE_IRQ_OPTIONAL,4,2    ## @IORESOURCE_IRQ_OPTIONAL
L_.str.2:                               ## @.str.2
	.asciz	"  irq %d disabled (optional)\n"

L_.str.3:                               ## @.str.3
	.asciz	"  couldn't assign irq %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_pnp_assign_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pnp_assign_irq
_pnp_assign_irq:                        ; @pnp_assign_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w1, [x1]
Lloh0:
	adrp	x8, _IORESOURCE_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_pnp_find_resource
	cbz	x0, LBB0_2
; %bb.1:
	ldp	w8, w9, [x0]
	stp	x8, x9, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_pnp_dbg
	b	LBB0_12
LBB0_2:
Lloh5:
	adrp	x8, _IORESOURCE_AUTO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IORESOURCE_AUTO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldp	w9, w0, [x21]
	orr	w23, w8, w9
	mov	w8, #-1
	stp	w8, w23, [sp, #16]
	str	w8, [sp, #24]
Lloh8:
	adrp	x22, _PNP_IRQ_NR@GOTPAGE
Lloh9:
	ldr	x22, [x22, _PNP_IRQ_NR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_bitmap_empty
	cbz	x0, LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _IORESOURCE_DISABLED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IORESOURCE_DISABLED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w8, w23, w8
	str	w8, [sp, #20]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	mov	x2, x20
	bl	_pnp_dbg
	b	LBB0_11
LBB0_5:
	ldr	w0, [x21, #4]
	ldr	w1, [x22]
	mov	w2, #16
	bl	_find_next_bit
	str	w0, [sp, #16]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ge	LBB0_7
; %bb.6:
	str	w0, [sp, #24]
	b	LBB0_11
LBB0_7:
	mov	x23, #0
Lloh15:
	adrp	x24, _pnp_assign_irq.xtab@PAGE
Lloh16:
	add	x24, x24, _pnp_assign_irq.xtab@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #2
	cmp	x23, #32
	b.eq	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrh	w22, [x24, x23]
	ldr	w1, [x21, #4]
	mov	x0, x22
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	w22, [sp, #24]
	str	w22, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	bl	_pnp_check_irq
	cbz	x0, LBB0_8
LBB0_11:
	ldp	w1, w2, [sp, #16]
	mov	x0, x19
	bl	_pnp_add_irq_resource
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
	ldr	w8, [x21]
Lloh17:
	adrp	x9, _IORESOURCE_IRQ_OPTIONAL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IORESOURCE_IRQ_OPTIONAL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	mov	w8, #-1
Lloh20:
	adrp	x9, _IORESOURCE_DISABLED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IORESOURCE_DISABLED@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	ldr	w10, [sp, #20]
	orr	w9, w10, w9
	str	w8, [sp, #16]
	stp	w9, w8, [sp, #20]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_16:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_pnp_dbg
Lloh27:
	adrp	x8, _EBUSY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	1                               ; @pnp_assign_irq.xtab
_pnp_assign_irq.xtab:
	.short	5                               ; 0x5
	.short	10                              ; 0xa
	.short	11                              ; 0xb
	.short	12                              ; 0xc
	.short	9                               ; 0x9
	.short	14                              ; 0xe
	.short	15                              ; 0xf
	.short	7                               ; 0x7
	.short	3                               ; 0x3
	.short	4                               ; 0x4
	.short	13                              ; 0xd
	.short	0                               ; 0x0
	.short	1                               ; 0x1
	.short	6                               ; 0x6
	.short	8                               ; 0x8
	.short	2                               ; 0x2

	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  irq %d already set to %d flags %#lx\n"

	.comm	_IORESOURCE_AUTO,4,2            ; @IORESOURCE_AUTO
	.comm	_PNP_IRQ_NR,4,2                 ; @PNP_IRQ_NR
	.comm	_IORESOURCE_DISABLED,4,2        ; @IORESOURCE_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"  irq %d disabled\n"

	.comm	_IORESOURCE_IRQ_OPTIONAL,4,2    ; @IORESOURCE_IRQ_OPTIONAL
l_.str.2:                               ; @.str.2
	.asciz	"  irq %d disabled (optional)\n"

l_.str.3:                               ; @.str.3
	.asciz	"  couldn't assign irq %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_pnp_assign_irq
.subsections_via_symbols
