	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enable_scrq_irq
_enable_scrq_irq:                       ## @enable_scrq_irq
	.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
	movq	8(%rdi), %r15
	addq	$4, %r15
	movl	(%rsi), %edx
	testl	%edx, %edx
	js	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	16(%rdi), %rsi
	xorl	%edi, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rax
	movq	_VNIC_RESET_MOBILITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	4(%r14), %edi
	callq	_irq_to_desc
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_irq_desc_get_chip
	movq	%r12, %rdi
	callq	*(%rax)
LBB0_5:
	movq	_H_VIOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	_H_ENABLE_VIO_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_plpar_hcall_norets
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	$1, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad hw_irq = %lx\n"

	.comm	_VNIC_RESET_MOBILITY,8,3        ## @VNIC_RESET_MOBILITY
	.comm	_H_VIOCTL,4,2                   ## @H_VIOCTL
	.comm	_H_ENABLE_VIO_INTERRUPT,4,2     ## @H_ENABLE_VIO_INTERRUPT
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't enable scrq irq 0x%lx. rc=%ld\n"

	.no_dead_strip	_enable_scrq_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enable_scrq_irq
_enable_scrq_irq:                       ; @enable_scrq_irq
	.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
	ldr	x8, [x0, #8]
	add	x19, x8, #4
	ldr	w2, [x1]
	tbnz	w2, #31, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	add	x1, x0, #16
	mov	w0, #0
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _VNIC_RESET_MOBILITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VNIC_RESET_MOBILITY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_irq_to_desc
	mov	x22, x0
	bl	_irq_desc_get_chip
	ldr	x8, [x0]
	mov	x0, x22
	blr	x8
LBB0_4:
Lloh3:
	adrp	x8, _H_VIOCTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_VIOCTL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _H_ENABLE_VIO_INTERRUPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H_ENABLE_VIO_INTERRUPT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	w4, #0
	mov	w5, #0
	bl	_plpar_hcall_norets
	mov	x21, x0
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w2, [x20]
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w21, #1
LBB0_7:
	mov	x0, x21
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad hw_irq = %lx\n"

	.comm	_VNIC_RESET_MOBILITY,8,3        ; @VNIC_RESET_MOBILITY
	.comm	_H_VIOCTL,4,2                   ; @H_VIOCTL
	.comm	_H_ENABLE_VIO_INTERRUPT,4,2     ; @H_ENABLE_VIO_INTERRUPT
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't enable scrq irq 0x%lx. rc=%ld\n"

	.no_dead_strip	_enable_scrq_irq
.subsections_via_symbols
