	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chassis_frontend_write_pidfile ## -- Begin function chassis_frontend_write_pidfile
	.p2align	4, 0x90
_chassis_frontend_write_pidfile:        ## @chassis_frontend_write_pidfile
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_getpid
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_g_strdup_printf
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movq	_G_FILE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_g_file_error_from_errno
	movl	%eax, %r13d
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_g_strerror
	movl	%eax, %r10d
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movq	%r15, %r9
	xorl	%eax, %eax
	pushq	%r10
	pushq	%rbx
	callq	_g_set_error
	addq	$16, %rsp
	movl	$-1, %r13d
LBB0_4:
	movq	%rbx, %rdi
	callq	_g_free
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_5
LBB0_1:
	movq	_G_FILE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_g_file_error_from_errno
	movl	%eax, %r12d
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%rbx), %edi
	callq	_g_strerror
	movslq	%eax, %rbx
	subq	$8, %rsp
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %r8d
	movq	%r15, %r9
	xorl	%eax, %eax
	pushq	%rbx
	callq	_g_set_error
	addq	$16, %rsp
	movl	$-1, %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_G_FILE_ERROR,4,2               ## @G_FILE_ERROR
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: open(%s) failed: %s"

	.comm	_G_STRLOC,4,2                   ## @G_STRLOC
L_.str.1:                               ## @.str.1
	.asciz	"%d"

L_.str.2:                               ## @.str.2
	.asciz	"%s: write(%s) of %s failed: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chassis_frontend_write_pidfile ; -- Begin function chassis_frontend_write_pidfile
	.p2align	2
_chassis_frontend_write_pidfile:        ; @chassis_frontend_write_pidfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #384
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_getpid
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_g_strdup_printf
	mov	x22, x0
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_write
	tbnz	x0, #63, LBB0_4
; %bb.2:
	mov	w19, #0
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _G_FILE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _G_FILE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
Lloh14:
	adrp	x24, _errno@GOTPAGE
Lloh15:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_g_file_error_from_errno
	mov	x22, x0
Lloh16:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	ldr	w0, [x24]
	bl	_g_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x6, w0
Lloh19:
	adrp	x3, l_.str@PAGE
Lloh20:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x4, x23
	mov	x5, x19
	bl	_g_set_error
	mov	w19, #-1
	b	LBB0_6
LBB0_4:
Lloh21:
	adrp	x8, _G_FILE_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _G_FILE_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w23, [x8]
Lloh24:
	adrp	x26, _errno@GOTPAGE
Lloh25:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_g_file_error_from_errno
	mov	x24, x0
Lloh26:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh28:
	ldr	w25, [x8]
	ldr	w0, [x26]
	bl	_g_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh29:
	adrp	x3, l_.str.2@PAGE
Lloh30:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	mov	x4, x25
	mov	x5, x19
	mov	x6, x22
	bl	_g_set_error
	mov	w19, #-1
LBB0_5:
	mov	x0, x22
	bl	_g_free
	mov	x0, x21
	bl	_close
LBB0_6:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_G_FILE_ERROR,4,2               ; @G_FILE_ERROR
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: open(%s) failed: %s"

	.comm	_G_STRLOC,4,2                   ; @G_STRLOC
l_.str.1:                               ; @.str.1
	.asciz	"%d"

l_.str.2:                               ; @.str.2
	.asciz	"%s: write(%s) of %s failed: %s"

.subsections_via_symbols
