	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zilog_init
_zilog_init:                            ## @zilog_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movups	L___const.zilog_init.code_block(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	$12, %esi
	movl	$4096, %edi                     ## imm = 0x1000
	callq	_put_unaligned_be16
	movq	_ZILOG_INIT_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_send_data_block
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	8(%rbx), %edi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_i2c_master_recv
	movq	(%rbx), %rdi
	cmpl	$4, %eax
	jne	LBB0_2
## %bb.3:
	movl	-44(%rbp), %edx
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %r8d
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r14d, %r14d
	cmovsl	%r14d, %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	3                               ## @__const.zilog_init.code_block
L___const.zilog_init.code_block:
	.long	16                              ## 0x10
	.space	4
	.quad	0

	.comm	_ZILOG_INIT_END,4,2             ## @ZILOG_INIT_END
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to retrieve firmware version: %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Zilog/Hauppauge IR blaster firmware version %d.%d.%d\n"

	.no_dead_strip	_zilog_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zilog_init
_zilog_init:                            ; @zilog_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, l___const.zilog_init.code_block@PAGE
Lloh4:
	add	x8, x8, l___const.zilog_init.code_block@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp]
	mov	w0, #4096
	mov	w1, #12
	bl	_put_unaligned_be16
Lloh6:
	adrp	x8, _ZILOG_INIT_END@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ZILOG_INIT_END@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	bl	_send_data_block
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	add	x1, sp, #24
	mov	w2, #4
	bl	_i2c_master_recv
	mov	x20, x0
	ldr	x0, [x19]
	cmp	w20, #4
	b.ne	LBB0_3
; %bb.2:
	ldp	w2, w3, [sp, #28]
	ldr	w4, [sp, #36]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w0, w20, w8, lt
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	3                               ; @__const.zilog_init.code_block
l___const.zilog_init.code_block:
	.long	16                              ; 0x10
	.space	4
	.quad	0

	.comm	_ZILOG_INIT_END,4,2             ; @ZILOG_INIT_END
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to retrieve firmware version: %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Zilog/Hauppauge IR blaster firmware version %d.%d.%d\n"

	.no_dead_strip	_zilog_init
.subsections_via_symbols
