	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camera_buffer_callback
_camera_buffer_callback:                ## @camera_buffer_callback
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_10
## %bb.1:
	movl	(%r13), %r12d
	movq	8(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.2:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	4(%rax), %esi
	imull	(%rax), %esi
	movl	%r12d, %edi
	callq	_vcos_min
	movl	%eax, %r12d
LBB0_3:
	xorl	%edx, %edx
	movl	$0, %ebx
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.4:
	cmpq	$0, 16(%r15)
	movl	$0, %ebx
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_mmal_buffer_header_mem_lock
	movl	8(%r13), %edi
	movq	16(%r15), %rcx
	movl	$1, %esi
	movl	%r12d, %edx
	callq	_fwrite
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mmal_buffer_header_mem_unlock
	xorl	%edx, %edx
LBB0_6:
	cmpl	$0, (%r13)
	je	LBB0_9
## %bb.7:
	cmpl	%r12d, %ebx
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_vcos_log_error
	movl	$1, %edx
LBB0_9:
	movq	_MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPCREL(%rip), %rax
	movq	_MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 4(%r13)
	movl	$1, %ebx
	cmovel	%edx, %ebx
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vcos_log_error
LBB0_11:
	movq	%r13, %rdi
	callq	_mmal_buffer_header_release
	cmpq	$0, (%r14)
	je	LBB0_15
## %bb.12:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mmal_port_send_buffer
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_error
LBB0_15:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.17:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_semaphore_post            ## TAILCALL
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to write buffer to file - aborting %d vs %d"

	.comm	_MMAL_BUFFER_HEADER_FLAG_FRAME_END,4,2 ## @MMAL_BUFFER_HEADER_FLAG_FRAME_END
	.comm	_MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED,4,2 ## @MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Received a camera still buffer callback with no state"

	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"Unable to return the buffer to the camera still port"

	.no_dead_strip	_camera_buffer_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camera_buffer_callback
_camera_buffer_callback:                ; @camera_buffer_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	cbz	x19, LBB0_6
; %bb.1:
	ldr	w22, [x21]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	mul	w1, w8, w9
	mov	x0, x22
	bl	_vcos_min
	mov	x22, x0
LBB0_3:
	cbz	w22, LBB0_7
; %bb.4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_mmal_buffer_header_mem_lock
	ldr	w0, [x21, #8]
	ldr	x3, [x19, #16]
	mov	w1, #1
	mov	x2, x22
	bl	_fwrite
	mov	x23, x0
	mov	x0, x21
	bl	_mmal_buffer_header_mem_unlock
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_error
	mov	w22, #0
	b	LBB0_12
LBB0_7:
	mov	w23, #0
LBB0_8:
	mov	w8, #0
	ldr	w9, [x21]
	cbz	w9, LBB0_11
; %bb.9:
	cmp	w23, w22
	b.eq	LBB0_11
; %bb.10:
	stp	x23, x22, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_error
	mov	w8, #1
LBB0_11:
	ldr	w9, [x21, #4]
Lloh4:
	adrp	x10, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MMAL_BUFFER_HEADER_FLAG_FRAME_END@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
Lloh7:
	adrp	x11, _MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED@GOTPAGE
Lloh8:
	ldr	x11, [x11, _MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	csinc	w22, w8, wzr, eq
LBB0_12:
	mov	x0, x21
	bl	_mmal_buffer_header_release
	ldr	x8, [x20]
	cbz	x8, LBB0_16
; %bb.13:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	cbz	x0, LBB0_15
; %bb.14:
	mov	x1, x0
	mov	x0, x20
	bl	_mmal_port_send_buffer
Lloh10:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_16
LBB0_15:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_error
LBB0_16:
	cbz	w22, LBB0_18
; %bb.17:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_vcos_semaphore_post
LBB0_18:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to write buffer to file - aborting %d vs %d"

	.comm	_MMAL_BUFFER_HEADER_FLAG_FRAME_END,4,2 ; @MMAL_BUFFER_HEADER_FLAG_FRAME_END
	.comm	_MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED,4,2 ; @MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Received a camera still buffer callback with no state"

	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"Unable to return the buffer to the camera still port"

	.no_dead_strip	_camera_buffer_callback
.subsections_via_symbols
