	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_unmask_irq_arr
_goya_unmask_irq_arr:                   ## @goya_unmask_irq_arr
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	31(%rdx), %r15
	andq	$-8, %r15
	movq	_USHRT_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jbe	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	shrq	$2, %r13
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r12)
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.6:
	movl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r12,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_7
LBB0_8:
	movq	_ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r12)
	movq	_HL_DEVICE_TIMEOUT_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r8
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_goya_send_cpu_message
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USHRT_MAX,8,3                  ## @USHRT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many elements in IRQ array\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY,4,2 ## @ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY
	.comm	_ARMCP_PKT_CTL_OPCODE_SHIFT,4,2 ## @ARMCP_PKT_CTL_OPCODE_SHIFT
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ## @HL_DEVICE_TIMEOUT_USEC
L_.str.1:                               ## @.str.1
	.asciz	"failed to unmask IRQ array\n"

	.no_dead_strip	_goya_unmask_irq_arr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_unmask_irq_arr
_goya_unmask_irq_arr:                   ; @goya_unmask_irq_arr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x8, x2, #31
	and	x21, x8, #0xfffffffffffffff8
Lloh0:
	adrp	x8, _USHRT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USHRT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ls	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x23, x2
	mov	x22, x1
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	lsr	x24, x23, #2
	mov	x0, x24
	bl	_cpu_to_le32
	str	x0, [x20, #16]
	cmp	w24, #1
	b.lt	LBB0_6
; %bb.4:
	ubfx	x23, x23, #2, #32
	add	x24, x20, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22], #4
	bl	_cpu_to_le32
	str	x0, [x24], #8
	subs	x23, x23, #1
	b.ne	LBB0_5
LBB0_6:
Lloh10:
	adrp	x8, _ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le32
	str	x0, [x20]
Lloh16:
	adrp	x8, _HL_DEVICE_TIMEOUT_USEC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HL_DEVICE_TIMEOUT_USEC@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_goya_send_cpu_message
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_8:
	mov	x0, x20
	bl	_kfree
	b	LBB0_11
LBB0_9:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_USHRT_MAX,8,3                  ; @USHRT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many elements in IRQ array\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY,4,2 ; @ARMCP_PACKET_UNMASK_RAZWI_IRQ_ARRAY
	.comm	_ARMCP_PKT_CTL_OPCODE_SHIFT,4,2 ; @ARMCP_PKT_CTL_OPCODE_SHIFT
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ; @HL_DEVICE_TIMEOUT_USEC
l_.str.1:                               ; @.str.1
	.asciz	"failed to unmask IRQ array\n"

	.no_dead_strip	_goya_unmask_irq_arr
.subsections_via_symbols
