	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftr_set_notify
_ftr_set_notify:                        ## @ftr_set_notify
	.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	%rdi, %rbx
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	cmpl	$128, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_5
## %bb.2:
	cmpl	$130, %esi
	jne	LBB0_13
## %bb.3:
	addq	$48, %rbx
	leaq	L_.str(%rip), %rsi
	movq	_headphone_detect_irq@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	_lineout_detect_irq@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	addq	$24, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	_linein_detect_irq@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r14d
	movq	_NO_IRQ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_8
## %bb.7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_8:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rbx), %r15
	xorl	%r13d, %r13d
	movq	%r15, %rax
	orq	%rcx, %rax
	je	LBB0_23
## %bb.9:
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.10:
	testq	%r15, %r15
	je	LBB0_15
## %bb.11:
	cmpq	%rcx, %r15
	jne	LBB0_22
## %bb.12:
	xorl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 8(%rbx)
	cmovel	%eax, %r12d
LBB0_22:
	movl	%r12d, %r13d
	jmp	LBB0_23
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_14:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_24
LBB0_15:
	testq	%rcx, %rcx
	jne	LBB0_18
## %bb.16:
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_18:
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.19:
	testq	%r15, %r15
	jne	LBB0_21
## %bb.20:
	movq	_ftr_handle_notify_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_request_irq
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_23
LBB0_21:
	movq	%rcx, (%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	xorl	%r13d, %r13d
LBB0_23:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_24:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"headphone-detect"

	.comm	_headphone_detect_irq,4,2       ## @headphone_detect_irq
L_.str.1:                               ## @.str.1
	.asciz	"linein-detect"

	.comm	_linein_detect_irq,4,2          ## @linein_detect_irq
L_.str.2:                               ## @.str.2
	.asciz	"lineout-detect"

	.comm	_lineout_detect_irq,4,2         ## @lineout_detect_irq
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NO_IRQ,4,2                     ## @NO_IRQ
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ftr_handle_notify_irq,4,2      ## @ftr_handle_notify_irq
	.no_dead_strip	_ftr_set_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftr_set_notify
_ftr_set_notify:                        ; @ftr_set_notify
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w1, #130
	b.ne	LBB0_13
; %bb.3:
	add	x20, x20, #48
Lloh3:
	adrp	x23, l_.str@PAGE
Lloh4:
	add	x23, x23, l_.str@PAGEOFF
Lloh5:
	adrp	x8, _headphone_detect_irq@GOTPAGE
Lloh6:
	ldr	x8, [x8, _headphone_detect_irq@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x23, l_.str.2@PAGE
Lloh8:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh9:
	adrp	x8, _lineout_detect_irq@GOTPAGE
Lloh10:
	ldr	x8, [x8, _lineout_detect_irq@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	add	x20, x20, #24
Lloh11:
	adrp	x23, l_.str.1@PAGE
Lloh12:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh13:
	adrp	x8, _linein_detect_irq@GOTPAGE
Lloh14:
	ldr	x8, [x8, _linein_detect_irq@GOTPAGEOFF]
LBB0_6:
	ldr	w24, [x8]
Lloh15:
	adrp	x8, _NO_IRQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NO_IRQ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_8
; %bb.7:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
	add	x22, x20, #16
	mov	x0, x22
	bl	_mutex_lock
	ldr	x26, [x20]
	orr	x8, x26, x21
	cbz	x8, LBB0_15
; %bb.9:
	cbz	x21, LBB0_16
; %bb.10:
	cbz	x26, LBB0_16
; %bb.11:
	neg	w23, w25
	cmp	x26, x21
	b.ne	LBB0_23
; %bb.12:
	ldr	x8, [x20, #8]
	cmp	x8, x19
	csel	w23, wzr, w23, eq
	b	LBB0_23
LBB0_13:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_24
LBB0_15:
	mov	w23, #0
	b	LBB0_23
LBB0_16:
	cbnz	x21, LBB0_19
; %bb.17:
	cbz	x26, LBB0_19
; %bb.18:
	mov	x0, x24
	mov	x1, x20
	bl	_free_irq
LBB0_19:
	cbz	x21, LBB0_22
; %bb.20:
	cbnz	x26, LBB0_22
; %bb.21:
Lloh22:
	adrp	x8, _ftr_handle_notify_irq@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ftr_handle_notify_irq@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x24
	mov	w2, #0
	mov	x3, x23
	mov	x4, x20
	bl	_request_irq
	mov	x23, x0
	cbnz	w0, LBB0_23
LBB0_22:
	mov	w23, #0
	stp	x21, x19, [x20]
LBB0_23:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_24:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"headphone-detect"

	.comm	_headphone_detect_irq,4,2       ; @headphone_detect_irq
l_.str.1:                               ; @.str.1
	.asciz	"linein-detect"

	.comm	_linein_detect_irq,4,2          ; @linein_detect_irq
l_.str.2:                               ; @.str.2
	.asciz	"lineout-detect"

	.comm	_lineout_detect_irq,4,2         ; @lineout_detect_irq
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NO_IRQ,4,2                     ; @NO_IRQ
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ftr_handle_notify_irq,4,2      ; @ftr_handle_notify_irq
	.no_dead_strip	_ftr_set_notify
.subsections_via_symbols
