	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function al_fic_irq_set_type
_al_fic_irq_set_type:                   ## @al_fic_irq_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, %r12d
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %r15
	movq	(%rax), %r14
	movq	%rax, %rdi
	callq	_irq_gc_lock
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%r12d, %ecx
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	je	LBB0_3
## %bb.1:
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_10
LBB0_3:
	testl	%r12d, %eax
	jne	LBB0_4
## %bb.5:
	movq	_AL_FIC_CONFIGURED_RISING_EDGE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_AL_FIC_CONFIGURED_LEVEL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movq	(%r14), %rdx
	movq	_AL_FIC_UNCONFIGURED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_al_fic_set_trigger
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %eax
	xorl	%ebx, %ebx
	cmpq	%rax, %rdx
	je	LBB0_11
## %bb.9:
	movl	8(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_irq_gc_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fic doesn't support flow type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AL_FIC_CONFIGURED_LEVEL,4,2    ## @AL_FIC_CONFIGURED_LEVEL
	.comm	_AL_FIC_CONFIGURED_RISING_EDGE,4,2 ## @AL_FIC_CONFIGURED_RISING_EDGE
	.comm	_AL_FIC_UNCONFIGURED,8,3        ## @AL_FIC_UNCONFIGURED
L_.str.1:                               ## @.str.1
	.asciz	"fic %s state already configured to %d\n"

	.no_dead_strip	_al_fic_irq_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function al_fic_irq_set_type
_al_fic_irq_set_type:                   ; @al_fic_irq_set_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_irq_data_get_irq_chip_data
	mov	x19, x0
	ldr	x20, [x0]
	bl	_irq_gc_lock
Lloh0:
	adrp	x8, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w9, w8, w21
Lloh3:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w8
	ccmp	w9, w10, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh9:
	adrp	x9, _AL_FIC_CONFIGURED_LEVEL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AL_FIC_CONFIGURED_LEVEL@GOTPAGEOFF]
Lloh11:
	adrp	x10, _AL_FIC_CONFIGURED_RISING_EDGE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _AL_FIC_CONFIGURED_RISING_EDGE@GOTPAGEOFF]
	tst	w8, w21
	csel	x8, x10, x9, eq
	ldr	w2, [x8]
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _AL_FIC_UNCONFIGURED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AL_FIC_UNCONFIGURED@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_al_fic_set_trigger
	mov	w20, #0
	b	LBB0_8
LBB0_3:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	b	LBB0_7
LBB0_4:
	cmp	x8, w2, uxtw
	b.ne	LBB0_6
; %bb.5:
	mov	w20, #0
	b	LBB0_8
LBB0_6:
	ldr	w1, [x20, #8]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_pr_debug
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x19
	bl	_irq_gc_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fic doesn't support flow type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AL_FIC_CONFIGURED_LEVEL,4,2    ; @AL_FIC_CONFIGURED_LEVEL
	.comm	_AL_FIC_CONFIGURED_RISING_EDGE,4,2 ; @AL_FIC_CONFIGURED_RISING_EDGE
	.comm	_AL_FIC_UNCONFIGURED,8,3        ; @AL_FIC_UNCONFIGURED
l_.str.1:                               ; @.str.1
	.asciz	"fic %s state already configured to %d\n"

	.no_dead_strip	_al_fic_irq_set_type
.subsections_via_symbols
