	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ACCESS_REG
_mlx4_ACCESS_REG:                       ## @mlx4_ACCESS_REG
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlx4_free_cmd_mailbox
LBB0_3:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	8(%r12), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$2052, %edi                     ## imm = 0x804
	callq	_cpu_to_be16
	movq	%rax, 40(%rbx)
	movl	$1, (%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be16
	movq	%rax, 32(%rbx)
	movq	_MLX4_ACCESS_REG_METHOD_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	%r15d, 4(%rbx)
	movq	%r12, %r15
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	$8, %esi
	callq	_min
	movl	%eax, %r12d
	leal	3(%r12), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	incl	%edi
	movq	_MLX4_ACCESS_REG_LEN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	orl	$12288, %edi                    ## imm = 0x3000
	callq	_cpu_to_be16
	movq	%rax, 24(%rbx)
	movq	8(%rbx), %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	_MLX4_CMD_ACCESS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_C@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_MLX4_ACCESS_REG_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	andl	16(%rax), %r13d
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	callq	_mlx4_err
	jmp	LBB0_8
LBB0_7:
	movq	8(%rax), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
	xorl	%r13d, %r13d
LBB0_8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlx4_free_cmd_mailbox
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_free_cmd_mailbox
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_ACCESS_REG_METHOD_MASK,4,2 ## @MLX4_ACCESS_REG_METHOD_MASK
	.comm	_MLX4_ACCESS_REG_LEN_MASK,4,2   ## @MLX4_ACCESS_REG_LEN_MASK
	.comm	_MLX4_CMD_ACCESS_REG,4,2        ## @MLX4_CMD_ACCESS_REG
	.comm	_MLX4_CMD_TIME_CLASS_C,4,2      ## @MLX4_CMD_TIME_CLASS_C
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
	.comm	_MLX4_ACCESS_REG_STATUS_MASK,4,2 ## @MLX4_ACCESS_REG_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MLX4_CMD_ACCESS_REG(%x) returned REG status (%x)\n"

	.no_dead_strip	_mlx4_ACCESS_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ACCESS_REG
_mlx4_ACCESS_REG:                       ; @mlx4_ACCESS_REG
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x23, x1
	mov	x19, x0
	bl	_mlx4_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x21
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
	ldr	x27, [x20, #8]
	ldr	x26, [x21, #8]
	mov	w0, #2052
	bl	_cpu_to_be16
	str	x0, [x27, #40]
	mov	w8, #1
	str	w8, [x27]
	mov	x0, x23
	bl	_cpu_to_be16
	str	x0, [x27, #32]
Lloh0:
	adrp	x8, _MLX4_ACCESS_REG_METHOD_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_ACCESS_REG_METHOD_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w25
	str	w8, [x27, #4]
	mov	x0, x24
	mov	w1, #8
	bl	_min
	mov	x24, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	add	w8, w8, #1
Lloh3:
	adrp	x9, _MLX4_ACCESS_REG_LEN_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_ACCESS_REG_LEN_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
	orr	w0, w8, #0x3000
	bl	_cpu_to_be16
	str	x0, [x27, #24]
	ldr	x0, [x27, #8]
	mov	x1, x22
	mov	x2, x24
	bl	_memcpy
	ldr	w1, [x20]
	ldr	w2, [x21]
Lloh6:
	adrp	x8, _MLX4_CMD_ACCESS_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_ACCESS_REG@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
Lloh9:
	adrp	x8, _MLX4_CMD_TIME_CLASS_C@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_C@GOTPAGEOFF]
Lloh11:
	ldr	w6, [x8]
Lloh12:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh14:
	ldr	w7, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	bl	_mlx4_cmd_box
	mov	x25, x0
	cbnz	w0, LBB0_9
; %bb.6:
	ldr	w8, [x26, #16]
Lloh15:
	adrp	x9, _MLX4_ACCESS_REG_STATUS_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MLX4_ACCESS_REG_STATUS_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	ands	w25, w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	mov	x3, x25
	bl	_mlx4_err
	b	LBB0_9
LBB0_8:
	ldr	x1, [x26, #8]
	mov	x0, x22
	mov	x2, x24
	bl	_memcpy
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 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
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_ACCESS_REG_METHOD_MASK,4,2 ; @MLX4_ACCESS_REG_METHOD_MASK
	.comm	_MLX4_ACCESS_REG_LEN_MASK,4,2   ; @MLX4_ACCESS_REG_LEN_MASK
	.comm	_MLX4_CMD_ACCESS_REG,4,2        ; @MLX4_CMD_ACCESS_REG
	.comm	_MLX4_CMD_TIME_CLASS_C,4,2      ; @MLX4_CMD_TIME_CLASS_C
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
	.comm	_MLX4_ACCESS_REG_STATUS_MASK,4,2 ; @MLX4_ACCESS_REG_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MLX4_CMD_ACCESS_REG(%x) returned REG status (%x)\n"

	.no_dead_strip	_mlx4_ACCESS_REG
.subsections_via_symbols
