	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sox_write_header
_sox_write_header:                      ## @sox_write_header
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r13
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_strlen
	movq	%rax, %r12
LBB0_2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_FFALIGN
	movq	%rax, %r12
	movq	_SOX_FIXED_HDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r12, %rax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx)
	movq	(%r15), %rax
	movq	_AV_CODEC_ID_PCM_S32LE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%rdx, %rbx
	callq	_ffio_wfourcc
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_avio_wl32
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_wl64
	movl	16(%r15), %edi
	callq	_av_double2int
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_avio_wl64
	movq	8(%r15), %rsi
	movq	%r13, %rdi
	callq	_avio_wl32
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_avio_wl32
	jmp	LBB0_6
LBB0_4:
	movq	_AV_CODEC_ID_PCM_S32BE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movq	%rdx, %rbx
	callq	_ffio_wfourcc
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_avio_wb32
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_wb64
	movl	16(%r15), %edi
	callq	_av_double2int
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_avio_wb64
	movq	8(%r15), %rsi
	movq	%r13, %rdi
	callq	_avio_wb32
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_avio_wb32
LBB0_6:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_avio_write
LBB0_8:
	subq	%r14, %r12
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_ffio_fill
	movq	%r13, %rdi
	callq	_avio_flush
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"comment"

	.comm	_SOX_FIXED_HDR,8,3              ## @SOX_FIXED_HDR
	.comm	_AV_CODEC_ID_PCM_S32LE,8,3      ## @AV_CODEC_ID_PCM_S32LE
L_.str.1:                               ## @.str.1
	.asciz	".SoX"

	.comm	_AV_CODEC_ID_PCM_S32BE,8,3      ## @AV_CODEC_ID_PCM_S32BE
L_.str.2:                               ## @.str.2
	.asciz	"XoS."

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"invalid codec; use pcm_s32le or pcm_s32be\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sox_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sox_write_header
_sox_write_header:                      ; @sox_write_header
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x0
	ldp	x19, x25, [x0, #16]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x24, [x8]
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_strlen
	mov	x21, x0
	b	LBB0_3
LBB0_2:
	mov	x21, #0
LBB0_3:
	mov	x0, x21
	mov	w1, #8
	bl	_FFALIGN
	mov	x22, x0
Lloh2:
	adrp	x8, _SOX_FIXED_HDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOX_FIXED_HDR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x8, x0
	str	x8, [x25]
	ldr	x8, [x24]
Lloh5:
	adrp	x9, _AV_CODEC_ID_PCM_S32LE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_CODEC_ID_PCM_S32LE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ffio_wfourcc
	ldr	x1, [x25]
	mov	x0, x19
	bl	_avio_wl32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wl64
	ldr	w0, [x24, #16]
	bl	_av_double2int
	mov	x1, x0
	mov	x0, x19
	bl	_avio_wl64
	ldr	x1, [x24, #8]
	mov	x0, x19
	bl	_avio_wl32
	mov	x0, x19
	mov	x1, x22
	bl	_avio_wl32
	cbz	x21, LBB0_6
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_avio_write
LBB0_6:
	sub	x2, x22, x21
	mov	x0, x19
	mov	w1, #0
	bl	_ffio_fill
	mov	x0, x19
	bl	_avio_flush
	mov	w0, #0
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh10:
	adrp	x9, _AV_CODEC_ID_PCM_S32BE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AV_CODEC_ID_PCM_S32BE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ffio_wfourcc
	ldr	x1, [x25]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb64
	ldr	w0, [x24, #16]
	bl	_av_double2int
	mov	x1, x0
	mov	x0, x19
	bl	_avio_wb64
	ldr	x1, [x24, #8]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	x1, x22
	bl	_avio_wb32
	cbnz	x21, LBB0_5
	b	LBB0_6
LBB0_9:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x23
	bl	_av_log
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"comment"

	.comm	_SOX_FIXED_HDR,8,3              ; @SOX_FIXED_HDR
	.comm	_AV_CODEC_ID_PCM_S32LE,8,3      ; @AV_CODEC_ID_PCM_S32LE
l_.str.1:                               ; @.str.1
	.asciz	".SoX"

	.comm	_AV_CODEC_ID_PCM_S32BE,8,3      ; @AV_CODEC_ID_PCM_S32BE
l_.str.2:                               ; @.str.2
	.asciz	"XoS."

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"invalid codec; use pcm_s32le or pcm_s32be\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sox_write_header
.subsections_via_symbols
