	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wm831x_irq_init                ## -- Begin function wm831x_irq_init
	.p2align	4, 0x90
_wm831x_irq_init:                       ## @wm831x_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	addq	$28, %rdi
	callq	_mutex_init
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_create_singlethread_workqueue
	movl	%eax, 24(%r13)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%r14d, (%r13)
	leaq	20(%r13), %rdi
	movq	_wm831x_irq_worker@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_WM831X_INTERRUPT_STATUS_1_MASK@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	$65535, (%rax,%rbx,4)           ## imm = 0xFFFF
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_wm831x_reg_write
	incq	%rbx
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movq	_WM831X_SYSTEM_INTERRUPTS_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_wm831x_reg_write
	movq	_wm831x_cpu_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_TRIGGER_LOW@GOTPCREL(%rip), %rax
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movl	%r14d, %edi
	movq	%r13, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movl	16(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %r15d
	jmp	LBB0_9
LBB0_1:
	movl	16(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_3:
	movl	16(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ESRCH@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %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	"No interrupt specified - functionality limited\n"

L_.str.1:                               ## @.str.1
	.asciz	"wm831x-irq"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate IRQ worker\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_wm831x_irq_worker,4,2          ## @wm831x_irq_worker
	.comm	_WM831X_INTERRUPT_STATUS_1_MASK,8,3 ## @WM831X_INTERRUPT_STATUS_1_MASK
	.comm	_WM831X_SYSTEM_INTERRUPTS_MASK,8,3 ## @WM831X_SYSTEM_INTERRUPTS_MASK
	.comm	_wm831x_cpu_irq,4,2             ## @wm831x_cpu_irq
	.comm	_IRQF_TRIGGER_LOW,4,2           ## @IRQF_TRIGGER_LOW
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.3:                               ## @.str.3
	.asciz	"wm831x"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wm831x_irq_init                ; -- Begin function wm831x_irq_init
	.p2align	2
_wm831x_irq_init:                       ; @wm831x_irq_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x20, x0
	add	x0, x0, #28
	bl	_mutex_init
	cbz	w19, LBB0_7
; %bb.1:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_create_singlethread_workqueue
	str	w0, [x20, #24]
	cbz	w0, LBB0_8
; %bb.2:
	str	w19, [x20]
	add	x0, x20, #20
Lloh2:
	adrp	x8, _wm831x_irq_worker@GOTPAGE
Lloh3:
	ldr	x8, [x8, _wm831x_irq_worker@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
	ldr	x0, [x20, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	mov	w22, #65535
Lloh5:
	adrp	x23, _WM831X_INTERRUPT_STATUS_1_MASK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _WM831X_INTERRUPT_STATUS_1_MASK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	str	w22, [x8, x21, lsl #2]
	ldr	x8, [x23]
	add	x1, x21, x8
	mov	x0, x20
	mov	w2, #65535
	bl	_wm831x_reg_write
	add	x21, x21, #1
	ldr	x0, [x20, #8]
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_4
LBB0_5:
Lloh7:
	adrp	x8, _WM831X_SYSTEM_INTERRUPTS_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WM831X_SYSTEM_INTERRUPTS_MASK@GOTPAGEOFF]
Lloh9:
	ldr	x1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_wm831x_reg_write
Lloh10:
	adrp	x8, _wm831x_cpu_irq@GOTPAGE
Lloh11:
	ldr	x8, [x8, _wm831x_cpu_irq@GOTPAGEOFF]
Lloh12:
	adrp	x9, _IRQF_TRIGGER_LOW@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IRQF_TRIGGER_LOW@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	ldr	w8, [x9]
Lloh16:
	adrp	x9, _IRQF_SHARED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IRQF_SHARED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh19:
	adrp	x3, l_.str.3@PAGE
Lloh20:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_request_irq
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.6:
	ldr	w0, [x20, #16]
	stp	x19, x21, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_7:
	ldr	w0, [x20, #16]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	w21, #0
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #16]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh27:
	adrp	x8, _ESRCH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No interrupt specified - functionality limited\n"

l_.str.1:                               ; @.str.1
	.asciz	"wm831x-irq"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate IRQ worker\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_wm831x_irq_worker,4,2          ; @wm831x_irq_worker
	.comm	_WM831X_INTERRUPT_STATUS_1_MASK,8,3 ; @WM831X_INTERRUPT_STATUS_1_MASK
	.comm	_WM831X_SYSTEM_INTERRUPTS_MASK,8,3 ; @WM831X_SYSTEM_INTERRUPTS_MASK
	.comm	_wm831x_cpu_irq,4,2             ; @wm831x_cpu_irq
	.comm	_IRQF_TRIGGER_LOW,4,2           ; @IRQF_TRIGGER_LOW
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.3:                               ; @.str.3
	.asciz	"wm831x"

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

.subsections_via_symbols
