	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_usb_extigy_boot_quirk
_snd_usb_extigy_boot_quirk:             ## @snd_usb_extigy_boot_quirk
	.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	%rdi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_get_cfg_desc
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	_EXTIGY_FIRMWARE_SIZE_OLD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_get_cfg_desc
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	_EXTIGY_FIRMWARE_SIZE_NEW@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$16, %edx
	movl	$67, %ecx
	movl	$1, %r8d
	movl	$10, %r9d
	pushq	$0
	pushq	$0
	callq	_snd_usb_ctl_msg
	addq	$16, %rsp
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snd_printdd
LBB0_4:
	movq	_USB_DT_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r15), %rcx
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$4, %r8d
	callq	_usb_get_descriptor
	movq	(%r15), %r14
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snd_printdd
LBB0_6:
	movq	%r15, %rdi
	callq	_usb_reset_configuration
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snd_printdd
LBB0_8:
	movq	%r14, %rdi
	callq	_get_cfg_desc
	movl	(%rax), %edi
	callq	_le16_to_cpu
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTIGY_FIRMWARE_SIZE_OLD,4,2   ## @EXTIGY_FIRMWARE_SIZE_OLD
	.comm	_EXTIGY_FIRMWARE_SIZE_NEW,4,2   ## @EXTIGY_FIRMWARE_SIZE_NEW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending Extigy boot sequence...\n"

L_.str.1:                               ## @.str.1
	.asciz	"error sending boot message: %d\n"

	.comm	_USB_DT_DEVICE,4,2              ## @USB_DT_DEVICE
L_.str.2:                               ## @.str.2
	.asciz	"error usb_get_descriptor: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"error usb_reset_configuration: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"extigy_boot: new boot length = %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_snd_usb_extigy_boot_quirk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_usb_extigy_boot_quirk
_snd_usb_extigy_boot_quirk:             ; @snd_usb_extigy_boot_quirk
	.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
	ldr	x20, [x0]
	mov	x0, x20
	bl	_get_cfg_desc
	ldr	w0, [x0]
	bl	_le16_to_cpu
Lloh0:
	adrp	x8, _EXTIGY_FIRMWARE_SIZE_OLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTIGY_FIRMWARE_SIZE_OLD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_get_cfg_desc
	ldr	w0, [x0]
	bl	_le16_to_cpu
Lloh3:
	adrp	x8, _EXTIGY_FIRMWARE_SIZE_NEW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXTIGY_FIRMWARE_SIZE_NEW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
LBB0_2:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	mov	x0, x19
	mov	w2, #16
	mov	w3, #67
	mov	w4, #1
	mov	w5, #10
	mov	x6, #0
	mov	w7, #0
	bl	_snd_usb_ctl_msg
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_4
; %bb.3:
	str	x0, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printdd
LBB0_4:
Lloh10:
	adrp	x8, _USB_DT_DEVICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _USB_DT_DEVICE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x3, x19, #8
	mov	x0, x19
	mov	w2, #0
	mov	w4, #4
	bl	_usb_get_descriptor
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x20, [x19]
	tbz	w0, #31, LBB0_6
; %bb.5:
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_snd_printdd
LBB0_6:
	mov	x0, x19
	bl	_usb_reset_configuration
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_8
; %bb.7:
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_snd_printdd
LBB0_8:
	mov	x0, x20
	bl	_get_cfg_desc
	ldr	w0, [x0]
	bl	_le16_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_snd_printdd
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTIGY_FIRMWARE_SIZE_OLD,4,2   ; @EXTIGY_FIRMWARE_SIZE_OLD
	.comm	_EXTIGY_FIRMWARE_SIZE_NEW,4,2   ; @EXTIGY_FIRMWARE_SIZE_NEW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending Extigy boot sequence...\n"

l_.str.1:                               ; @.str.1
	.asciz	"error sending boot message: %d\n"

	.comm	_USB_DT_DEVICE,4,2              ; @USB_DT_DEVICE
l_.str.2:                               ; @.str.2
	.asciz	"error usb_get_descriptor: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"error usb_reset_configuration: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"extigy_boot: new boot length = %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_snd_usb_extigy_boot_quirk
.subsections_via_symbols
