	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adb_register                   ## -- Begin function adb_register
	.p2align	4, 0x90
_adb_register:                          ## @adb_register
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movl	%edi, %r13d
	movq	_adb_handler_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$0, (%rbx)
	movl	$1, %ebx
	xorl	%r14d, %r14d
	movq	_adb_handler@GOTPCREL(%rip), %r15
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %r12
	movq	_adb_handler_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_write_lock_irq
	movq	(%r12), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 24(%rax,%r14)
	movq	%r15, %rdi
	movq	%r12, %r15
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	callq	_write_unlock_irq
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rax
	movslq	(%rsi), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rsi)
	movl	%ebx, (%rax,%rcx,4)
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	addq	$16, %r14
	cmpq	$240, %r14
	je	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	cmpl	%r13d, 16(%rax,%r14)
	jne	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%r12d, 20(%rax,%r14)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_try_handler_change
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 24(%rax,%r14)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	callq	_pr_err
	jmp	LBB0_9
LBB0_10:
	movq	_adb_handler_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adb_handler_mutex,4,2          ## @adb_handler_mutex
	.comm	_adb_handler,8,3                ## @adb_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Two handlers for ADB device %d\n"

	.comm	_adb_handler_lock,4,2           ## @adb_handler_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adb_register                   ; -- Begin function adb_register
	.p2align	2
_adb_register:                          ; @adb_register
	.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	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x0, _adb_handler_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _adb_handler_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x26, #0
	str	wzr, [x19]
	mov	w23, #1
Lloh2:
	adrp	x27, _adb_handler@GOTPAGE
Lloh3:
	ldr	x27, [x27, _adb_handler@GOTPAGEOFF]
Lloh4:
	adrp	x24, _adb_handler_lock@GOTPAGE
Lloh5:
	ldr	x24, [x24, _adb_handler_lock@GOTPAGEOFF]
Lloh6:
	adrp	x25, l_.str@PAGE
Lloh7:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_write_lock_irq
	ldr	x8, [x27]
	add	x8, x8, x26
	str	x20, [x8, #24]
	mov	x0, x24
	bl	_write_unlock_irq
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	w10, w9, #1
	str	w10, [x19]
	str	w23, [x8, x9, lsl #2]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	add	x26, x26, #16
	cmp	x26, #240
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	add	x9, x8, x26
	ldr	w9, [x9, #16]
	cmp	w9, w22
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w21, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x8, x26
	ldr	w9, [x9, #20]
	cmp	w9, w21
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	mov	x1, x21
	bl	_try_handler_change
	cbz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x27]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x26
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	x1, x22
	bl	_pr_err
	b	LBB0_2
LBB0_10:
Lloh8:
	adrp	x0, _adb_handler_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _adb_handler_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19]
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_adb_handler_mutex,4,2          ; @adb_handler_mutex
	.comm	_adb_handler,8,3                ; @adb_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Two handlers for ADB device %d\n"

	.comm	_adb_handler_lock,4,2           ; @adb_handler_lock
.subsections_via_symbols
