	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_exec_create_output_file
_do_exec_create_output_file:            ## @do_exec_create_output_file
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %r9
	movl	%edi, %ecx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_cur_transaction_hash@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rdx
	leaq	-144(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	_snprintf
	xorl	%edi, %edi
	cmpl	$128, %eax
	setl	%dil
	callq	_assert
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, -148(%rbp)
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	-144(%rbp), %rdi
	callq	_unlink
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	_F_SETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_fcntl
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	leaq	-148(%rbp), %rdi
	callq	_fd_close
	movl	$-3, %ebx
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	leaq	-144(%rbp), %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	movl	$-1, %ebx
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	leaq	-144(%rbp), %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	leaq	-148(%rbp), %rdi
	callq	_fd_close
	movl	$-2, %ebx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".c%d.%s.%s"

	.comm	_cur_transaction_hash,8,3       ## @cur_transaction_hash
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_EXCL,4,2                     ## @O_EXCL
L_.str.1:                               ## @.str.1
	.asciz	"create_output_file: creat (%s, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0000) failed. %m\n"

L_.str.2:                               ## @.str.2
	.asciz	"create_output_file: unlink (%s) failed. %m\n"

	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.3:                               ## @.str.3
	.asciz	"create_output_file: fcntl (%d, F_SETFD, FD_CLOEXEC) failed. %m\n"

	.no_dead_strip	_do_exec_create_output_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_exec_create_output_file
_do_exec_create_output_file:            ; @do_exec_create_output_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x5, x1
	mov	x3, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _cur_transaction_hash@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cur_transaction_hash@GOTPAGEOFF]
Lloh5:
	ldr	x4, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	add	x20, sp, #24
	add	x0, sp, #24
	mov	w1, #128
	bl	_snprintf
	cmp	w0, #128
	cset	w0, lt
	bl	_assert
Lloh8:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w8, w9
	add	x0, sp, #24
	mov	w2, #0
	bl	_open
	str	w0, [sp, #20]
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x20, sp, #24
	add	x0, sp, #24
	bl	_unlink
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh20:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_fcntl
	tbz	x0, #63, LBB0_6
; %bb.3:
	str	x19, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
	add	x0, sp, #20
	bl	_fd_close
	mov	w19, #-3
	b	LBB0_6
LBB0_4:
	str	x20, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
	mov	w19, #-1
	b	LBB0_6
LBB0_5:
	str	x20, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
	add	x0, sp, #20
	bl	_fd_close
	mov	w19, #-2
LBB0_6:
	ldur	x8, [x29, #-24]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".c%d.%s.%s"

	.comm	_cur_transaction_hash,8,3       ; @cur_transaction_hash
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_EXCL,4,2                     ; @O_EXCL
l_.str.1:                               ; @.str.1
	.asciz	"create_output_file: creat (%s, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0000) failed. %m\n"

l_.str.2:                               ; @.str.2
	.asciz	"create_output_file: unlink (%s) failed. %m\n"

	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.3:                               ; @.str.3
	.asciz	"create_output_file: fcntl (%d, F_SETFD, FD_CLOEXEC) failed. %m\n"

	.no_dead_strip	_do_exec_create_output_file
.subsections_via_symbols
