	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_usbmidi_in_endpoint_create
_snd_usbmidi_in_endpoint_create:        ## @snd_usbmidi_in_endpoint_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	$0, (%rdx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r12, 8(%rax)
	movq	_INPUT_URBS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	_INPUT_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jb	LBB0_5
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	movl	(%r12), %edi
	movl	4(%rax), %esi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.8:
	callq	_usb_rcvintpipe
	jmp	LBB0_10
LBB0_9:
	callq	_usb_rcvbulkpipe
LBB0_10:
	movl	%eax, %esi
	movl	(%r12), %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	callq	_usb_maxpacket
	movl	%eax, %r13d
	movq	_INPUT_URBS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_17
## %bb.11:
	movq	(%r14), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	movl	%r13d, %r8d
	pushq	%rbx
	pushq	%r14
	callq	_usb_fill_int_urb
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	addq	$16, %rsp
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rdx
	movl	%ecx, (%rdx)
	incq	%r15
	movq	_INPUT_URBS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpq	%rcx, %r15
	jae	LBB0_17
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%rax,%r15,8), %rcx
	addq	$4, %rcx
	movl	%r13d, %esi
	callq	_usb_buffer_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ebx
	movq	(%r14), %rcx
	movq	(%rcx,%r15,8), %rdi
	movl	(%r12), %esi
	movq	_snd_usbmidi_in_urb_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	subq	$8, %rsp
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	movl	%r13d, %r8d
	pushq	%r14
	callq	_usb_fill_bulk_urb
	jmp	LBB0_16
LBB0_6:
	movq	%r14, %rdi
	callq	_snd_usbmidi_in_endpoint_delete
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INPUT_URBS,4,2                 ## @INPUT_URBS
	.comm	_snd_usbmidi_in_urb_complete,4,2 ## @snd_usbmidi_in_urb_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_snd_usbmidi_in_endpoint_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_usbmidi_in_endpoint_create
_snd_usbmidi_in_endpoint_create:        ; @snd_usbmidi_in_endpoint_create
	.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	x23, x2
	mov	x20, x1
	mov	x21, x0
	str	xzr, [x2]
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_16
; %bb.1:
	mov	x22, x0
	str	x21, [x0, #8]
Lloh2:
	adrp	x26, _INPUT_URBS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _INPUT_URBS@GOTPAGEOFF]
	ldr	w8, [x26]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x19, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	w0, #0
	bl	_usb_alloc_urb
	ldr	x8, [x22]
	lsl	x9, x19, #3
	str	x0, [x8, x9]
	ldr	x8, [x22]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #1
	ldr	w8, [x26]
	cmp	x19, x8
	b.lo	LBB0_3
LBB0_5:
	ldr	w0, [x21]
	ldp	w8, w1, [x20]
	str	x23, [sp, #8]                   ; 8-byte Folded Spill
	cbz	w8, LBB0_7
; %bb.6:
	bl	_usb_rcvintpipe
	b	LBB0_8
LBB0_7:
	bl	_usb_rcvbulkpipe
LBB0_8:
	mov	x23, x0
	ldr	w0, [x21]
	mov	x1, x23
	mov	w2, #0
	bl	_usb_maxpacket
	ldr	w8, [x26]
	cbz	w8, LBB0_17
; %bb.9:
	mov	x24, x0
	mov	x27, #0
	ldr	x8, [x22]
Lloh4:
	adrp	x28, _snd_usbmidi_in_urb_complete@GOTPAGE
Lloh5:
	ldr	x28, [x28, _snd_usbmidi_in_urb_complete@GOTPAGEOFF]
Lloh6:
	adrp	x19, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh7:
	ldr	x19, [x19, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_usb_fill_int_urb
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x19]
	ldr	x8, [x22]
	ldr	x10, [x8, x27, lsl #3]
	str	w9, [x10]
	add	x27, x27, #1
	ldr	w9, [x26]
	cmp	x27, x9
	b.hs	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	w2, [x25]
	ldr	x8, [x8, x27, lsl #3]
	add	x3, x8, #4
	mov	x1, x24
	bl	_usb_buffer_alloc
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x3, x0
	ldr	w7, [x20]
	ldr	x8, [x22]
	ldr	x0, [x8, x27, lsl #3]
	ldr	w1, [x21]
	ldr	w5, [x28]
	mov	x2, x23
	mov	x4, x24
	mov	x6, x22
	cbnz	w7, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_usb_fill_bulk_urb
	b	LBB0_11
LBB0_15:
	mov	x0, x22
	bl	_snd_usbmidi_in_endpoint_delete
LBB0_16:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_17:
	mov	w0, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x22, [x8]
LBB0_18:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INPUT_URBS,4,2                 ; @INPUT_URBS
	.comm	_snd_usbmidi_in_urb_complete,4,2 ; @snd_usbmidi_in_urb_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_snd_usbmidi_in_endpoint_create
.subsections_via_symbols
