	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_retro_main_log_file_init       ## -- Begin function retro_main_log_file_init
	.p2align	4, 0x90
_retro_main_log_file_init:              ## @retro_main_log_file_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_log_file_initialized@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_1
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	_stderr@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_log_file_fp@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	testl	%esi, %esi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_fopen_utf8
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	$1, (%r15)
	movl	$1, %edi
	movl	$16384, %esi                    ## imm = 0x4000
	callq	_calloc
	movq	_log_file_buf@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	(%r14), %rdi
	movq	__IOFBF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rsi
	movl	$16384, %ecx                    ## imm = 0x4000
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setvbuf                        ## TAILCALL
LBB0_5:
	movq	(%r12), %rax
	movq	%rax, (%r14)
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RARCH_ERR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_log_file_initialized,4,2       ## @log_file_initialized
	.comm	_stderr,8,3                     ## @stderr
	.comm	_log_file_fp,8,3                ## @log_file_fp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ab"

L_.str.1:                               ## @.str.1
	.asciz	"wb"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to open system event log file: %s\n"

	.comm	_log_file_buf,8,3               ## @log_file_buf
	.comm	__IOFBF,4,2                     ## @_IOFBF
	.comm	_logging_mtx,4,2                ## @logging_mtx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_retro_main_log_file_init       ; -- Begin function retro_main_log_file_init
	.p2align	2
_retro_main_log_file_init:              ; @retro_main_log_file_init
	.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
Lloh0:
	adrp	x21, _log_file_initialized@GOTPAGE
Lloh1:
	ldr	x21, [x21, _log_file_initialized@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x22, _stderr@GOTPAGE
Lloh3:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh4:
	adrp	x20, _log_file_fp@GOTPAGE
Lloh5:
	ldr	x20, [x20, _log_file_fp@GOTPAGEOFF]
	str	x8, [x20]
	cbz	x0, LBB0_1
; %bb.3:
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w1, #0
	csel	x1, x9, x8, eq
	mov	x0, x19
	bl	_fopen_utf8
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x21]
	mov	w0, #1
	mov	w1, #16384
	bl	_calloc
	mov	x1, x0
Lloh10:
	adrp	x8, _log_file_buf@GOTPAGE
Lloh11:
	ldr	x8, [x8, _log_file_buf@GOTPAGEOFF]
Lloh12:
	str	x0, [x8]
Lloh13:
	adrp	x8, __IOFBF@GOTPAGE
Lloh14:
	ldr	x8, [x8, __IOFBF@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh15:
	ldr	w2, [x8]
	mov	w3, #16384
	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
	b	_setvbuf
LBB0_5:
	ldr	x8, [x22]
	str	x8, [x20]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	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
	b	_RARCH_ERR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_log_file_initialized,4,2       ; @log_file_initialized
	.comm	_stderr,8,3                     ; @stderr
	.comm	_log_file_fp,8,3                ; @log_file_fp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ab"

l_.str.1:                               ; @.str.1
	.asciz	"wb"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to open system event log file: %s\n"

	.comm	_log_file_buf,8,3               ; @log_file_buf
	.comm	__IOFBF,4,2                     ; @_IOFBF
	.comm	_logging_mtx,4,2                ; @logging_mtx
.subsections_via_symbols
