	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adb_open
_adb_open:                              ## @adb_open
	.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	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_lock_kernel
	movq	%rbx, %rdi
	callq	_iminor
	testq	%rax, %rax
	jg	LBB0_4
## %bb.1:
	movq	_adb_controller@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, (%r14)
	leaq	20(%rax), %rdi
	callq	_spin_lock_init
	leaq	16(%rbx), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_atomic_set
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_init_waitqueue_head
	movl	$1, (%rbx)
	jmp	LBB0_7
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_6:
	subl	(%rax), %r15d
LBB0_7:
	xorl	%eax, %eax
	callq	_unlock_kernel
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adb_controller,8,3             ## @adb_controller
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_adb_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adb_open
_adb_open:                              ; @adb_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_lock_kernel
	mov	x0, x20
	bl	_iminor
	cmp	x0, #0
	b.gt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _adb_controller@GOTPAGE
Lloh1:
	ldr	x8, [x8, _adb_controller@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	x0, [x19]
	add	x0, x0, #20
	bl	_spin_lock_init
	add	x0, x20, #16
	mov	w1, #0
	bl	_atomic_set
	str	xzr, [x20, #8]
	add	x0, x20, #4
	bl	_init_waitqueue_head
	mov	w19, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _ENXIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
	bl	_unlock_kernel
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_adb_controller,8,3             ; @adb_controller
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_adb_open
.subsections_via_symbols
