	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vic_open_channel
_vic_open_channel:                      ## @vic_open_channel
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_to_vic
	movq	%rax, %r14
	movl	(%rax), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_vic_load_firmware
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	callq	_vic_boot
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movl	4(%r14), %edi
	callq	_host1x_channel_get
	movl	%eax, (%r15)
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %ebx
LBB0_8:
	movl	(%r14), %edi
	callq	_pm_runtime_put
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_vic_open_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vic_open_channel
_vic_open_channel:                      ; @vic_open_channel
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	bl	_to_vic
	mov	x19, x0
	ldr	w0, [x0]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_vic_load_firmware
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_vic_boot
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_host1x_channel_get
	str	w0, [x20]
	cbz	w0, LBB0_7
; %bb.4:
	mov	w21, #0
	b	LBB0_9
LBB0_5:
	mov	x21, x0
	b	LBB0_9
LBB0_6:
	mov	x21, x0
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	ldr	w0, [x19]
	bl	_pm_runtime_put
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_vic_open_channel
.subsections_via_symbols
