	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_alloc_buf                 ## -- Begin function mlx4_alloc_buf
	.p2align	4, 0x90
_mlx4_alloc_buf:                        ## @mlx4_alloc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movl	%edx, %esi
	callq	_align
	movl	%eax, 8(%rbx)
	movq	_PROT_READ@GOTPCREL(%rip), %rcx
	movq	_PROT_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rsi
	movq	_MAP_ANONYMOUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%eax, %esi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, (%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_4
LBB0_2:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_ibv_dontfork_range
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	movl	8(%rbx), %esi
	callq	_munmap
	movl	%r14d, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_ANONYMOUS,4,2              ## @MAP_ANONYMOUS
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_alloc_buf                 ; -- Begin function mlx4_alloc_buf
	.p2align	2
_mlx4_alloc_buf:                        ; @mlx4_alloc_buf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	x1, x2
	bl	_align
	mov	x1, x0
	str	w0, [x19, #8]
Lloh0:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _MAP_PRIVATE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MAP_PRIVATE@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh8:
	ldr	w8, [x10]
Lloh9:
	adrp	x9, _MAP_ANONYMOUS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAP_ANONYMOUS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, #0
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
	str	x0, [x19]
Lloh12:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	b	LBB0_4
LBB0_2:
	mov	x1, x20
	bl	_ibv_dontfork_range
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	bl	_munmap
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_ANONYMOUS,4,2              ; @MAP_ANONYMOUS
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
