	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irqc_irq_set_type
_irqc_irq_set_type:                     ## @irqc_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
	movq	%rdi, %rbx
	callq	_irq_data_to_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_irqd_to_hwirq
	movl	%eax, %r15d
	movq	_irqc_sense@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r12d
	movzbl	(%rax,%r12), %r12d
	movslq	%r15d, %rdi
	shlq	$2, %rdi
	addq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_irqc_dbg
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.2:
	movq	(%r14), %rbx
	movl	%r15d, %edi
	callq	_IRQC_CONFIG
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_ioread32
	andl	$-64, %eax
	orl	%eax, %r12d
	movq	(%r14), %rbx
	movl	%r15d, %edi
	callq	_IRQC_CONFIG
	addq	%rax, %rbx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_iowrite32
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irqc_sense,8,3                 ## @irqc_sense
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sense"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_irqc_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 irqc_irq_set_type
_irqc_irq_set_type:                     ; @irqc_irq_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	_irq_data_to_priv
	mov	x19, x0
	mov	x0, x20
	bl	_irqd_to_hwirq
	mov	x20, x0
Lloh0:
	adrp	x8, _irqc_sense@GOTPAGE
Lloh1:
	ldr	x8, [x8, _irqc_sense@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	w10, w21
	and	x9, x9, x10
	ldrb	w21, [x8, x9]
	ldr	x8, [x19, #8]
	add	x0, x8, w0, sxtw #2
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_irqc_dbg
	cbz	w21, LBB0_2
; %bb.1:
	ldr	x22, [x19]
	mov	x0, x20
	bl	_IRQC_CONFIG
	add	x0, x0, x22
	bl	_ioread32
	and	w8, w0, #0xffffffc0
	orr	w21, w8, w21
	ldr	x19, [x19]
	mov	x0, x20
	bl	_IRQC_CONFIG
	add	x1, x0, x19
	mov	x0, x21
	bl	_iowrite32
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_irqc_sense,8,3                 ; @irqc_sense
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sense"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_irqc_irq_set_type
.subsections_via_symbols
