	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbridge_get_all_devices
_sbridge_get_all_devices:               ## @sbridge_get_all_devices
	.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	$0, -48(%rbp)
	movq	(%rsi), %rax
	movq	_KNIGHTS_LANDING@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	setne	%r13b
	sete	%al
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rsi)
	je	LBB0_16
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movb	%al, %r12b
	leaq	16(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	40(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 40(%rbx)
	leaq	24(%rbx), %rbx
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$0, 8(%rbx)
	jle	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	%r14d
	cmpl	%eax, %r14d
	jge	LBB0_14
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	testl	%r14d, %r14d
	sete	%al
	orb	%r13b, %al
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rdx
	cmpq	-8(%rax,%rcx,8), %rdx
	je	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	$0, -48(%rbp)
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	callq	_sbridge_get_onedevice
	testl	%eax, %eax
	js	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=3
	cmpq	$0, -48(%rbp)
	setne	%al
	testb	%r13b, %al
	jne	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	8(%rbx), %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	8(%rbx), %eax
	movl	%eax, %r14d
	jmp	LBB0_13
LBB0_10:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_sbridge_put_all_devices
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_KNIGHTS_LANDING,8,3            ## @KNIGHTS_LANDING
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_sbridge_get_all_devices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbridge_get_all_devices
_sbridge_get_all_devices:               ; @sbridge_get_all_devices
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _KNIGHTS_LANDING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KNIGHTS_LANDING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w21, eq
	cset	w23, ne
	mov	x24, x1
	ldr	x8, [x24, #16]!
	cbz	x8, LBB0_15
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #40]!
	mov	x24, x19
	sub	x19, x19, #16
	cbz	x8, LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w22, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	cmp	w22, #0
	cset	w8, eq
	orr	w8, w23, w8
	tbnz	w8, #0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x24]
	add	x8, x8, w22, sxtw #3
	ldp	x8, x9, [x8, #-8]
	cmp	x9, x8
	b.eq	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	str	xzr, [sp, #8]
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x21
	bl	_sbridge_get_onedevice
	tbnz	w0, #31, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w8, ne
	and	w8, w8, w23
	tbnz	w8, #0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x19, #8]
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	cbnz	w22, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x19, #8]
	mov	x22, x8
	b	LBB0_5
LBB0_14:
	bl	_sbridge_put_all_devices
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KNIGHTS_LANDING,8,3            ; @KNIGHTS_LANDING
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_sbridge_get_all_devices
.subsections_via_symbols
