	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_set_config_test            ## -- Begin function usb_set_config_test
	.p2align	4, 0x90
_usb_set_config_test:                   ## @usb_set_config_test
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %ebx
	callq	_find_usb_device
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_libusb20_dev_open
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	leaq	L_str.8(%rip), %rdi
	callq	_puts
	jmp	LBB0_3
LBB0_15:
	leaq	L_str.9(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	%r14, %rdi
	movl	$255, %esi
	callq	_libusb20_dev_set_config_index
	movl	$1, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%r15d, %r15d
LBB0_6:
	movl	$254, %ebx
	leaq	L_.str.4(%rip), %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incl	%r15d
	addl	$-1, %ebx
	jae	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_libusb20_dev_set_config_index
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
	addl	$-1, %ebx
	jb	LBB0_7
LBB0_11:
	movq	%r14, %rdi
	callq	_libusb20_dev_get_device_desc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movl	(%rax), %edx
	incl	%edx
	jmp	LBB0_14
LBB0_12:
	movl	$1, %edx
LBB0_14:
	movl	$256, %esi                      ## imm = 0x100
	subl	%r15d, %esi
	cmpl	%esi, %edx
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.7(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.5(%rip), %rdi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_printf
LBB0_3:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_libusb20_dev_free              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"Starting set config test for VID=0x%04x PID=0x%04x\n"

L_.str.4:                               ## @.str.4
	.asciz	"Setting configuration %d was successful\n"

L_.str.5:                               ## @.str.5
	.asciz	"\n\nSet configuration summary\nValid count:  %d/%d %s\nFailed count: %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"(expected)"

L_.str.7:                               ## @.str.7
	.asciz	"(unexpected)"

L_str:                                  ## @str
	.asciz	"Unconfiguring USB device was successful"

L_str.8:                                ## @str.8
	.asciz	"Could not open USB device"

L_str.9:                                ## @str.9
	.asciz	"USB device not found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_set_config_test            ; -- Begin function usb_set_config_test
	.p2align	2
_usb_set_config_test:                   ; @usb_set_config_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x20, x0
	bl	_find_usb_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	bl	_libusb20_dev_open
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_str.8@PAGE
Lloh1:
	add	x0, x0, l_str.8@PAGEOFF
	bl	_puts
	b	LBB0_16
LBB0_3:
Lloh2:
	adrp	x0, l_str.9@PAGE
Lloh3:
	add	x0, x0, l_str.9@PAGEOFF
	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
	add	sp, sp, #80
	b	_puts
LBB0_4:
	stp	x20, x21, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	mov	x0, x19
	mov	w1, #255
	bl	_libusb20_dev_set_config_index
	cbz	w0, LBB0_6
; %bb.5:
	mov	w22, #1
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x0, l_str@PAGE
Lloh7:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w22, #0
LBB0_7:
	mov	w20, #254
Lloh8:
	adrp	x21, l_.str.4@PAGE
Lloh9:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w22, w22, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	sub	w20, w20, #1
	cmn	w20, #1
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_libusb20_dev_set_config_index
	cbnz	w0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	x20, [sp]
	mov	x0, x21
	bl	_printf
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	bl	_libusb20_dev_get_device_desc
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w8, [x0]
	add	w8, w8, #1
	b	LBB0_15
LBB0_14:
	mov	w8, #1
LBB0_15:
Lloh10:
	adrp	x9, l_.str.7@PAGE
Lloh11:
	add	x9, x9, l_.str.7@PAGEOFF
	mov	w10, #256
Lloh12:
	adrp	x11, l_.str.6@PAGE
Lloh13:
	add	x11, x11, l_.str.6@PAGEOFF
	sub	w10, w10, w22
	cmp	w8, w10
	csel	x9, x11, x9, eq
	stp	x10, x8, [sp]
	stp	x9, x22, [sp, #16]
Lloh14:
	adrp	x0, l_.str.5@PAGE
Lloh15:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
LBB0_16:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_libusb20_dev_free
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"Starting set config test for VID=0x%04x PID=0x%04x\n"

l_.str.4:                               ; @.str.4
	.asciz	"Setting configuration %d was successful\n"

l_.str.5:                               ; @.str.5
	.asciz	"\n\nSet configuration summary\nValid count:  %d/%d %s\nFailed count: %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"(expected)"

l_.str.7:                               ; @.str.7
	.asciz	"(unexpected)"

l_str:                                  ; @str
	.asciz	"Unconfiguring USB device was successful"

l_str.8:                                ; @str.8
	.asciz	"Could not open USB device"

l_str.9:                                ; @str.9
	.asciz	"USB device not found"

.subsections_via_symbols
