	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_GEN_EQE                   ## -- Begin function mlx4_GEN_EQE
	.p2align	4, 0x90
_mlx4_GEN_EQE:                          ## @mlx4_GEN_EQE
	.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	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_mlx4_priv
	movq	%rax, %r14
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	js	LBB0_17
## %bb.3:
	movq	8(%rbx), %rcx
	cmpl	%r15d, (%rcx)
	jl	LBB0_17
## %bb.4:
	cmpl	%r15d, (%rbx)
	je	LBB0_17
## %bb.5:
	movl	%r15d, %edx
	movq	%rdx, %rcx
	shlq	$4, %rcx
	cmpl	$0, 8(%rax,%rcx)
	je	LBB0_17
## %bb.6:
	movq	(%rax,%rcx), %rax
	movq	(%r13), %rcx
	cmpl	$0, (%rax,%rcx,8)
	js	LBB0_17
## %bb.7:
	shlq	$2, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	addq	%rdx, %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r12
	callq	_mutex_lock
	movl	%r15d, %edx
	shll	$10, %edx
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	orl	(%rax,%r12,8), %edx
	movq	_RES_EQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-88(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_get_res
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	-88(%rbp), %rax
	movq	(%rax), %rax
	movq	_RES_EQ_HW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.12:
	movq	%rbx, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_10:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_RES_EQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_put_res
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_11:
	addq	(%r14), %rdi
	callq	_mutex_unlock
	jmp	LBB0_17
LBB0_14:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	_MLX4_EVENT_TYPE_CMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_16
## %bb.15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax,%r12,8), %edi
	incl	%edi
	movl	%edi, 4(%rax,%r12,8)
	callq	_cpu_to_be16
	movl	%eax, 8(%r13)
LBB0_16:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	%r13, %rsi
	movl	$28, %edx
	callq	_memcpy
	movzbl	%r15b, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%r12,8), %edx
	shll	$16, %edx
	andl	$67043328, %edx                 ## imm = 0x3FF0000
	orl	%eax, %edx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %esi
	movq	_MLX4_CMD_GEN_EQE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_mlx4_cmd
	movl	%eax, %r12d
	movq	_RES_EQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_put_res
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	(%r14), %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_mlx4_free_cmd_mailbox
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RES_EQ,4,2                     ## @RES_EQ
	.comm	_RES_EQ_HW,8,3                  ## @RES_EQ_HW
	.comm	_MLX4_EVENT_TYPE_CMD,8,3        ## @MLX4_EVENT_TYPE_CMD
	.comm	_MLX4_CMD_GEN_EQE,4,2           ## @MLX4_CMD_GEN_EQE
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_GEN_EQE                   ; -- Begin function mlx4_GEN_EQE
	.p2align	2
_mlx4_GEN_EQE:                          ; @mlx4_GEN_EQE
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mlx4_priv
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_11
; %bb.1:
	tbnz	w21, #31, LBB0_10
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	cmp	w9, w21
	b.lt	LBB0_10
; %bb.3:
	ldr	w9, [x19]
	cmp	w9, w21
	b.eq	LBB0_10
; %bb.4:
	add	x9, x8, w21, uxtw #4
	ldr	w9, [x9, #8]
	cbz	w9, LBB0_10
; %bb.5:
	mov	w26, w21
	lsl	x9, x26, #4
	ldr	x24, [x8, x9]
	ldr	x27, [x23]
	add	x28, x24, x27, lsl #3
	ldr	w8, [x28]
	tbnz	w8, #31, LBB0_10
; %bb.6:
	mov	x20, x0
	ldr	x8, [x0]
	add	x0, x8, x26, lsl #2
	bl	_mutex_lock
	ldr	w8, [x28]
	orr	w22, w8, w21, lsl #10
Lloh0:
	adrp	x8, _RES_EQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_EQ@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_get_res
	mov	x25, x0
	cbnz	w0, LBB0_15
; %bb.7:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _RES_EQ_HW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RES_EQ_HW@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x25, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.9:
	mov	x0, x25
	bl	_PTR_ERR
	mov	x25, x0
	b	LBB0_14
LBB0_10:
	mov	w25, #0
	b	LBB0_12
LBB0_11:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_12:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_14:
Lloh12:
	adrp	x8, _RES_EQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RES_EQ@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_put_res
LBB0_15:
	ldr	x8, [x20]
	add	x0, x8, x26, lsl #2
	bl	_mutex_unlock
	b	LBB0_12
LBB0_16:
	ldr	x8, [x23]
Lloh15:
	adrp	x9, _MLX4_EVENT_TYPE_CMD@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MLX4_EVENT_TYPE_CMD@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.17:
	add	x8, x24, x27, lsl #3
	ldr	w9, [x8, #4]
	add	w0, w9, #1
	str	w0, [x8, #4]
	bl	_cpu_to_be16
	str	w0, [x23, #8]
LBB0_18:
	ldr	w0, [x25, #4]
	mov	x1, x23
	mov	w2, #28
	bl	_memcpy
	and	w2, w21, #0xff
	ldr	w8, [x28]
	bfi	w2, w8, #16, #10
	ldr	w1, [x25]
Lloh18:
	adrp	x8, _MLX4_CMD_GEN_EQE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX4_CMD_GEN_EQE@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
Lloh21:
	adrp	x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x8]
Lloh24:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh26:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_mlx4_cmd
	mov	x23, x25
	mov	x25, x0
Lloh27:
	adrp	x8, _RES_EQ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RES_EQ@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_put_res
	ldr	x8, [x20]
	add	x0, x8, x26, lsl #2
	bl	_mutex_unlock
	mov	x0, x19
	mov	x1, x23
	bl	_mlx4_free_cmd_mailbox
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RES_EQ,4,2                     ; @RES_EQ
	.comm	_RES_EQ_HW,8,3                  ; @RES_EQ_HW
	.comm	_MLX4_EVENT_TYPE_CMD,8,3        ; @MLX4_EVENT_TYPE_CMD
	.comm	_MLX4_CMD_GEN_EQE,4,2           ; @MLX4_CMD_GEN_EQE
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
.subsections_via_symbols
