	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_sih_set_type
_twl4030_sih_set_type:                  ## @twl4030_sih_set_type
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %ebx
	callq	_get_irq_chip_data
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	_irq_to_desc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rax
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	testl	%r15d, %ecx
	jne	LBB0_3
## %bb.4:
	movq	_sih_agent_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %eax
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	andl	%eax, %edx
	cmpl	%r15d, %edx
	je	LBB0_6
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	orl	%r15d, %eax
	movl	%eax, (%r12)
	subl	(%r14), %ebx
	movl	%ebx, %edi
	callq	_BIT
	orl	%eax, 8(%r14)
	movq	_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r14
	movq	%r14, %rsi
	callq	_queue_work
LBB0_6:
	movq	_sih_agent_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"twl4030: Invalid IRQ: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_sih_agent_lock,4,2             ## @sih_agent_lock
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.comm	_wq,4,2                         ## @wq
	.no_dead_strip	_twl4030_sih_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_sih_set_type
_twl4030_sih_set_type:                  ; @twl4030_sih_set_type
	.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	x21, x1
	mov	x20, x0
	bl	_get_irq_chip_data
	mov	x19, x0
	mov	x0, x20
	bl	_irq_to_desc
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w21, w8
	b.ne	LBB0_6
; %bb.2:
	mov	x22, x0
Lloh6:
	adrp	x0, _sih_agent_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _sih_agent_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
Lloh8:
	adrp	x9, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w10, w9, w8
	cmp	w10, w21
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	orr	w8, w8, w21
	str	w8, [x22]
	ldr	w8, [x19]
	sub	w0, w20, w8
	bl	_BIT
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
Lloh11:
	adrp	x8, _wq@GOTPAGE
Lloh12:
	ldr	x8, [x8, _wq@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_queue_work
LBB0_4:
Lloh14:
	adrp	x0, _sih_agent_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _sih_agent_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
LBB0_6:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"twl4030: Invalid IRQ: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_sih_agent_lock,4,2             ; @sih_agent_lock
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.comm	_wq,4,2                         ; @wq
	.no_dead_strip	_twl4030_sih_set_type
.subsections_via_symbols
