	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmfx_irq_init
_stmfx_irq_init:                        ## @stmfx_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
	movq	%rdi, %r14
	callq	_i2c_get_clientdata
	movq	%rax, %r13
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_STMFX_REG_IRQ_SRC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_stmfx_irq_ops@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	movq	%r13, %r8
	callq	_irq_domain_add_simple
	movl	%eax, 12(%r13)
	movq	(%r13), %rdi
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rdi), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_of_property_read_bool
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_STMFX_REG_IRQ_OUT_PIN_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_4:
	movl	(%r14), %edi
	callq	_irq_get_trigger_type
	movl	%eax, %r12d
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
LBB0_6:
	movq	_STMFX_REG_IRQ_OUT_PIN_POL@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_7:
	movl	8(%r13), %edi
	movq	_STMFX_REG_IRQ_OUT_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	(%r13), %rdi
	movl	(%r14), %esi
	movq	_stmfx_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	orl	%r12d, %r8d
	movq	%r13, (%rsp)
	leaq	L_.str.2(%rip), %r9
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_stmfx_irq_exit
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STMFX_REG_IRQ_SRC_MAX,4,2      ## @STMFX_REG_IRQ_SRC_MAX
	.comm	_stmfx_irq_ops,4,2              ## @stmfx_irq_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create IRQ domain\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"drive-open-drain"

	.comm	_STMFX_REG_IRQ_OUT_PIN_TYPE,4,2 ## @STMFX_REG_IRQ_OUT_PIN_TYPE
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_STMFX_REG_IRQ_OUT_PIN_POL,4,2  ## @STMFX_REG_IRQ_OUT_PIN_POL
	.comm	_STMFX_REG_IRQ_OUT_PIN,4,2      ## @STMFX_REG_IRQ_OUT_PIN
	.comm	_stmfx_irq_handler,4,2          ## @stmfx_irq_handler
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.2:                               ## @.str.2
	.asciz	"stmfx"

	.no_dead_strip	_stmfx_irq_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmfx_irq_init
_stmfx_irq_init:                        ; @stmfx_irq_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_i2c_get_clientdata
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _STMFX_REG_IRQ_SRC_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STMFX_REG_IRQ_SRC_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, _stmfx_irq_ops@GOTPAGE
Lloh4:
	ldr	x3, [x3, _stmfx_irq_ops@GOTPAGEOFF]
	mov	w2, #0
	mov	x4, x20
	bl	_irq_domain_add_simple
	mov	x8, x0
	str	w0, [x20, #12]
	ldr	x0, [x20]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w0, [x0]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_of_property_read_bool
Lloh7:
	adrp	x8, _STMFX_REG_IRQ_OUT_PIN_TYPE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _STMFX_REG_IRQ_OUT_PIN_TYPE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w22, w8, wzr, eq
	ldr	w0, [x19]
	bl	_irq_get_trigger_type
	mov	x21, x0
Lloh10:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:
Lloh13:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
LBB0_3:
Lloh16:
	adrp	x8, _STMFX_REG_IRQ_OUT_PIN_POL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STMFX_REG_IRQ_OUT_PIN_POL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_4:
	ldr	w0, [x20, #8]
Lloh19:
	adrp	x8, _STMFX_REG_IRQ_OUT_PIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _STMFX_REG_IRQ_OUT_PIN@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x0, [x20]
Lloh22:
	adrp	x8, _stmfx_irq_handler@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stmfx_irq_handler@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w4, w8, w21
Lloh28:
	adrp	x5, l_.str.2@PAGE
Lloh29:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	mov	x22, x0
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_stmfx_irq_exit
	b	LBB0_8
LBB0_7:
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_STMFX_REG_IRQ_SRC_MAX,4,2      ; @STMFX_REG_IRQ_SRC_MAX
	.comm	_stmfx_irq_ops,4,2              ; @stmfx_irq_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create IRQ domain\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"drive-open-drain"

	.comm	_STMFX_REG_IRQ_OUT_PIN_TYPE,4,2 ; @STMFX_REG_IRQ_OUT_PIN_TYPE
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_STMFX_REG_IRQ_OUT_PIN_POL,4,2  ; @STMFX_REG_IRQ_OUT_PIN_POL
	.comm	_STMFX_REG_IRQ_OUT_PIN,4,2      ; @STMFX_REG_IRQ_OUT_PIN
	.comm	_stmfx_irq_handler,4,2          ; @stmfx_irq_handler
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.2:                               ; @.str.2
	.asciz	"stmfx"

	.no_dead_strip	_stmfx_irq_init
.subsections_via_symbols
