	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_isgeckoalive               ## -- Begin function usb_isgeckoalive
	.p2align	4, 0x90
_usb_isgeckoalive:                      ## @usb_isgeckoalive
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	$0, -32(%rbp)
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_EXI_GetID
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	$0, -32(%rbp)
	jne	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	___usbgecko_exi_wait
	movl	$36864, -20(%rbp)               ## imm = 0x9000
	leaq	-20(%rbp), %rsi
	movl	%r14d, %edi
	callq	___send_command
	xorl	%ebx, %ebx
	testl	$1136, -20(%rbp)                ## imm = 0x470
	setne	%bl
	cmpl	$1, %eax
	cmovnel	%eax, %ebx
	movl	%r14d, %edi
	callq	_EXI_Unlock
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXI_DEVICE_0,4,2               ## @EXI_DEVICE_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_isgeckoalive               ; -- Begin function usb_isgeckoalive
	.p2align	2
_usb_isgeckoalive:                      ; @usb_isgeckoalive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _EXI_DEVICE_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_EXI_GetID
	ldr	x8, [sp, #8]
	cmp	x0, #0
	ccmp	x8, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	___usbgecko_exi_wait
	mov	w8, #36864
	str	w8, [sp, #4]
	add	x1, sp, #4
	mov	x0, x19
	bl	___send_command
	ldr	w8, [sp, #4]
	mov	w9, #1136
	tst	w8, w9
	cset	w8, ne
	cmp	w0, #1
	csel	w20, w8, w0, eq
	mov	x0, x19
	bl	_EXI_Unlock
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EXI_DEVICE_0,4,2               ; @EXI_DEVICE_0
.subsections_via_symbols
