	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxusb_medion_set_mode
_cxusb_medion_set_mode:                 ## @cxusb_medion_set_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	callq	_mutex_lock
	movq	8(%r15), %rdi
	xorl	%esi, %esi
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.1:
	movl	$6, %edx
	callq	_usb_set_interface
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%eax, %r13d
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movl	$1, %edx
	callq	_usb_set_interface
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movl	%r13d, %edx
	callq	_dev_err
	jmp	LBB0_17
LBB0_6:
	movq	8(%r15), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_usb_rcvbulkpipe
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_usb_clear_halt
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_8:
	movq	8(%r15), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_usb_sndbulkpipe
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_usb_clear_halt
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	8(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_10:
	testl	%r14d, %r14d
	jne	LBB0_11
## %bb.12:
	movq	_CMD_ANALOG@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_CMD_DIGITAL@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_cxusb_ctrl_msg
	testl	%eax, %eax
	je	LBB0_14
## %bb.18:
	movl	%eax, %r14d
	movq	8(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%r14d, %r13d
	jmp	LBB0_17
LBB0_14:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movl	$1, (%rdi,%rbx,4)
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jb	LBB0_16
LBB0_17:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"digital interface selection failed (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"analog interface selection failed (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"clear halt on IN pipe failed (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"clear halt on OUT pipe failed (%d)\n"

	.comm	_CMD_DIGITAL,4,2                ## @CMD_DIGITAL
	.comm	_CMD_ANALOG,4,2                 ## @CMD_ANALOG
L_.str.4:                               ## @.str.4
	.asciz	"mode switch failed (%d)\n"

	.no_dead_strip	_cxusb_medion_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxusb_medion_set_mode
_cxusb_medion_set_mode:                 ; @cxusb_medion_set_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #16]
	bl	_mutex_lock
	ldr	x0, [x19, #8]
	mov	w1, #0
	cbz	w20, LBB0_3
; %bb.1:
	mov	w2, #6
	bl	_usb_set_interface
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_3:
	mov	w2, #1
	bl	_usb_set_interface
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_5:
	ldr	x21, [x19, #8]
	mov	x0, x21
	mov	w1, #1
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	cbz	w0, LBB0_7
; %bb.6:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_7:
	ldr	x21, [x19, #8]
	mov	x0, x21
	mov	w1, #1
	bl	_usb_sndbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	cbz	w0, LBB0_9
; %bb.8:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
LBB0_9:
Lloh8:
	adrp	x8, _CMD_DIGITAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_DIGITAL@GOTPAGEOFF]
Lloh10:
	adrp	x9, _CMD_ANALOG@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CMD_ANALOG@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	add	x4, sp, #12
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w5, #1
	bl	_cxusb_ctrl_msg
	cbz	w0, LBB0_13
; %bb.10:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_11:
	mov	x2, x21
	bl	_dev_err
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_16
; %bb.14:
	mov	x20, #0
	mov	w21, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	str	w21, [x0, x20, lsl #2]
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	cmp	x20, w0, uxtw
	b.lo	LBB0_15
LBB0_16:
	mov	w21, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"digital interface selection failed (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"analog interface selection failed (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"clear halt on IN pipe failed (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"clear halt on OUT pipe failed (%d)\n"

	.comm	_CMD_DIGITAL,4,2                ; @CMD_DIGITAL
	.comm	_CMD_ANALOG,4,2                 ; @CMD_ANALOG
l_.str.4:                               ; @.str.4
	.asciz	"mode switch failed (%d)\n"

	.no_dead_strip	_cxusb_medion_set_mode
.subsections_via_symbols
