	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_huge_mem
_alloc_huge_mem:                        ## @alloc_huge_mem
	.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	%rdi, %rbx
	movl	$24, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r15
	movq	_MLX5_SHM_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_align
	movq	%rax, %r14
	movq	_IPC_PRIVATE@GOTPCREL(%rip), %rax
	movq	_SHM_HUGETLB@GOTPCREL(%rip), %rcx
	movq	_SHM_R@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %edi
	movq	_SHM_W@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rsi
	callq	_shmget
	movl	%eax, (%r15)
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.3:
	movq	_MLX5_SHM_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MLX5_SHMAT_FLAGS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_shmat
	movq	%rax, 8(%r15)
	cmpq	$-1, %rax
	je	LBB0_9
## %bb.4:
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	_MLX5_Q_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_7
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MLX5_DBG_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mlx5_dbg
	jmp	LBB0_11
LBB0_5:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_7:
	leaq	-1(%rax), %rdx
	movq	%rax, %rsi
	callq	_mlx5_bitmap_init
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MLX5_DBG_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mlx5_dbg
	movq	8(%r15), %rdi
	callq	_shmdt
	cmpl	$-1, %eax
	jne	LBB0_10
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MLX5_DBG_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mlx5_dbg
LBB0_10:
	movl	(%r15), %edi
	movq	_IPC_RMID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_shmctl
LBB0_11:
	movq	%r15, %rdi
	callq	_free
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r15), %edi
	movq	_IPC_RMID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_shmctl
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_SHM_LENGTH,4,2            ## @MLX5_SHM_LENGTH
	.comm	_IPC_PRIVATE,4,2                ## @IPC_PRIVATE
	.comm	_SHM_HUGETLB,4,2                ## @SHM_HUGETLB
	.comm	_SHM_R,4,2                      ## @SHM_R
	.comm	_SHM_W,4,2                      ## @SHM_W
	.comm	_stderr,4,2                     ## @stderr
	.comm	_MLX5_DBG_CONTIG,4,2            ## @MLX5_DBG_CONTIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_MLX5_SHM_ADDR,4,2              ## @MLX5_SHM_ADDR
	.comm	_MLX5_SHMAT_FLAGS,4,2           ## @MLX5_SHMAT_FLAGS
	.comm	_MLX5_Q_CHUNK_SIZE,8,3          ## @MLX5_Q_CHUNK_SIZE
	.comm	_IPC_RMID,4,2                   ## @IPC_RMID
	.no_dead_strip	_alloc_huge_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_huge_mem
_alloc_huge_mem:                        ; @alloc_huge_mem
	.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	x20, x0
	mov	w0, #24
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _MLX5_SHM_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_SHM_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_align
	mov	x20, x0
Lloh3:
	adrp	x8, _IPC_PRIVATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPC_PRIVATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SHM_HUGETLB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SHM_HUGETLB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SHM_R@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SHM_R@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _SHM_W@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SHM_W@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x1, x20
	bl	_shmget
	str	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.2:
Lloh15:
	adrp	x8, _MLX5_SHM_ADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX5_SHM_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _MLX5_SHMAT_FLAGS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX5_SHMAT_FLAGS@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	bl	_shmat
	str	x0, [x19, #8]
	cmn	x0, #1
	b.eq	LBB0_5
; %bb.3:
	add	x0, x19, #16
Lloh21:
	adrp	x8, _MLX5_Q_CHUNK_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MLX5_Q_CHUNK_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	udiv	x1, x20, x8
	sub	x2, x1, #1
	bl	_mlx5_bitmap_init
	cbz	x0, LBB0_10
; %bb.4:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
Lloh27:
	adrp	x8, _MLX5_DBG_CONTIG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLX5_DBG_CONTIG@GOTPAGEOFF]
Lloh29:
	ldr	w21, [x8]
Lloh30:
	adrp	x8, _errno@GOTPAGE
Lloh31:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh33:
	adrp	x2, l_.str@PAGE
Lloh34:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_dbg
	ldr	x0, [x19, #8]
	bl	_shmdt
	cmn	w0, #1
	b.ne	LBB0_6
LBB0_5:
Lloh35:
	adrp	x8, _stderr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh37:
	ldr	w20, [x8]
Lloh38:
	adrp	x8, _MLX5_DBG_CONTIG@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MLX5_DBG_CONTIG@GOTPAGEOFF]
Lloh40:
	ldr	w21, [x8]
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh44:
	adrp	x2, l_.str@PAGE
Lloh45:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_dbg
LBB0_6:
	ldr	w0, [x19]
Lloh46:
	adrp	x8, _IPC_RMID@GOTPAGE
Lloh47:
	ldr	x8, [x8, _IPC_RMID@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_shmctl
	b	LBB0_8
LBB0_7:
Lloh49:
	adrp	x8, _stderr@GOTPAGE
Lloh50:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh51:
	ldr	w20, [x8]
Lloh52:
	adrp	x8, _MLX5_DBG_CONTIG@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MLX5_DBG_CONTIG@GOTPAGEOFF]
Lloh54:
	ldr	w21, [x8]
Lloh55:
	adrp	x8, _errno@GOTPAGE
Lloh56:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh57:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh58:
	adrp	x2, l_.str@PAGE
Lloh59:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_dbg
LBB0_8:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
LBB0_10:
	ldr	w0, [x19]
Lloh60:
	adrp	x8, _IPC_RMID@GOTPAGE
Lloh61:
	ldr	x8, [x8, _IPC_RMID@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_shmctl
	b	LBB0_9
	.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	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_SHM_LENGTH,4,2            ; @MLX5_SHM_LENGTH
	.comm	_IPC_PRIVATE,4,2                ; @IPC_PRIVATE
	.comm	_SHM_HUGETLB,4,2                ; @SHM_HUGETLB
	.comm	_SHM_R,4,2                      ; @SHM_R
	.comm	_SHM_W,4,2                      ; @SHM_W
	.comm	_stderr,4,2                     ; @stderr
	.comm	_MLX5_DBG_CONTIG,4,2            ; @MLX5_DBG_CONTIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_MLX5_SHM_ADDR,4,2              ; @MLX5_SHM_ADDR
	.comm	_MLX5_SHMAT_FLAGS,4,2           ; @MLX5_SHMAT_FLAGS
	.comm	_MLX5_Q_CHUNK_SIZE,8,3          ; @MLX5_Q_CHUNK_SIZE
	.comm	_IPC_RMID,4,2                   ; @IPC_RMID
	.no_dead_strip	_alloc_huge_mem
.subsections_via_symbols
