	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocelot_irq_set_type
_ocelot_irq_set_type:                   ## @ocelot_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%eax, %edx
	testl	%ebx, %edx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	testl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_handle_fasteoi_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ocelot_eoi_irqchip@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_irq_set_chip_handler_name_locked
	movl	(%r15), %eax
LBB0_4:
	testl	%ebx, %eax
	je	LBB0_5
## %bb.6:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ocelot_irqchip@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_irq_set_chip_handler_name_locked
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ocelot_eoi_irqchip,4,2         ## @ocelot_eoi_irqchip
	.comm	_handle_fasteoi_irq,4,2         ## @handle_fasteoi_irq
	.comm	_ocelot_irqchip,4,2             ## @ocelot_irqchip
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.no_dead_strip	_ocelot_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 ocelot_irq_set_type
_ocelot_irq_set_type:                   ; @ocelot_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
Lloh0:
	adrp	x8, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w20, w8, w1
Lloh3:
	adrp	x21, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w10, w9, w8
	tst	w10, w20
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x0
	tst	w9, w20
	b.eq	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _handle_fasteoi_irq@GOTPAGE
Lloh9:
	ldr	x8, [x8, _handle_fasteoi_irq@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x1, _ocelot_eoi_irqchip@GOTPAGE
Lloh12:
	ldr	x1, [x1, _ocelot_eoi_irqchip@GOTPAGEOFF]
	mov	x0, x19
	mov	x3, #0
	bl	_irq_set_chip_handler_name_locked
	ldr	w8, [x21]
LBB0_3:
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh14:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x1, _ocelot_irqchip@GOTPAGE
Lloh17:
	ldr	x1, [x1, _ocelot_irqchip@GOTPAGEOFF]
	mov	x0, x19
	mov	x3, #0
	bl	_irq_set_chip_handler_name_locked
LBB0_5:
	mov	w0, #0
	b	LBB0_7
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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ocelot_eoi_irqchip,4,2         ; @ocelot_eoi_irqchip
	.comm	_handle_fasteoi_irq,4,2         ; @handle_fasteoi_irq
	.comm	_ocelot_irqchip,4,2             ; @ocelot_irqchip
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.no_dead_strip	_ocelot_irq_set_type
.subsections_via_symbols
