	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aic5_set_type
_aic5_set_type:                         ## @aic5_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	xorl	%esi, %esi
	callq	_irq_get_domain_generic_chip
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_irq_gc_lock
	movl	(%r15), %esi
	movq	_AT91_AIC5_SSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_irq_reg_writel
	movq	_AT91_AIC5_SMR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_irq_reg_readl
	movl	%eax, -36(%rbp)
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_aic_common_set_type
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	-36(%rbp), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_irq_reg_writel
LBB0_2:
	movq	%rbx, %rdi
	callq	_irq_gc_unlock
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_AIC5_SSR,4,2              ## @AT91_AIC5_SSR
	.comm	_AT91_AIC5_SMR,4,2              ## @AT91_AIC5_SMR
	.no_dead_strip	_aic5_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aic5_set_type
_aic5_set_type:                         ; @aic5_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	x20, x1
	mov	x21, x0
	ldr	x0, [x0, #8]
	mov	w1, #0
	bl	_irq_get_domain_generic_chip
	mov	x19, x0
	bl	_irq_gc_lock
	ldr	w1, [x21]
Lloh0:
	adrp	x8, _AT91_AIC5_SSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT91_AIC5_SSR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_irq_reg_writel
Lloh3:
	adrp	x22, _AT91_AIC5_SMR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AT91_AIC5_SMR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_irq_reg_readl
	str	w0, [sp, #12]
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_aic_common_set_type
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w1, [sp, #12]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_irq_reg_writel
LBB0_2:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_AIC5_SSR,4,2              ; @AT91_AIC5_SSR
	.comm	_AT91_AIC5_SMR,4,2              ; @AT91_AIC5_SMR
	.no_dead_strip	_aic5_set_type
.subsections_via_symbols
