	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function device_irq_init
_device_irq_init:                       ## @device_irq_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	_CHIP_PM8607@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movq	40(%rdi,%rdx,8), %r14
	movq	_INT_STATUS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_PM8607_B0_MISC1_INV_INT@GOTPCREL(%rip), %rcx
	movq	_PM8607_B0_MISC1_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %edx
	orl	%eax, %edx
	movq	_PM8607_B0_MISC1_INT_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	8(%r14), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	$0, 8(%r13)
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.2:
	movl	$1, 8(%r13)
	movl	%eax, %ecx
LBB0_3:
	movq	_PM8607_B0_MISC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pm860x_set_bits
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_INT_STATUS_NUM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_PM8607_INT_MASK_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_pm860x_bulk_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	cmpl	$0, 8(%r13)
	je	LBB0_9
## %bb.6:
	movq	_INT_STATUS_NUM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	$255, %esi
	callq	_memset
	movq	_PM8607_INT_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_pm860x_bulk_write
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r12d
LBB0_19:
	addq	$16, %r13
LBB0_20:
	movl	$0, (%r13)
	movl	%r12d, %ebx
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_PM8607_INT_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INT_STATUS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_pm860x_bulk_read
LBB0_10:
	movl	%eax, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_19
## %bb.11:
	leaq	32(%r13), %rdi
	callq	_mutex_init
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.12:
	movl	(%rbx), %eax
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	sbbl	%ebx, %ebx
	orl	%eax, %ebx
	jmp	LBB0_14
LBB0_13:
	movl	$-1, %ebx
LBB0_14:
	movq	_pm860x_irqs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movl	%eax, %r15d
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_irq_alloc_descs
	movl	%eax, 12(%r13)
	testl	%eax, %eax
	js	LBB0_18
## %bb.15:
	movq	_pm860x_irq_domain_ops@GOTPCREL(%rip), %r8
	xorl	%ebx, %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r9
	callq	_irq_domain_add_legacy
	movl	(%r14), %edi
	movl	%edi, 16(%r13)
	testl	%edi, %edi
	je	LBB0_19
## %bb.16:
	movq	_pm860x_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	orq	(%rax), %rcx
	leaq	L_.str.1(%rip), %r8
	xorl	%esi, %esi
	movq	%r13, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_21
## %bb.17:
	movq	24(%r13), %rdi
	addq	$16, %r13
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_18:
	addq	$8, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_19
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_PM8607,8,3                ## @CHIP_PM8607
	.comm	_INT_STATUS_NUM,4,2             ## @INT_STATUS_NUM
	.comm	_IRQF_TRIGGER_FALLING,8,3       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,8,3               ## @IRQF_ONESHOT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PM8607_B0_MISC1_INV_INT,4,2    ## @PM8607_B0_MISC1_INV_INT
	.comm	_PM8607_B0_MISC1_INT_CLEAR,4,2  ## @PM8607_B0_MISC1_INT_CLEAR
	.comm	_PM8607_B0_MISC1_INT_MASK,4,2   ## @PM8607_B0_MISC1_INT_MASK
	.comm	_PM8607_B0_MISC1,4,2            ## @PM8607_B0_MISC1
	.comm	_PM8607_INT_MASK_1,4,2          ## @PM8607_INT_MASK_1
	.comm	_PM8607_INT_STATUS1,4,2         ## @PM8607_INT_STATUS1
	.comm	_pm860x_irqs,4,2                ## @pm860x_irqs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate interrupts, ret:%d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_pm860x_irq_domain_ops,4,2      ## @pm860x_irq_domain_ops
	.comm	_pm860x_irq,4,2                 ## @pm860x_irq
L_.str.1:                               ## @.str.1
	.asciz	"88pm860x"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to request IRQ: %d\n"

	.no_dead_strip	_device_irq_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function device_irq_init
_device_irq_init:                       ; @device_irq_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CHIP_PM8607@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_PM8607@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	w10, #40
	mov	w11, #48
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	x20, [x0, x8]
Lloh6:
	adrp	x26, _INT_STATUS_NUM@GOTPAGE
Lloh7:
	ldr	x26, [x26, _INT_STATUS_NUM@GOTPAGEOFF]
	ldr	w8, [x26]
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
Lloh10:
	adrp	x8, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh12:
	ldr	x27, [x8]
Lloh13:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh15:
	ldr	x28, [x8]
	mov	x22, x20
	ldr	x21, [x22, #8]!
Lloh16:
	adrp	x8, _PM8607_B0_MISC1_INV_INT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PM8607_B0_MISC1_INV_INT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _PM8607_B0_MISC1_INT_CLEAR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PM8607_B0_MISC1_INT_CLEAR@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x9]
	orr	w8, w3, w8
Lloh22:
	adrp	x9, _PM8607_B0_MISC1_INT_MASK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PM8607_B0_MISC1_INT_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	str	wzr, [x0, #8]
	cbz	x1, LBB0_3
; %bb.1:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_3:
	mov	w3, #0
LBB0_4:
Lloh25:
	adrp	x8, _PM8607_B0_MISC1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PM8607_B0_MISC1@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pm860x_set_bits
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	w2, [x26]
	mov	x0, x25
	mov	w1, #0
	bl	_memset
Lloh28:
	adrp	x8, _PM8607_INT_MASK_1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PM8607_INT_MASK_1@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x3, x25
	bl	_pm860x_bulk_write
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_13
; %bb.7:
	ldr	w2, [x26]
	mov	x0, x25
	mov	w1, #255
	bl	_memset
Lloh31:
	adrp	x8, _PM8607_INT_STATUS1@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PM8607_INT_STATUS1@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x3, x25
	bl	_pm860x_bulk_write
	mov	x24, x0
	tbz	w0, #31, LBB0_14
	b	LBB0_9
LBB0_8:
	mov	x24, x0
LBB0_9:
	add	x20, x19, #16
LBB0_10:
	str	wzr, [x20]
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.12:
	mov	x0, x24
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh37:
	adrp	x8, _PM8607_INT_STATUS1@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PM8607_INT_STATUS1@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x3, x25
	bl	_pm860x_bulk_read
	mov	x24, x0
	tbnz	w0, #31, LBB0_9
LBB0_14:
	add	x0, x19, #32
	bl	_mutex_init
	cbz	x23, LBB0_16
; %bb.15:
	ldr	w8, [x23]
	cmp	w8, #0
	csinv	w25, w8, wzr, ne
	b	LBB0_17
LBB0_16:
	mov	w25, #-1
LBB0_17:
Lloh40:
	adrp	x8, _pm860x_irqs@GOTPAGE
Lloh41:
	ldr	x8, [x8, _pm860x_irqs@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x23, x0
	mov	x0, x25
	mov	w1, #0
	mov	x2, x23
	mov	w3, #0
	bl	_irq_alloc_descs
	mov	x2, x0
	str	w0, [x19, #12]
	tbnz	w0, #31, LBB0_21
; %bb.18:
Lloh43:
	adrp	x4, _pm860x_irq_domain_ops@GOTPAGE
Lloh44:
	ldr	x4, [x4, _pm860x_irq_domain_ops@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	mov	w3, #0
	mov	x5, x19
	bl	_irq_domain_add_legacy
	ldr	w0, [x20]
	mov	x20, x19
	str	w0, [x20, #16]!
	cbz	w0, LBB0_9
; %bb.19:
	orr	x8, x28, x27
Lloh45:
	adrp	x9, _pm860x_irq@GOTPAGE
Lloh46:
	ldr	x9, [x9, _pm860x_irq@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x9]
Lloh48:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh49:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	orr	x3, x8, x9
Lloh51:
	adrp	x4, l_.str.1@PAGE
Lloh52:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x1, #0
	mov	x5, x19
	bl	_request_threaded_irq
	cbz	w0, LBB0_22
; %bb.20:
	mov	x2, x0
	ldr	x0, [x19, #24]
Lloh53:
	adrp	x1, l_.str.2@PAGE
Lloh54:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	w24, #0
	b	LBB0_10
LBB0_21:
Lloh55:
	adrp	x1, l_.str@PAGE
Lloh56:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
Lloh57:
	adrp	x8, _EBUSY@GOTPAGE
Lloh58:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_22:
	mov	w24, #0
	b	LBB0_11
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_PM8607,8,3                ; @CHIP_PM8607
	.comm	_INT_STATUS_NUM,4,2             ; @INT_STATUS_NUM
	.comm	_IRQF_TRIGGER_FALLING,8,3       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,8,3               ; @IRQF_ONESHOT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PM8607_B0_MISC1_INV_INT,4,2    ; @PM8607_B0_MISC1_INV_INT
	.comm	_PM8607_B0_MISC1_INT_CLEAR,4,2  ; @PM8607_B0_MISC1_INT_CLEAR
	.comm	_PM8607_B0_MISC1_INT_MASK,4,2   ; @PM8607_B0_MISC1_INT_MASK
	.comm	_PM8607_B0_MISC1,4,2            ; @PM8607_B0_MISC1
	.comm	_PM8607_INT_MASK_1,4,2          ; @PM8607_INT_MASK_1
	.comm	_PM8607_INT_STATUS1,4,2         ; @PM8607_INT_STATUS1
	.comm	_pm860x_irqs,4,2                ; @pm860x_irqs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate interrupts, ret:%d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_pm860x_irq_domain_ops,4,2      ; @pm860x_irq_domain_ops
	.comm	_pm860x_irq,4,2                 ; @pm860x_irq
l_.str.1:                               ; @.str.1
	.asciz	"88pm860x"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to request IRQ: %d\n"

	.no_dead_strip	_device_irq_init
.subsections_via_symbols
