	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_guc_log_relay_open       ## -- Begin function intel_guc_log_relay_open
	.p2align	4, 0x90
_intel_guc_log_relay_open:              ## @intel_guc_log_relay_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_intel_guc_log_relay_enabled
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_3:
	subl	(%rax), %ebx
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_i915_has_memcpy_from_wc
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movq	%r14, %rdi
	callq	_guc_log_relay_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.9:
	movq	%r14, %rdi
	callq	_guc_log_map
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_guc_log_relay_destroy
	jmp	LBB0_4
LBB0_11:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_guc_log_enable_flush_events
	movq	_system_highpri_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r14
	movq	%r14, %rsi
	callq	_queue_work
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_system_highpri_wq,4,2          ## @system_highpri_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_guc_log_relay_open       ; -- Begin function intel_guc_log_relay_open
	.p2align	2
_intel_guc_log_relay_open:              ; @intel_guc_log_relay_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x19
	bl	_intel_guc_log_relay_enabled
	cbz	x0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _EEXIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	_i915_has_memcpy_from_wc
	cbz	w0, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_guc_log_relay_create
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.9:
	mov	x0, x19
	bl	_guc_log_map
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_guc_log_relay_destroy
	b	LBB0_4
LBB0_11:
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_guc_log_enable_flush_events
Lloh7:
	adrp	x8, _system_highpri_wq@GOTPAGE
Lloh8:
	ldr	x8, [x8, _system_highpri_wq@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_queue_work
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_system_highpri_wq,4,2          ; @system_highpri_wq
.subsections_via_symbols
