	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smjpeg_write_packet
_smjpeg_write_packet:                   ## @smjpeg_write_packet
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	16(%rdi), %r15
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movq	(%rsi), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_SMJPEG_SNDD@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_SMJPEG_VIDD@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_avio_wl32
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	callq	_avio_wb32
	movq	24(%rbx), %rsi
	movq	%r14, %rdi
	callq	_avio_wb32
	movl	32(%rbx), %esi
	movq	24(%rbx), %rdx
	movq	%r14, %rdi
	callq	_avio_write
	movl	(%r15), %edi
	movq	8(%rbx), %rsi
	addq	16(%rbx), %rsi
	callq	_FFMAX
	movl	%eax, (%r15)
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_SMJPEG_SNDD,4,2                ## @SMJPEG_SNDD
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_SMJPEG_VIDD,4,2                ## @SMJPEG_VIDD
	.no_dead_strip	_smjpeg_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smjpeg_write_packet
_smjpeg_write_packet:                   ; @smjpeg_write_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldp	x20, x21, [x0, #8]
	ldr	x8, [x0]
	ldr	x9, [x1]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _SMJPEG_SNDD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMJPEG_SNDD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _SMJPEG_VIDD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMJPEG_VIDD@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_wl32
	ldr	x1, [x19, #16]
	mov	x0, x20
	bl	_avio_wb32
	ldr	x1, [x19, #24]
	mov	x0, x20
	bl	_avio_wb32
	ldr	w1, [x19, #32]
	ldr	x2, [x19, #24]
	mov	x0, x20
	bl	_avio_write
	ldr	w0, [x21]
	ldp	x9, x8, [x19, #8]
	add	x1, x9, x8
	bl	_FFMAX
	str	w0, [x21]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_SMJPEG_SNDD,4,2                ; @SMJPEG_SNDD
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_SMJPEG_VIDD,4,2                ; @SMJPEG_VIDD
	.no_dead_strip	_smjpeg_write_packet
.subsections_via_symbols
