	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Log_Open                       ## -- Begin function Log_Open
	.p2align	4, 0x90
_Log_Open:                              ## @Log_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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	_logfile@GOTPCREL(%rip), %r14
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	leaq	L_str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	(%r14), %rdi
	movq	_MAX_LOGFILENAMESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_strncpy
	movq	(%r14), %rsi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printf                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_logfile,16,3                   ## @logfile
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"log file %s is already opened\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"can't open the log file %s\n"

	.comm	_MAX_LOGFILENAMESIZE,4,2        ## @MAX_LOGFILENAMESIZE
L_.str.4:                               ## @.str.4
	.asciz	"Opened log %s\n"

L_str:                                  ## @str
	.asciz	"openlog <filename>"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Log_Open                       ; -- Begin function Log_Open
	.p2align	2
_Log_Open:                              ; @Log_Open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_strlen
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x20, _logfile@GOTPAGE
Lloh1:
	ldr	x20, [x20, _logfile@GOTPAGEOFF]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_puts
LBB0_5:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x20]
Lloh8:
	adrp	x8, _MAX_LOGFILENAMESIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_LOGFILENAMESIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_strncpy
	ldr	x8, [x20]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:
	str	x19, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_8:
	bl	_printf
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_logfile,16,3                   ; @logfile
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"log file %s is already opened\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"can't open the log file %s\n"

	.comm	_MAX_LOGFILENAMESIZE,4,2        ; @MAX_LOGFILENAMESIZE
l_.str.4:                               ; @.str.4
	.asciz	"Opened log %s\n"

l_str:                                  ; @str
	.asciz	"openlog <filename>"

.subsections_via_symbols
