	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvnic_get_vpd
_ibmvnic_get_vpd:                       ## @ibmvnic_get_vpd
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movl	(%rax), %r13d
	jmp	LBB0_3
LBB0_2:
	xorl	%r13d, %r13d
LBB0_3:
	movq	16(%r15), %r14
	movq	%r15, %rdi
	callq	_init_completion
	movq	_IBMVNIC_CRQ_CMD@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -64(%rbp)
	movq	_GET_VPD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ibmvnic_send_crq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.4:
	movq	%r15, %rdi
	callq	_wait_for_completion
	movq	8(%r15), %rcx
	movl	(%rcx), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	8(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.6:
	cmpl	%r13d, %eax
	je	LBB0_11
## %bb.7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_krealloc
	jmp	LBB0_10
LBB0_8:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kzalloc
LBB0_10:
	movq	%rax, %rsi
	movq	8(%r15), %rcx
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_15
LBB0_11:
	movl	(%rcx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_dma_map_single
	movq	8(%r15), %rcx
	movl	%eax, 16(%rcx)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	8(%r15), %rax
	movq	8(%rax), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, 8(%rax)
	jmp	LBB0_16
LBB0_13:
	movq	%r15, %rdi
	callq	_reinit_completion
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)
	movq	_GET_VPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	8(%r15), %rax
	movl	16(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, -64(%rbp)
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ibmvnic_send_crq
	testl	%eax, %eax
	je	LBB0_19
## %bb.14:
	movl	%eax, %ebx
	movq	8(%r15), %rax
	movq	8(%rax), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, 8(%rax)
	jmp	LBB0_18
LBB0_15:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	%r15, %rdi
	callq	_wait_for_completion
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_IBMVNIC_CRQ_CMD,8,3            ## @IBMVNIC_CRQ_CMD
	.comm	_GET_VPD_SIZE,4,2               ## @GET_VPD_SIZE
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could allocate VPD buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"Could not map VPD buffer\n"

	.comm	_GET_VPD,4,2                    ## @GET_VPD
	.no_dead_strip	_ibmvnic_get_vpd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvnic_get_vpd
_ibmvnic_get_vpd:                       ; @ibmvnic_get_vpd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x8, [x0, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w23, [x8]
	b	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	ldr	x20, [x19, #16]
	mov	x0, x19
	bl	_init_completion
Lloh0:
	adrp	x22, _IBMVNIC_CRQ_CMD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IBMVNIC_CRQ_CMD@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #8]
Lloh2:
	adrp	x8, _GET_VPD_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GET_VPD_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_ibmvnic_send_crq
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.4:
	mov	x0, x19
	bl	_wait_for_completion
	ldr	x9, [x19, #8]
	ldr	w8, [x9]
	cbz	w8, LBB0_8
; %bb.5:
	ldr	x1, [x9, #8]
	cbz	x1, LBB0_9
; %bb.6:
	cmp	w8, w23
	b.eq	LBB0_11
; %bb.7:
Lloh5:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x9]
	mov	x0, x1
	mov	x1, x8
	bl	_krealloc
	b	LBB0_10
LBB0_8:
Lloh8:
	adrp	x8, _ENODATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_17
LBB0_9:
Lloh10:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_kzalloc
LBB0_10:
	mov	x1, x0
	ldr	x9, [x19, #8]
	str	x0, [x9, #8]
	cbz	x0, LBB0_15
LBB0_11:
	ldr	w2, [x9]
Lloh13:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #8]
	str	w0, [x8, #16]
	mov	x0, x20
	bl	_dma_mapping_error
	cbz	x0, LBB0_13
; %bb.12:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x19, #8]
	str	xzr, [x8, #8]
	b	LBB0_16
LBB0_13:
	mov	x0, x19
	bl	_reinit_completion
	ldr	x8, [x22]
	str	x8, [sp, #24]
Lloh18:
	adrp	x8, _GET_VPD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GET_VPD@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #16]
	bl	_cpu_to_be32
	str	x0, [sp, #8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_cpu_to_be32
	str	x0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_ibmvnic_send_crq
	mov	x21, x0
	cbz	w0, LBB0_19
; %bb.14:
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x19, #8]
	str	xzr, [x8, #8]
	b	LBB0_18
LBB0_15:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_16:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_19:
	mov	x0, x19
	bl	_wait_for_completion
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IBMVNIC_CRQ_CMD,8,3            ; @IBMVNIC_CRQ_CMD
	.comm	_GET_VPD_SIZE,4,2               ; @GET_VPD_SIZE
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could allocate VPD buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"Could not map VPD buffer\n"

	.comm	_GET_VPD,4,2                    ; @GET_VPD
	.no_dead_strip	_ibmvnic_get_vpd
.subsections_via_symbols
