	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function USB_HandleExtraDevice
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
LCPI0_1:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_USB_HandleExtraDevice
	.p2align	4, 0x90
_USB_HandleExtraDevice:                 ## @USB_HandleExtraDevice
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_usb_host_port@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_USB_HOST_PORT_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ADC_CON2@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_USB_HOST_PORT_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.3:
	movq	_ADC_CON1@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	callq	_adc_get
	movq	_adc_extra@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	mulsd	LCPI0_1(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, (%rax)
	movq	_usb_extra_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.5:
	movq	_USB_EXTRA_ADC_THRESHOLD@GOTPCREL(%rip), %rcx
	ucomisd	(%rcx), %xmm1
	jbe	LBB0_14
## %bb.6:
	movq	_USB_EXTRA_STATE_DISABLED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	popq	%rbp
	retq
LBB0_7:
	movq	_usb_extra_manual@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_USB_EXTRA_STATE_DISABLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	je	LBB0_10
## %bb.8:
	cmpq	%rdi, %rcx
	jne	LBB0_14
## %bb.9:
	movq	_USB_EXTRA_STATE_ENABLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	popq	%rbp
	jmp	_USB_ExtraSetState              ## TAILCALL
LBB0_10:
	movq	_USB_EXTRA_ADC_THRESHOLD@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movq	_USB_EXTRA_STATE_ENABLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rdi, %rcx
	jne	LBB0_12
## %bb.11:
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_12
## %bb.15:
	movq	%rax, %rdi
	jmp	LBB0_16
LBB0_12:
	cmpq	%rax, %rcx
	jne	LBB0_14
## %bb.13:
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_14
LBB0_16:
	popq	%rbp
	jmp	_USB_ExtraSetState              ## TAILCALL
LBB0_14:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_usb_host_port,8,3              ## @usb_host_port
	.comm	_USB_HOST_PORT_1,8,3            ## @USB_HOST_PORT_1
	.comm	_ADC_CON2,4,2                   ## @ADC_CON2
	.comm	_USB_HOST_PORT_2,8,3            ## @USB_HOST_PORT_2
	.comm	_ADC_CON1,4,2                   ## @ADC_CON1
	.comm	_adc_extra,8,3                  ## @adc_extra
	.comm	_usb_extra_state,8,3            ## @usb_extra_state
	.comm	_USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG,8,3 ## @USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG
	.comm	_USB_EXTRA_ADC_THRESHOLD,8,3    ## @USB_EXTRA_ADC_THRESHOLD
	.comm	_USB_EXTRA_STATE_DISABLED,8,3   ## @USB_EXTRA_STATE_DISABLED
	.comm	_usb_extra_manual,8,3           ## @usb_extra_manual
	.comm	_USB_EXTRA_STATE_ENABLED,8,3    ## @USB_EXTRA_STATE_ENABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_USB_HandleExtraDevice          ; -- Begin function USB_HandleExtraDevice
	.p2align	2
_USB_HandleExtraDevice:                 ; @USB_HandleExtraDevice
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _usb_host_port@GOTPAGE
Lloh1:
	ldr	x8, [x8, _usb_host_port@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _USB_HOST_PORT_1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _USB_HOST_PORT_1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ADC_CON2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADC_CON2@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x9, _USB_HOST_PORT_2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_HOST_PORT_2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.3:
Lloh11:
	adrp	x8, _ADC_CON1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADC_CON1@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	bl	_adc_get
Lloh13:
	adrp	x9, _adc_extra@GOTPAGE
Lloh14:
	ldr	x9, [x9, _adc_extra@GOTPAGEOFF]
	ldr	d1, [x9]
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d2, x8
	fmul	d0, d0, d2
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	movk	x8, #16364, lsl #48
	fmov	d2, x8
	fmadd	d0, d1, d2, d0
Lloh15:
	adrp	x8, _usb_extra_state@GOTPAGE
Lloh16:
	ldr	x8, [x8, _usb_extra_state@GOTPAGEOFF]
	str	d0, [x9]
	ldr	x9, [x8]
Lloh17:
	adrp	x10, _USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG@GOTPAGE
Lloh18:
	ldr	x10, [x10, _USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.5:
Lloh20:
	adrp	x9, _USB_EXTRA_ADC_THRESHOLD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _USB_EXTRA_ADC_THRESHOLD@GOTPAGEOFF]
Lloh22:
	ldr	d1, [x9]
	fcmp	d0, d1
	b.le	LBB0_16
; %bb.6:
Lloh23:
	adrp	x9, _USB_EXTRA_STATE_DISABLED@GOTPAGE
Lloh24:
	ldr	x9, [x9, _USB_EXTRA_STATE_DISABLED@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	str	x9, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh26:
	adrp	x8, _usb_extra_manual@GOTPAGE
Lloh27:
	ldr	x8, [x8, _usb_extra_manual@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x10, _USB_EXTRA_STATE_DISABLED@GOTPAGE
Lloh30:
	ldr	x10, [x10, _USB_EXTRA_STATE_DISABLED@GOTPAGEOFF]
Lloh31:
	ldr	x0, [x10]
	cbz	x8, LBB0_10
; %bb.8:
	cmp	x9, x0
	b.ne	LBB0_16
; %bb.9:
Lloh32:
	adrp	x8, _USB_EXTRA_STATE_ENABLED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _USB_EXTRA_STATE_ENABLED@GOTPAGEOFF]
Lloh34:
	ldr	x0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_USB_ExtraSetState
LBB0_10:
Lloh35:
	adrp	x8, _USB_EXTRA_ADC_THRESHOLD@GOTPAGE
Lloh36:
	ldr	x8, [x8, _USB_EXTRA_ADC_THRESHOLD@GOTPAGEOFF]
Lloh37:
	ldr	d1, [x8]
Lloh38:
	adrp	x8, _USB_EXTRA_STATE_ENABLED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _USB_EXTRA_STATE_ENABLED@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cmp	x9, x0
	b.ne	LBB0_13
; %bb.11:
	fcmp	d0, d1
	b.pl	LBB0_13
; %bb.12:
	mov	x0, x8
	b	LBB0_15
LBB0_13:
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	fcmp	d0, d1
	b.le	LBB0_16
LBB0_15:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_USB_ExtraSetState
LBB0_16:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_usb_host_port,8,3              ; @usb_host_port
	.comm	_USB_HOST_PORT_1,8,3            ; @USB_HOST_PORT_1
	.comm	_ADC_CON2,4,2                   ; @ADC_CON2
	.comm	_USB_HOST_PORT_2,8,3            ; @USB_HOST_PORT_2
	.comm	_ADC_CON1,4,2                   ; @ADC_CON1
	.comm	_adc_extra,8,3                  ; @adc_extra
	.comm	_usb_extra_state,8,3            ; @usb_extra_state
	.comm	_USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG,8,3 ; @USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG
	.comm	_USB_EXTRA_ADC_THRESHOLD,8,3    ; @USB_EXTRA_ADC_THRESHOLD
	.comm	_USB_EXTRA_STATE_DISABLED,8,3   ; @USB_EXTRA_STATE_DISABLED
	.comm	_usb_extra_manual,8,3           ; @usb_extra_manual
	.comm	_USB_EXTRA_STATE_ENABLED,8,3    ; @USB_EXTRA_STATE_ENABLED
.subsections_via_symbols
