	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsg_get_device
_bsg_get_device:                        ## @bsg_get_device
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_bsg_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_iminor
	movq	_bsg_minor_idr@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_idr_find
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_kref_get
	movq	_bsg_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_iminor
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	___bsg_get_device
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_bsg_add_device
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_bsg_kref_release_function@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kref_put
LBB0_4:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_bsg_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bsg_mutex,4,2                  ## @bsg_mutex
	.comm	_bsg_minor_idr,4,2              ## @bsg_minor_idr
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_bsg_kref_release_function,4,2  ## @bsg_kref_release_function
	.no_dead_strip	_bsg_get_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsg_get_device
_bsg_get_device:                        ; @bsg_get_device
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x0, _bsg_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _bsg_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x21
	bl	_iminor
	mov	x1, x0
Lloh2:
	adrp	x0, _bsg_minor_idr@GOTPAGE
Lloh3:
	ldr	x0, [x0, _bsg_minor_idr@GOTPAGEOFF]
	bl	_idr_find
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	bl	_kref_get
Lloh4:
	adrp	x0, _bsg_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _bsg_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x21
	bl	_iminor
	ldr	w1, [x20, #4]
	bl	___bsg_get_device
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	x2, x19
	bl	_bsg_add_device
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _bsg_kref_release_function@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bsg_kref_release_function@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kref_put
LBB0_4:
	mov	x0, x22
	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_5:
Lloh9:
	adrp	x0, _bsg_mutex@GOTPAGE
Lloh10:
	ldr	x0, [x0, _bsg_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_bsg_mutex,4,2                  ; @bsg_mutex
	.comm	_bsg_minor_idr,4,2              ; @bsg_minor_idr
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_bsg_kref_release_function,4,2  ; @bsg_kref_release_function
	.no_dead_strip	_bsg_get_device
.subsections_via_symbols
