	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_fpga_conn_map_buf
_mlx5_fpga_conn_map_buf:                ## @mlx5_fpga_conn_map_buf
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	xorl	%edi, %edi
	cmpl	$0, 16(%rax)
	sete	%dil
	callq	_unlikely
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	8(%r12), %rax
	movl	(%rax), %edx
	movl	16(%rax), %esi
	movl	(%r12), %ecx
	movq	%r15, %rdi
	callq	_dma_map_single
	movq	8(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_mlx5_fpga_warn
	jmp	LBB0_6
LBB0_3:
	movq	8(%r12), %rax
	movl	40(%rax), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.4:
	movl	24(%rax), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	callq	_dma_map_single
	movq	8(%r12), %rcx
	movq	%rax, 32(%rcx)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_mlx5_fpga_warn
	movq	8(%r12), %rax
	movq	8(%rax), %rsi
	movl	(%rax), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	callq	_dma_unmap_single
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %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	"DMA error on sg 0: %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"DMA error on sg 1: %d\n"

	.no_dead_strip	_mlx5_fpga_conn_map_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_fpga_conn_map_buf
_mlx5_fpga_conn_map_buf:                ; @mlx5_fpga_conn_map_buf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
	ldr	w8, [x8, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_8
LBB0_2:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #16]
	ldr	w2, [x8]
	ldr	w3, [x19]
	mov	x0, x21
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	mov	x0, x21
	bl	_dma_mapping_error
	mov	x22, x0
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_mlx5_fpga_warn
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #40]
	cbz	w1, LBB0_8
; %bb.5:
	ldr	w2, [x8, #24]
	ldr	w3, [x19]
	mov	x0, x21
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #8]
	str	x0, [x8, #32]
	mov	x0, x21
	bl	_dma_mapping_error
	mov	x22, x0
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_mlx5_fpga_warn
	ldr	x8, [x19, #8]
	ldr	x1, [x8, #8]
	ldr	w2, [x8]
	ldr	w3, [x19]
	mov	x0, x21
	bl	_dma_unmap_single
LBB0_7:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA error on sg 0: %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"DMA error on sg 1: %d\n"

	.no_dead_strip	_mlx5_fpga_conn_map_buf
.subsections_via_symbols
