	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_ivc_init                 ## -- Begin function tegra_ivc_init
	.p2align	4, 0x90
_tegra_ivc_init:                        ## @tegra_ivc_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	testq	%rdi, %rdi
	sete	%al
	cmpq	$0, 32(%rbp)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r12
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jae	LBB0_5
## %bb.4:
	movq	_E2BIG@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	16(%rbp), %edx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_tegra_ivc_check_params
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	%r12d, %edi
	imull	16(%rbp), %edi
	callq	_tegra_ivc_total_queue_size
	testq	%r13, %r13
	je	LBB0_11
## %bb.7:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rax, %r15
	movq	%rax, %rdx
	callq	_dma_map_single
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 40(%rbx)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, 40(%rax)
	movq	%rax, %rbx
	movq	%r15, 64(%rax)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movq	40(%rbp), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 32(%rbx)
	movq	%r14, 56(%rbx)
	movq	%r13, 80(%rbx)
	movq	32(%rbp), %rcx
	movq	%rcx, (%rbx)
	movq	%rax, 72(%rbx)
	movq	24(%rbp), %rax
	movq	%rax, 8(%rbx)
	movl	16(%rbp), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 48(%rbx)
	movq	$0, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%r13, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_dma_map_single
	movq	%rax, 64(%rbx)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	40(%rbx), %rsi
	movl	(%r12), %ecx
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_dma_unmap_single
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_ivc_init                 ; -- Begin function tegra_ivc_init
	.p2align	2
_tegra_ivc_init:                        ; @tegra_ivc_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x7
	mov	x19, x6
	mov	x26, x5
	mov	x22, x4
	mov	x27, x3
	mov	x21, x2
	mov	x24, x1
	mov	x23, x0
	ldr	x28, [x29, #16]
	cmp	x0, #0
	ccmp	x28, #0, #4, ne
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
Lloh2:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x20
	b.hs	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _E2BIG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_tegra_ivc_check_params
	tbnz	w0, #31, LBB0_11
; %bb.5:
	mul	w0, w20, w19
	bl	_tegra_ivc_total_queue_size
	cbz	x24, LBB0_12
; %bb.6:
	mov	x25, x0
Lloh7:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh8:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x24
	mov	x1, x21
	mov	x2, x25
	bl	_dma_map_single
	mov	x1, x0
	str	x0, [x23, #40]
	mov	x0, x24
	bl	_dma_mapping_error
	cbnz	x0, LBB0_9
; %bb.7:
	ldr	w3, [x26]
	mov	x0, x24
	mov	x1, x22
	mov	x2, x25
	bl	_dma_map_single
	mov	x1, x0
	str	x0, [x23, #64]
	mov	x0, x24
	bl	_dma_mapping_error
	cbz	x0, LBB0_13
; %bb.8:
	ldr	x1, [x23, #40]
	ldr	w3, [x26]
	mov	x0, x24
	mov	x2, x25
	bl	_dma_unmap_single
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	str	x27, [x23, #40]
	str	x26, [x23, #64]
LBB0_13:
	mov	w0, #0
	ldr	x8, [x29, #24]
	stp	x8, x24, [x23, #72]
	stp	x28, x20, [x23]
	str	w19, [x23, #16]
	stp	xzr, x22, [x23, #48]
	stp	xzr, x21, [x23, #24]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
