	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_res
_get_res:                               ## @get_res
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_mlx4_tlock
	movl	%eax, %edi
	callq	_spin_lock_irq
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_find_res
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	(%rax), %rcx
	movq	_RES_ANY_BUSY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENONET@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	cmpl	%r12d, 8(%rax)
	jne	LBB0_6
## %bb.7:
	movq	%rcx, 16(%rax)
	movq	%rdx, (%rax)
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movq	%rax, (%r14)
	jmp	LBB0_9
LBB0_6:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r15, %rdi
	callq	_mlx4_tlock
	movl	%eax, %edi
	callq	_spin_unlock_irq
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENONET,4,2                     ## @ENONET
	.comm	_RES_ANY_BUSY,8,3               ## @RES_ANY_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_get_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_res
_get_res:                               ; @get_res
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mlx4_tlock
	bl	_spin_lock_irq
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_find_res
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RES_ANY_BUSY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RES_ANY_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh5:
	adrp	x8, _ENONET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENONET@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w10, [x0, #8]
	cmp	w10, w21
	b.ne	LBB0_7
; %bb.5:
	str	x8, [x0, #16]
	str	x9, [x0]
	mov	w21, #0
	cbz	x20, LBB0_9
; %bb.6:
	str	x0, [x20]
	b	LBB0_9
LBB0_7:
Lloh7:
	adrp	x8, _EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	bl	_mlx4_tlock
	bl	_spin_unlock_irq
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENONET,4,2                     ; @ENONET
	.comm	_RES_ANY_BUSY,8,3               ; @RES_ANY_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_get_res
.subsections_via_symbols
