	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_reg_smr                   ## -- Begin function ehca_reg_smr
	.p2align	4, 0x90
_ehca_reg_smr:                          ## @ehca_reg_smr
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	leaq	-44(%rbp), %rsi
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %edi
	callq	_ehca_mrmw_map_acl
	movl	20(%r12), %edi
	leaq	-44(%rbp), %rsi
	callq	_ehca_mrmw_set_pgsize_hipz_acl
	movl	-44(%rbp), %r8d
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r9d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %edi
	movq	%r14, %rbx
	subq	$8, %rsp
	leaq	-88(%rbp), %rax
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rcx
	pushq	%rax
	callq	_hipz_h_register_smr
	addq	$16, %rsp
	movq	%rax, %r15
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_1
## %bb.4:
	movq	24(%rbp), %rax
	movq	16(%rbp), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rbx)
	movups	16(%r12), %xmm0
	movups	%xmm0, 16(%rbx)
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, 8(%rbx)
	movl	-80(%rbp), %edx
	movl	%edx, 12(%rbx)
	movl	-84(%rbp), %edx
	movl	%edx, (%rcx)
	movl	-88(%rbp), %ecx
	movl	%ecx, (%rax)
	xorl	%r14d, %r14d
	jmp	LBB0_3
LBB0_1:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %r13d
	movl	12(%r12), %r11d
	movl	32(%r12), %r10d
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rcx, %rdi
	movl	%r15d, %edx
	movq	%r12, %r8
	movq	%rbx, %r9
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r11
	pushq	%r13
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	pushq	%r13
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_ehca_err
	addq	$48, %rsp
	movq	%r15, %rdi
	callq	_ehca2ib_return_code
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rdi
	movl	%eax, %edx
	movq	%r12, %r8
	movq	%rbx, %r9
	xorl	%eax, %eax
	pushq	%r13
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_ehca_err
	addq	$32, %rsp
	movl	%r15d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hipz_reg_smr failed, h_ret=%lli shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x e_pd=%p hca_hndl=%llx mr_hndl=%llx lkey=%x"

L_.str.1:                               ## @.str.1
	.asciz	"ret=%i shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x e_pd=%p"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_reg_smr                   ; -- Begin function ehca_reg_smr
	.p2align	2
_ehca_reg_smr:                          ; @ehca_reg_smr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x7
	mov	x26, x6
	mov	x24, x5
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	add	x1, sp, #44
	mov	x0, x4
	bl	_ehca_mrmw_map_acl
	ldr	w0, [x22, #20]
	add	x1, sp, #44
	bl	_ehca_mrmw_set_pgsize_hipz_acl
	ldr	w4, [sp, #44]
	ldr	w5, [x24]
	ldr	w0, [x23, #4]
	add	x6, sp, #32
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_hipz_h_register_smr
Lloh0:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w27, #0
	str	x21, [x20]
	ldr	q0, [x22, #16]
	str	q0, [x20, #16]
	ldr	w8, [sp, #40]
	stp	w19, w8, [x20, #8]
	ldp	w9, w8, [sp, #32]
	str	w8, [x26]
	str	w9, [x25]
	b	LBB0_4
LBB0_2:
	mov	x27, x0
	ldr	w8, [x23, #4]
	ldr	w9, [x22, #12]
	ldr	w10, [x22, #32]
	stp	x9, x10, [sp, #16]
	stp	x24, x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x27
	mov	x3, x23
	mov	x4, x22
	mov	x5, x20
	mov	x6, x21
	mov	x7, x19
	bl	_ehca_err
	mov	x0, x27
	bl	_ehca2ib_return_code
	mov	x27, x0
	cbz	w0, LBB0_4
; %bb.3:
	str	x24, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x27
	mov	x3, x23
	mov	x4, x22
	mov	x5, x20
	mov	x6, x21
	mov	x7, x19
	bl	_ehca_err
LBB0_4:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hipz_reg_smr failed, h_ret=%lli shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x e_pd=%p hca_hndl=%llx mr_hndl=%llx lkey=%x"

l_.str.1:                               ; @.str.1
	.asciz	"ret=%i shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x e_pd=%p"

.subsections_via_symbols
