	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function main
LCPI0_0:
	.quad	0x408f400000000000              ## double 1000
LCPI0_1:
	.quad	0x412e848000000000              ## double 1.0E+6
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -1096(%rbp)
	cmpl	$2, %edi
	jl	LBB0_4
## %bb.1:
	leaq	8(%rbx), %r12
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	%rbx, %r12
	jmp	LBB0_6
LBB0_5:
	decl	%r15d
LBB0_6:
	xorl	%eax, %eax
	callq	_vcos_init
	leaq	-1076(%rbp), %rdi
	callq	_vchi_initialise
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_str.13(%rip), %rdi
	jmp	LBB0_29
LBB0_8:
	movl	-1076(%rbp), %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_vchi_connect
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_str.12(%rip), %rdi
	jmp	LBB0_29
LBB0_10:
	movl	-1076(%rbp), %edi
	leaq	-1096(%rbp), %rsi
	movl	$1, %edx
	callq	_vc_vchi_gencmd_init
	cmpl	$2, %r15d
	jl	LBB0_27
## %bb.11:
	movb	$0, -1072(%rbp)
	movq	8(%r12), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	xorl	%ecx, %ecx
	movq	%rax, -1088(%rbp)               ## 8-byte Spill
	cmpq	$1, %rax
	adcl	$1, %ecx
	cmpl	%r15d, %ecx
	jae	LBB0_14
## %bb.12:
	movl	%ecx, %ebx
	movl	%r15d, %r14d
	xorl	%eax, %eax
	leaq	-1072(%rbp), %r13
	leaq	L_.str.5(%rip), %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rsi
	movq	%r13, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	movq	%rax, %rcx
	callq	_vcos_safe_strcpy
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	movq	%rax, %rcx
	callq	_vcos_safe_strcpy
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_13
LBB0_14:
	movq	-1088(%rbp), %rbx               ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.15:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_16:
	xorl	%eax, %eax
	callq	_clock
	movq	%rax, %r15
LBB0_17:
	leaq	L_.str.6(%rip), %rdi
	leaq	-1072(%rbp), %rsi
	callq	_vc_gencmd_send
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.7(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_19:
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_vc_gencmd_read_response
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.8(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_21:
	testq	%rbx, %rbx
	jne	LBB0_23
## %bb.22:
	xorl	%eax, %eax
	callq	_clock
	subq	%r15, %rax
	cvtsi2sd	%rax, %xmm0
	movq	_CLOCKS_PER_SEC@GOTPCREL(%rip), %rax
	divsd	(%rax), %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	leaq	L_.str.9(%rip), %rdi
	movb	$3, %al
	callq	_printf
LBB0_23:
	cmpb	$0, -1072(%rbp)
	je	LBB0_27
## %bb.24:
	movq	%r14, %rdi
	callq	_strlen
	cltq
	cmpb	$10, -1(%rax,%r14)
	jne	LBB0_26
## %bb.25:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-1072(%rbp), %rdi
	callq	_fputs
	jmp	LBB0_27
LBB0_26:
	leaq	-1072(%rbp), %rdi
	callq	_puts
LBB0_27:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vc_gencmd_stop
	movl	-1076(%rbp), %edi
	callq	_vchi_disconnect
	testq	%rax, %rax
	je	LBB0_30
## %bb.28:
	leaq	L_str(%rip), %rdi
LBB0_29:
	callq	_puts
	movl	$-1, %ebx
LBB0_30:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_32
## %bb.31:
	movl	%ebx, %eax
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0"

L_.str.1:                               ## @.str.1
	.asciz	"1"

L_.str.4:                               ## @.str.4
	.asciz	"-t"

L_.str.5:                               ## @.str.5
	.asciz	" "

L_.str.6:                               ## @.str.6
	.asciz	"%s"

L_.str.7:                               ## @.str.7
	.asciz	"vc_gencmd_send returned %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"vc_gencmd_read_response returned %d\n"

	.comm	_CLOCKS_PER_SEC,8,3             ## @CLOCKS_PER_SEC
L_.str.9:                               ## @.str.9
	.asciz	"Time took %f seconds (%f msecs) (%f usecs)\n"

	.comm	_stdout,4,2                     ## @stdout
L_str:                                  ## @str
	.asciz	"VCHI disconnect failed"

L_str.12:                               ## @str.12
	.asciz	"VCHI connection failed"

L_str.13:                               ## @str.13
	.asciz	"VCHI initialization failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1072
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	xzr, [sp, #24]
	cmp	w0, #2
	b.lt	LBB0_3
; %bb.1:
	mov	x21, x19
	ldr	x0, [x21, #8]!
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_4
LBB0_3:
	mov	x21, x19
	b	LBB0_5
LBB0_4:
	sub	w20, w20, #1
LBB0_5:
	bl	_vcos_init
	add	x0, sp, #36
	bl	_vchi_initialise
	cbz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x0, l_str.13@PAGE
Lloh8:
	add	x0, x0, l_str.13@PAGEOFF
	b	LBB0_28
LBB0_7:
	ldr	w2, [sp, #36]
	mov	w1, #0
	bl	_vchi_connect
	cbz	x0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x0, l_str.12@PAGE
Lloh10:
	add	x0, x0, l_str.12@PAGEOFF
	b	LBB0_28
LBB0_9:
	ldr	w0, [sp, #36]
	mov	w22, #1
	add	x1, sp, #24
	mov	w2, #1
	bl	_vc_vchi_gencmd_init
	cmp	w20, #2
	b.lt	LBB0_26
; %bb.10:
	strb	wzr, [sp, #40]
	ldr	x0, [x21, #8]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	mov	x19, x0
	cmp	x0, #0
	cinc	w8, w22, eq
	cmp	w8, w20
	b.hs	LBB0_13
; %bb.11:
	mov	x3, #0
	mov	w9, w20
	add	x21, x21, w8, uxtw #3
	sub	x22, x9, w8, uxtw
Lloh13:
	adrp	x20, l_.str.5@PAGE
Lloh14:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x21], #8
	add	x0, sp, #40
	mov	w2, #1024
	bl	_vcos_safe_strcpy
	mov	x3, x0
	add	x0, sp, #40
	mov	x1, x20
	mov	w2, #1024
	bl	_vcos_safe_strcpy
	mov	x3, x0
	subs	x22, x22, #1
	b.ne	LBB0_12
LBB0_13:
	cbz	x19, LBB0_15
; %bb.14:
	mov	x20, #0
	b	LBB0_16
LBB0_15:
	bl	_clock
	mov	x20, x0
LBB0_16:
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	add	x1, sp, #40
	bl	_vc_gencmd_send
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_18
; %bb.17:
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
LBB0_18:
	add	x0, sp, #40
	mov	w1, #1024
	bl	_vc_gencmd_read_response
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_20
; %bb.19:
	str	x0, [sp]
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
LBB0_20:
	cbnz	x19, LBB0_22
; %bb.21:
	bl	_clock
	sub	x8, x0, x20
	scvtf	d0, x8
Lloh21:
	adrp	x8, _CLOCKS_PER_SEC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CLOCKS_PER_SEC@GOTPAGEOFF]
Lloh23:
	ldr	d1, [x8]
	fdiv	d0, d0, d1
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fmul	d1, d0, d1
	mov	x8, #145685290680320
	movk	x8, #16686, lsl #48
	fmov	d2, x8
	fmul	d2, d0, d2
	stp	d1, d2, [sp, #8]
	str	d0, [sp]
Lloh24:
	adrp	x0, l_.str.9@PAGE
Lloh25:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
LBB0_22:
	ldrb	w8, [sp, #40]
	cbz	w8, LBB0_26
; %bb.23:
	add	x19, sp, #40
	add	x0, sp, #40
	bl	_strlen
	add	x8, x19, w0, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #10
	b.ne	LBB0_25
; %bb.24:
Lloh26:
	adrp	x8, _stdout@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	x0, sp, #40
	bl	_fputs
	b	LBB0_26
LBB0_25:
	add	x0, sp, #40
	bl	_puts
LBB0_26:
	bl	_vc_gencmd_stop
	ldr	w0, [sp, #36]
	bl	_vchi_disconnect
	cbz	x0, LBB0_29
; %bb.27:
Lloh29:
	adrp	x0, l_str@PAGE
Lloh30:
	add	x0, x0, l_str@PAGEOFF
LBB0_28:
	bl	_puts
	mov	w0, #-1
LBB0_29:
	ldur	x8, [x29, #-56]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.30:
	add	sp, sp, #1072
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0"

l_.str.1:                               ; @.str.1
	.asciz	"1"

l_.str.4:                               ; @.str.4
	.asciz	"-t"

l_.str.5:                               ; @.str.5
	.asciz	" "

l_.str.6:                               ; @.str.6
	.asciz	"%s"

l_.str.7:                               ; @.str.7
	.asciz	"vc_gencmd_send returned %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"vc_gencmd_read_response returned %d\n"

	.comm	_CLOCKS_PER_SEC,8,3             ; @CLOCKS_PER_SEC
l_.str.9:                               ; @.str.9
	.asciz	"Time took %f seconds (%f msecs) (%f usecs)\n"

	.comm	_stdout,4,2                     ; @stdout
l_str:                                  ; @str
	.asciz	"VCHI disconnect failed"

l_str.12:                               ; @str.12
	.asciz	"VCHI connection failed"

l_str.13:                               ; @str.13
	.asciz	"VCHI initialization failed"

.subsections_via_symbols
