	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_trail
_open_trail:                            ## @open_trail
	.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	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_open
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	%eax, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$-1, %r12d
	movl	%eax, %edi
	movl	$-1, %esi
	movl	%r13d, %edx
	callq	_fchown
	testq	%rax, %rax
	js	LBB0_5
## %bb.2:
	movq	_S_IRGRP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r14), %esi
	movl	%ebx, %edi
	callq	_fchmod
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	movl	%ebx, %edi
	callq	_close
	movq	%r15, %rdi
	callq	_auditctl
	testq	%rax, %rax
	js	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	callq	_auditdist_link
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_5:
	movl	%ebx, %edi
	callq	_close
	movq	%r15, %rdi
	callq	_unlink
	jmp	LBB0_9
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	callq	_unlink
LBB0_8:
	movl	$-1, %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IRGRP,4,2                    ## @S_IRGRP
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_open_trail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_trail
_open_trail:                            ; @open_trail
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x23, _S_IRUSR@GOTPAGE
Lloh7:
	ldr	x23, [x23, _S_IRUSR@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_open
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	w1, #-1
	mov	x2, x22
	bl	_fchown
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _S_IRGRP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _S_IRGRP@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_fchmod
	tbnz	x0, #63, LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_close
	mov	x0, x19
	bl	_auditctl
	tbnz	x0, #63, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_auditdist_link
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	mov	x0, x21
	bl	_close
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_7:
	mov	x0, x19
	bl	_unlink
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IRGRP,4,2                    ; @S_IRGRP
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_open_trail
.subsections_via_symbols
