	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_tempfile                ## -- Begin function avpriv_tempfile
	.p2align	4, 0x90
_avpriv_tempfile:                       ## @avpriv_tempfile
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	_file_log_ctx_class@GOTPCREL(%rip), %eax
	movl	%eax, -48(%rbp)
	movslq	%edx, %rax
	movq	%rax, -40(%rbp)
	movq	%rcx, -32(%rbp)
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_tempnam
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_tempnam
	movq	%rax, %rbx
LBB0_2:
	movq	%rbx, %rdi
	callq	_av_strdup
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_free
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.4:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	leaq	L_.str.2(%rip), %rdx
	leaq	-48(%rbp), %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r14, %rdi
	callq	_av_freep
	movl	%ebx, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	leaq	-48(%rbp), %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_file_log_ctx_class,4,2         ## @file_log_ctx_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"ff_tempfile: Cannot allocate file name\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"ff_tempfile: Cannot open temporary file %s\n"

	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.comm	_O_EXCL,4,2                     ## @O_EXCL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_tempfile                ; -- Begin function avpriv_tempfile
	.p2align	2
_avpriv_tempfile:                       ; @avpriv_tempfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _file_log_ctx_class@GOTPAGE
Lloh1:
	ldr	x8, [x8, _file_log_ctx_class@GOTPAGEOFF]
	str	w8, [sp, #8]
	sxtw	x8, w2
	stp	x8, x3, [sp, #16]
	mov	x0, #0
	mov	x1, x20
	bl	_tempnam
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_tempnam
	mov	x21, x0
LBB0_2:
	mov	x0, x21
	bl	_av_strdup
	str	x0, [x19]
	mov	x0, x21
	bl	_free
	ldr	x0, [x19]
	cbz	x0, LBB0_5
; %bb.3:
Lloh4:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #384
	bl	_open
	tbz	w0, #31, LBB0_6
; %bb.4:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	x8, [x19]
	str	x8, [sp]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	bl	_av_log
	mov	x0, x19
	bl	_av_freep
	mov	x0, x20
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_av_log
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_file_log_ctx_class,4,2         ; @file_log_ctx_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"ff_tempfile: Cannot allocate file name\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"ff_tempfile: Cannot open temporary file %s\n"

	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.comm	_O_EXCL,4,2                     ; @O_EXCL
.subsections_via_symbols
