	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_error_data                ## -- Begin function ehca_error_data
	.p2align	4, 0x90
_ehca_error_data:                       ## @ehca_error_data
	.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
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ehca_alloc_fw_ctrlblock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	4(%r15), %edi
	leaq	-48(%rbp), %rcx
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_hipz_h_error_data
	movq	%rax, %r14
	movq	_H_R_STATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ehca_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	jmp	LBB0_9
LBB0_4:
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_6
## %bb.5:
	movq	_ERROR_DATA_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_EHCA_BMASK_GET
	movq	_EHCA_PAGESIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_print_error_data
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_ehca_err
LBB0_8:
	movq	%rbx, %rdi
	callq	_ehca_free_fw_ctrlblock
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate rblock memory."

	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.comm	_H_R_STATE,8,3                  ## @H_R_STATE
L_.str.1:                               ## @.str.1
	.asciz	"No error data is available: %llx."

	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.comm	_ERROR_DATA_LENGTH,4,2          ## @ERROR_DATA_LENGTH
	.comm	_EHCA_PAGESIZE,4,2              ## @EHCA_PAGESIZE
L_.str.2:                               ## @.str.2
	.asciz	"Error data could not be fetched: %llx"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_error_data                ; -- Begin function ehca_error_data
	.p2align	2
_ehca_error_data:                       ; @ehca_error_data
	.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	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ehca_alloc_fw_ctrlblock
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w0, [x21, #4]
	add	x3, sp, #8
	mov	x1, x23
	mov	x2, x19
	bl	_hipz_h_error_data
	mov	x20, x0
Lloh3:
	adrp	x8, _H_R_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_R_STATE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	str	x23, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_ehca_err
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_9
LBB0_4:
Lloh13:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_6
; %bb.5:
Lloh16:
	adrp	x8, _ERROR_DATA_LENGTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERROR_DATA_LENGTH@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_EHCA_BMASK_GET
Lloh19:
	adrp	x8, _EHCA_PAGESIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EHCA_PAGESIZE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w0, w8
	csel	w3, w0, w8, lt
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_print_error_data
	b	LBB0_8
LBB0_6:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x21
	bl	_ehca_err
LBB0_8:
	mov	x0, x19
	bl	_ehca_free_fw_ctrlblock
LBB0_9:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate rblock memory."

	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.comm	_H_R_STATE,8,3                  ; @H_R_STATE
l_.str.1:                               ; @.str.1
	.asciz	"No error data is available: %llx."

	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.comm	_ERROR_DATA_LENGTH,4,2          ; @ERROR_DATA_LENGTH
	.comm	_EHCA_PAGESIZE,4,2              ; @EHCA_PAGESIZE
l_.str.2:                               ; @.str.2
	.asciz	"Error data could not be fetched: %llx"

.subsections_via_symbols
