	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tps6586x_irq_init
_tps6586x_irq_init:                     ## @tps6586x_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_tps6586x_irqs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movl	%eax, %r15d
	movl	%r14d, (%rbx)
	leaq	28(%rbx), %rdi
	callq	_mutex_init
	movq	8(%rbx), %rax
	movl	$255, (%rax)
	movq	16(%rbx), %rdi
	movq	_TPS6586X_INT_MASK1@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movl	$255, %edx
	callq	_tps6586x_write
	movq	8(%rbx), %rax
	movl	$255, 4(%rax)
	movq	16(%rbx), %rdi
	movq	(%r13), %rsi
	incq	%rsi
	movl	$255, %edx
	callq	_tps6586x_write
	movq	8(%rbx), %rax
	movl	$255, 8(%rax)
	movq	16(%rbx), %rdi
	movq	(%r13), %rsi
	addq	$2, %rsi
	movl	$255, %edx
	callq	_tps6586x_write
	movq	8(%rbx), %rax
	movl	$255, 12(%rax)
	movq	16(%rbx), %rdi
	movq	(%r13), %rsi
	addq	$3, %rsi
	movl	$255, %edx
	callq	_tps6586x_write
	movq	8(%rbx), %rax
	movl	$255, 16(%rax)
	movq	16(%rbx), %rdi
	movq	(%r13), %rsi
	addq	$4, %rsi
	movl	$255, %edx
	callq	_tps6586x_write
	movq	16(%rbx), %rdi
	movq	_TPS6586X_INT_ACK1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rcx
	movl	$16, %edx
	callq	_tps6586x_reads
	testl	%r12d, %r12d
	jle	LBB0_1
## %bb.4:
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	movl	$-1, %ecx
	callq	_irq_alloc_descs
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.5:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_1:
	xorl	%r12d, %r12d
LBB0_2:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movq	_tps6586x_domain_ops@GOTPCREL(%rip), %rcx
	movl	%r15d, %esi
	movl	%r12d, %edx
	movq	%rbx, %r8
	callq	_irq_domain_add_simple
	movl	%eax, 24(%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	movq	_tps6586x_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %r8
	movl	%r14d, %edi
	xorl	%esi, %esi
	movq	%rbx, %r9
	callq	_request_threaded_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	16(%rbx), %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_3:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_tps6586x_irqs,4,2              ## @tps6586x_irqs
	.comm	_TPS6586X_INT_MASK1,8,3         ## @TPS6586X_INT_MASK1
	.comm	_TPS6586X_INT_ACK1,4,2          ## @TPS6586X_INT_ACK1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to alloc IRQs: %d\n"

	.comm	_tps6586x_domain_ops,4,2        ## @tps6586x_domain_ops
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create IRQ domain\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_tps6586x_irq,4,2               ## @tps6586x_irq
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.2:                               ## @.str.2
	.asciz	"tps6586x"

	.no_dead_strip	_tps6586x_irq_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tps6586x_irq_init
_tps6586x_irq_init:                     ; @tps6586x_irq_init
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _tps6586x_irqs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tps6586x_irqs@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x21, x0
	str	w20, [x19]
	add	x0, x19, #28
	bl	_mutex_init
	ldr	x8, [x19, #8]
	mov	w23, #255
	str	w23, [x8]
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x24, _TPS6586X_INT_MASK1@GOTPAGE
Lloh7:
	ldr	x24, [x24, _TPS6586X_INT_MASK1@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	w2, #255
	bl	_tps6586x_write
	ldr	x8, [x19, #8]
	str	w23, [x8, #4]
	ldr	x0, [x19, #16]
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	w2, #255
	bl	_tps6586x_write
	ldr	x8, [x19, #8]
	str	w23, [x8, #8]
	ldr	x0, [x19, #16]
	ldr	x8, [x24]
	add	x1, x8, #2
	mov	w2, #255
	bl	_tps6586x_write
	ldr	x8, [x19, #8]
	str	w23, [x8, #12]
	ldr	x0, [x19, #16]
	ldr	x8, [x24]
	add	x1, x8, #3
	mov	w2, #255
	bl	_tps6586x_write
	ldr	x8, [x19, #8]
	str	w23, [x8, #16]
	ldr	x0, [x19, #16]
	ldr	x8, [x24]
	add	x1, x8, #4
	mov	w2, #255
	bl	_tps6586x_write
	ldr	x0, [x19, #16]
Lloh8:
	adrp	x8, _TPS6586X_INT_ACK1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TPS6586X_INT_ACK1@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	w2, #16
	bl	_tps6586x_reads
	cmp	w22, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x22
	mov	w1, #0
	mov	x2, x21
	mov	w3, #-1
	bl	_irq_alloc_descs
	mov	x22, x0
	tbz	w0, #31, LBB0_4
; %bb.2:
	ldr	x0, [x19, #16]
	str	x22, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_3:
	mov	w22, #0
LBB0_4:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh13:
	adrp	x3, _tps6586x_domain_ops@GOTPAGE
Lloh14:
	ldr	x3, [x3, _tps6586x_domain_ops@GOTPAGEOFF]
	mov	x1, x21
	mov	x2, x22
	mov	x4, x19
	bl	_irq_domain_add_simple
	str	w0, [x19, #24]
	cbz	w0, LBB0_7
; %bb.5:
Lloh15:
	adrp	x8, _tps6586x_irq@GOTPAGE
Lloh16:
	ldr	x8, [x8, _tps6586x_irq@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
Lloh21:
	adrp	x4, l_.str.2@PAGE
Lloh22:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, #0
	mov	x5, x19
	bl	_request_threaded_irq
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	x0, [x19, #16]
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_8
LBB0_7:
	ldr	x0, [x19, #16]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	ldr	x8, [sp, #24]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x22
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_tps6586x_irqs,4,2              ; @tps6586x_irqs
	.comm	_TPS6586X_INT_MASK1,8,3         ; @TPS6586X_INT_MASK1
	.comm	_TPS6586X_INT_ACK1,4,2          ; @TPS6586X_INT_ACK1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to alloc IRQs: %d\n"

	.comm	_tps6586x_domain_ops,4,2        ; @tps6586x_domain_ops
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create IRQ domain\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_tps6586x_irq,4,2               ; @tps6586x_irq
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.2:                               ; @.str.2
	.asciz	"tps6586x"

	.no_dead_strip	_tps6586x_irq_init
.subsections_via_symbols
