	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ims_pcu_buffers_alloc
_ims_pcu_buffers_alloc:                 ## @ims_pcu_buffers_alloc
	.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
	movq	%rdi, %r15
	movl	16(%rdi), %esi
	movl	20(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r15, %rcx
	callq	_usb_alloc_coherent
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	movl	20(%r15), %r14d
	movq	80(%r15), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_usb_rcvbulkpipe
	movq	8(%r15), %rcx
	movl	16(%r15), %r8d
	movq	_ims_pcu_irq@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	pushq	%r15
	callq	_usb_fill_bulk_urb
	addq	$16, %rsp
	movl	76(%r15), %edi
	movl	(%r12), %esi
	callq	_kmalloc
	movl	%eax, 32(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	20(%r15), %edi
	movl	48(%r15), %esi
	movl	(%r12), %edx
	leaq	36(%r15), %rcx
	callq	_usb_alloc_coherent
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	(%r12), %esi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_9
## %bb.14:
	movq	%rax, %rbx
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movl	36(%r15), %eax
	movl	%eax, (%rbx)
	movl	20(%r15), %r12d
	movq	56(%r15), %rax
	movl	4(%rax), %esi
	movl	%r12d, %edi
	callq	_usb_rcvintpipe
	movq	40(%r15), %rcx
	movl	48(%r15), %r8d
	movl	(%r13), %r9d
	movq	56(%r15), %rdx
	movl	(%rdx), %r10d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	pushq	%r10
	pushq	%r15
	callq	_usb_fill_int_urb
	addq	$16, %rsp
	jmp	LBB0_13
LBB0_1:
	movl	72(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_3:
	movl	72(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_12
LBB0_5:
	movl	72(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_7:
	movl	72(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	movl	72(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	48(%r15), %esi
	movq	40(%r15), %rdx
	movl	20(%r15), %edi
	movl	36(%r15), %ecx
	callq	_usb_free_coherent
LBB0_10:
	movl	32(%r15), %edi
	callq	_kfree
LBB0_11:
	movq	24(%r15), %rdi
	callq	_usb_free_urb
LBB0_12:
	negl	%r14d
	movl	20(%r15), %edi
	movl	16(%r15), %esi
	movq	8(%r15), %rdx
	movl	(%r15), %ecx
	callq	_usb_free_coherent
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for read buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate input URB\n"

	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.comm	_ims_pcu_irq,4,2                ## @ims_pcu_irq
L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate memory for write buffer\n"

	.no_dead_strip	_ims_pcu_buffers_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ims_pcu_buffers_alloc
_ims_pcu_buffers_alloc:                 ; @ims_pcu_buffers_alloc
	.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	x19, x0
	ldr	w0, [x0, #20]
	ldr	w1, [x19, #16]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x3, x19
	bl	_usb_alloc_coherent
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w1, [x22]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
Lloh2:
	adrp	x23, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh3:
	ldr	x23, [x23, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x0, #4]
	orr	w8, w9, w8
	ldr	w9, [x19]
	stp	w9, w8, [x0]
	ldr	w21, [x19, #20]
	ldr	x8, [x19, #80]
	ldr	w1, [x8]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	ldr	x3, [x19, #8]
	ldr	w4, [x19, #16]
Lloh4:
	adrp	x24, _ims_pcu_irq@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ims_pcu_irq@GOTPAGEOFF]
	ldr	w5, [x24]
	mov	x0, x20
	mov	x1, x21
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	ldr	w0, [x19, #76]
	ldr	w1, [x22]
	bl	_kmalloc
	str	w0, [x19, #32]
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w0, [x19, #20]
	ldr	w1, [x19, #48]
	add	x3, x19, #36
	ldr	w2, [x22]
	bl	_usb_alloc_coherent
	str	x0, [x19, #40]
	cbz	x0, LBB0_9
; %bb.4:
	ldr	w1, [x22]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x19, #64]
	cbz	x0, LBB0_10
; %bb.5:
	mov	x20, x0
	ldr	w8, [x23]
	ldr	w9, [x0, #4]
	orr	w8, w9, w8
	ldr	w9, [x19, #36]
	stp	w9, w8, [x0]
	ldr	w21, [x19, #20]
	ldr	x8, [x19, #56]
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_usb_rcvintpipe
	mov	x2, x0
	ldr	x3, [x19, #40]
	ldr	w4, [x19, #48]
	ldr	w5, [x24]
	ldr	x8, [x19, #56]
	ldr	w7, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	x6, x19
	bl	_usb_fill_int_urb
	mov	w20, #0
	b	LBB0_14
LBB0_6:
	ldr	w0, [x19, #72]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_7:
	ldr	w0, [x19, #72]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_8:
	ldr	w0, [x19, #72]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_9:
	ldr	w0, [x19, #72]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
	b	LBB0_11
LBB0_10:
	ldr	w0, [x19, #72]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	ldr	w0, [x19, #20]
	ldr	w1, [x19, #48]
	ldr	x2, [x19, #40]
	ldr	w3, [x19, #36]
	bl	_usb_free_coherent
LBB0_11:
	ldr	w0, [x19, #32]
	bl	_kfree
LBB0_12:
	ldr	x0, [x19, #24]
	bl	_usb_free_urb
LBB0_13:
	neg	w20, w20
	ldp	w1, w0, [x19, #16]
	ldr	x2, [x19, #8]
	ldr	w3, [x19]
	bl	_usb_free_coherent
LBB0_14:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for read buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate input URB\n"

	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.comm	_ims_pcu_irq,4,2                ; @ims_pcu_irq
l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate memory for write buffer\n"

	.no_dead_strip	_ims_pcu_buffers_alloc
.subsections_via_symbols
