	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_set_configuration       ## -- Begin function libusb_set_configuration
	.p2align	4, 0x90
_libusb_set_configuration:              ## @libusb_set_configuration
	.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, %r12d
	movq	%rdi, %r15
	callq	_libusb_get_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	testl	%r12d, %r12d
	jle	LBB0_4
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_libusb20_dev_alloc_config
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rax), %r13d
	movq	%rax, %rdi
	callq	_free
	cmpl	%r12d, %r13d
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	cmpl	$255, %ebx
	jne	LBB0_7
	jmp	LBB0_1
LBB0_4:
	movl	$255, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_libusb10_cancel_all_transfer
	movl	4(%r14), %edi
	movq	%r14, %rsi
	callq	_libusb10_remove_pollfd
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_libusb20_dev_set_config_index
	movl	%eax, %ebx
	movl	4(%r14), %r12d
	movq	%r15, %rdi
	callq	_libusb20_dev_get_fd
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movq	_POLLOUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rcx), %r8d
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movq	_POLLWRNORM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movl	%r12d, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_libusb10_add_pollfd
	testl	%ebx, %ebx
	je	LBB0_2
LBB0_1:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_set_configuration       ; -- Begin function libusb_set_configuration
	.p2align	2
_libusb_set_configuration:              ; @libusb_set_configuration
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x19, x0
	bl	_libusb_get_device
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_libusb20_dev_alloc_config
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w23, [x0]
	bl	_free
	cmp	w23, w22
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	cmp	w21, #255
	b.ne	LBB0_3
LBB0_6:
Lloh0:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_7:
	mov	w21, #255
LBB0_8:
	mov	x0, x20
	bl	_libusb10_cancel_all_transfer
	ldr	w0, [x20, #4]
	mov	x1, x20
	bl	_libusb10_remove_pollfd
	mov	x0, x19
	mov	x1, x21
	bl	_libusb20_dev_set_config_index
	mov	x21, x0
	ldr	w22, [x20, #4]
	mov	x0, x19
	bl	_libusb20_dev_get_fd
	mov	x3, x0
Lloh3:
	adrp	x8, _POLLIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _POLLOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POLLOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w4, w8, w9
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_libusb10_add_pollfd
Lloh15:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w0, wzr, w8, eq
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
.subsections_via_symbols
