	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvmc_init_crq_queue
_ibmvmc_init_crq_queue:                 ## @ibmvmc_init_crq_queue
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_to_vio_dev
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%edx, %ecx
	sarl	$2, %ecx
	movl	%ecx, 8(%r15)
	movl	(%r15), %edi
	andl	$-4, %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%rax, %rsi
	callq	_dma_map_single
	movl	%eax, 24(%r15)
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_13
## %bb.2:
	movq	_H_REG_CRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	movl	24(%r15), %edx
	movl	(%rbx), %ecx
	callq	_plpar_hcall_norets
	movl	%eax, %ebx
	movq	_H_RESOURCE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_ibmvmc_reset_crq_queue
LBB0_4:
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$2, %eax
	jne	LBB0_16
## %bb.6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	xorl	%ebx, %ebx
LBB0_7:
	movq	$0, 32(%r15)
	leaq	28(%r15), %rdi
	callq	_spin_lock_init
	leaq	4(%r15), %r12
	movq	_ibmvmc_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_tasklet_init
	movl	(%r14), %edi
	movq	_ibmvmc_handle_event@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	(%r15), %edi
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_16:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_12
LBB0_9:
	movq	%r14, %rdi
	callq	_vio_enable_interrupts
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
LBB0_11:
	callq	_dev_err
	movq	%r12, %rdi
	callq	_tasklet_kill
	movl	4(%r14), %edi
	callq	_h_free_crq
LBB0_12:
	movl	24(%r15), %esi
	movl	(%r15), %edi
	movl	8(%r15), %edx
	shll	$2, %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_single
LBB0_13:
	movq	16(%r15), %rdi
	callq	_free_page
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_H_REG_CRQ,4,2                  ## @H_REG_CRQ
	.comm	_H_RESOURCE,4,2                 ## @H_RESOURCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Partner adapter not ready\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error %d opening adapter\n"

	.comm	_ibmvmc_task,4,2                ## @ibmvmc_task
	.comm	_ibmvmc_handle_event,4,2        ## @ibmvmc_handle_event
L_.str.2:                               ## @.str.2
	.asciz	"ibmvmc"

L_.str.3:                               ## @.str.3
	.asciz	"couldn't register irq 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"Error %d enabling interrupts!!!\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ibmvmc_init_crq_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvmc_init_crq_queue
_ibmvmc_init_crq_queue:                 ; @ibmvmc_init_crq_queue
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_vio_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	str	x0, [x19, #16]
	cbz	x0, LBB0_15
; %bb.1:
	mov	x1, x0
Lloh3:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	asr	w9, w8, #2
	str	w9, [x19, #8]
	ldr	w0, [x19]
	and	w2, w8, #0xfffffffc
Lloh5:
	adrp	x23, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x23]
	bl	_dma_map_single
	mov	x1, x0
	str	w0, [x19, #24]
	ldr	w0, [x19]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_14
; %bb.2:
Lloh7:
	adrp	x8, _H_REG_CRQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H_REG_CRQ@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w1, [x20, #4]
	ldr	w2, [x19, #24]
	ldr	w3, [x21]
	bl	_plpar_hcall_norets
	mov	x21, x0
Lloh10:
	adrp	x8, _H_RESOURCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _H_RESOURCE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mov	x2, x0
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_ibmvmc_reset_crq_queue
	mov	x2, x0
LBB0_4:
	cbz	w2, LBB0_7
; %bb.5:
	cmp	w2, #2
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	w21, #0
LBB0_7:
	str	xzr, [x19, #32]
	add	x0, x19, #28
	bl	_spin_lock_init
	add	x22, x19, #4
Lloh15:
	adrp	x8, _ibmvmc_task@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ibmvmc_task@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x19
	bl	_tasklet_init
	ldr	w0, [x20]
Lloh18:
	adrp	x8, _ibmvmc_handle_event@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ibmvmc_handle_event@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x3, l_.str.2@PAGE
Lloh22:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w0, [x19]
	ldr	w2, [x20]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_9:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_10:
	mov	x0, x20
	bl	_vio_enable_interrupts
	cbz	w0, LBB0_16
; %bb.11:
	mov	x2, x0
	ldr	w0, [x19]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	bl	_dev_err
	mov	x0, x22
	bl	_tasklet_kill
	ldr	w0, [x20, #4]
	bl	_h_free_crq
LBB0_13:
	ldr	w0, [x19]
	ldr	w1, [x19, #24]
	ldr	w8, [x19, #8]
	lsl	w2, w8, #2
	ldr	w3, [x23]
	bl	_dma_unmap_single
LBB0_14:
	ldr	x0, [x19, #16]
	bl	_free_page
LBB0_15:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_H_REG_CRQ,4,2                  ; @H_REG_CRQ
	.comm	_H_RESOURCE,4,2                 ; @H_RESOURCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Partner adapter not ready\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error %d opening adapter\n"

	.comm	_ibmvmc_task,4,2                ; @ibmvmc_task
	.comm	_ibmvmc_handle_event,4,2        ; @ibmvmc_handle_event
l_.str.2:                               ; @.str.2
	.asciz	"ibmvmc"

l_.str.3:                               ; @.str.3
	.asciz	"couldn't register irq 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"Error %d enabling interrupts!!!\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ibmvmc_init_crq_queue
.subsections_via_symbols
