	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_set_alt_interface_test     ## -- Begin function usb_set_alt_interface_test
	.p2align	4, 0x90
_usb_set_alt_interface_test:            ## @usb_set_alt_interface_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	%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
	movl	%edi, %ebx
	callq	_find_usb_device
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	%r15, %rdi
	callq	_libusb20_dev_get_config_index
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_libusb20_dev_alloc_config
	testq	%rax, %rax
	je	LBB0_17
## %bb.2:
	movq	%rax, %r12
	cmpl	$0, (%rax)
	movl	$0, %ebx
	je	LBB0_15
## %bb.3:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	movq	%r15, %rdi
	callq	_libusb20_dev_close
	incq	%r14
	movl	(%r12), %eax
	cmpq	%rax, %r14
	je	LBB0_15
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_libusb20_dev_detach_kernel_driver
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_libusb20_dev_open
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rax
	cmpl	$0, (%rax,%r14,4)
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	8(%r12), %rax
	cmpl	(%rax,%r14,4), %r13d
	je	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%r13d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_libusb20_dev_set_alt_index
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_printf
	incl	%ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%r13d, %eax
	movl	%eax, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_libusb20_dev_set_alt_index
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_printf
	incl	%ebx
	jmp	LBB0_14
LBB0_15:
	movq	%r15, %rdi
	callq	_libusb20_dev_free
	leaq	L_.str.5(%rip), %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_16:
	leaq	L_str.7(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_17:
	leaq	L_str.6(%rip), %rdi
	callq	_puts
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_libusb20_dev_free              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Starting set alternate setting test for VID=0x%04x PID=0x%04x\n"

L_.str.4:                               ## @.str.4
	.asciz	"ERROR on interface %d alt %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"\nTest summary\n============\nInterfaces tested: %d\nErrors: %d\n"

L_str:                                  ## @str
	.asciz	"ERROR could not open device"

L_str.6:                                ## @str.6
	.asciz	"Could not get configuration descriptor"

L_str.7:                                ## @str.7
	.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_alt_interface_test     ; -- Begin function usb_set_alt_interface_test
	.p2align	2
_usb_set_alt_interface_test:            ; @usb_set_alt_interface_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	bl	_find_usb_device
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	stp	x20, x21, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	mov	x0, x19
	bl	_libusb20_dev_get_config_index
	mov	x1, x0
	mov	x0, x19
	bl	_libusb20_dev_alloc_config
	cbz	x0, LBB0_16
; %bb.2:
	mov	x20, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_17
; %bb.3:
	mov	x27, #0
	mov	w26, #0
	mov	w25, #0
Lloh2:
	adrp	x21, l_.str.4@PAGE
Lloh3:
	add	x21, x21, l_.str.4@PAGEOFF
Lloh4:
	adrp	x22, l_str@PAGE
Lloh5:
	add	x22, x22, l_str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w25, #1
	mov	x0, x19
	bl	_libusb20_dev_close
	add	x27, x27, #1
	ldr	w8, [x20]
	cmp	x27, x8
	b.eq	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	x23, x27
	mov	x0, x19
	mov	x1, x27
	bl	_libusb20_dev_detach_kernel_driver
	mov	x0, x19
	mov	w1, #0
	bl	_libusb20_dev_open
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_puts
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x27, lsl #2]
	cbz	w8, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x27, lsl #2]
	cmp	w24, w8
	b.eq	LBB0_12
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w24, w24, #1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_libusb20_dev_set_alt_index
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	stp	x23, x24, [sp]
	mov	x0, x21
	bl	_printf
	add	w26, w26, #1
	b	LBB0_9
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w25, w24
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	bl	_libusb20_dev_set_alt_index
	cbz	x0, LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	stp	x23, xzr, [sp]
	mov	x0, x21
	bl	_printf
	add	w26, w26, #1
	b	LBB0_4
LBB0_15:
Lloh6:
	adrp	x0, l_str.7@PAGE
Lloh7:
	add	x0, x0, l_str.7@PAGEOFF
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_puts
LBB0_16:
Lloh8:
	adrp	x0, l_str.6@PAGE
Lloh9:
	add	x0, x0, l_str.6@PAGEOFF
	bl	_puts
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_libusb20_dev_free
LBB0_17:
	mov	w25, #0
	mov	w26, #0
LBB0_18:
	mov	x0, x19
	bl	_libusb20_dev_free
	stp	x25, x26, [sp]
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Starting set alternate setting test for VID=0x%04x PID=0x%04x\n"

l_.str.4:                               ; @.str.4
	.asciz	"ERROR on interface %d alt %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"\nTest summary\n============\nInterfaces tested: %d\nErrors: %d\n"

l_str:                                  ; @str
	.asciz	"ERROR could not open device"

l_str.6:                                ; @str.6
	.asciz	"Could not get configuration descriptor"

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

.subsections_via_symbols
