	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camdd_alloc_buf
_camdd_alloc_buf:                       ## @camdd_alloc_buf
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	cmpl	$129, %esi
	jne	LBB0_1
## %bb.5:
	movl	(%r15), %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_warn
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
LBB0_2:
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	%rax, %rbx
	movl	%r12d, (%rax)
	movq	%r15, 24(%rax)
	cmpl	$129, %r12d
	jne	LBB0_9
## %bb.8:
	movl	(%r15), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, 16(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_STAILQ_INIT
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	$32, %esi
	callq	_warn
LBB0_4:
	movq	%r14, %rdi
	callq	_free
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate %u bytes"

L_.str.1:                               ## @.str.1
	.asciz	"unable to allocate %zu bytes"

	.no_dead_strip	_camdd_alloc_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camdd_alloc_buf
_camdd_alloc_buf:                       ; @camdd_alloc_buf
	.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	x21, x1
	mov	x20, x0
	cmp	w1, #129
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x20]
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	w1, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
	mov	x19, #0
LBB0_4:
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	str	w21, [x0]
	str	x20, [x0, #24]
	cmp	w21, #129
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x20]
	str	w8, [x22, #8]
	str	x19, [x22, #16]
LBB0_7:
	add	x0, x22, #4
	bl	_STAILQ_INIT
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #32
LBB0_9:
	bl	_warn
	mov	x0, x19
	bl	_free
	mov	x22, #0
LBB0_10:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate %u bytes"

l_.str.1:                               ; @.str.1
	.asciz	"unable to allocate %zu bytes"

	.no_dead_strip	_camdd_alloc_buf
.subsections_via_symbols
