	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zilog_tx
_zilog_tx:                              ## @zilog_tx
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r14
	movl	$4, -64(%rbp)
	leaq	-64(%rbp), %rcx
	callq	_zilog_ir_format
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.1:
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.2:
	movq	_ZILOG_UIR_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	callq	_send_data_block
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.3:
	movl	16(%r14), %edi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_master_recv
	movq	8(%r14), %rdi
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.4:
	movl	-56(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	-56(%rbp), %edx
	movq	_ZILOG_STATUS_OK@GOTPCREL(%rip), %rcx
	movq	_ZILOG_STATUS_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	cmpl	%eax, %edx
	jne	LBB0_11
## %bb.5:
	movl	$0, -56(%rbp)
	movq	_ZILOG_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	16(%r14), %edi
	leaq	-56(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_master_send
	movq	8(%r14), %rdi
	cmpl	$2, %eax
	jne	LBB0_12
## %bb.6:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$1, %r12d
	leaq	-56(%rbp), %r13
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movl	$50, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout
	movl	16(%r14), %edi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_i2c_master_send
	cmpl	$1, %eax
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	incl	%r12d
	cmpl	$21, %r12d
	jne	LBB0_7
## %bb.9:
	movq	8(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_13
LBB0_10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_22
LBB0_11:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_13:
	movl	%ebx, %edx
	callq	_dev_err
	testl	%ebx, %ebx
	jns	LBB0_20
	jmp	LBB0_22
LBB0_14:
	movl	16(%r14), %edi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_master_recv
	cmpl	$1, %eax
	jne	LBB0_17
## %bb.15:
	movl	-56(%rbp), %edx
	movq	8(%r14), %rdi
	movq	_ZILOG_STATUS_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_18
## %bb.16:
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r15d, %ebx
	jmp	LBB0_22
LBB0_17:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	jmp	LBB0_19
LBB0_18:
	leaq	L_.str.7(%rip), %rsi
LBB0_19:
	callq	_dev_err
LBB0_20:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_21:
	subl	(%rax), %ebx
LBB0_22:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ZILOG_UIR_END,4,2              ## @ZILOG_UIR_END
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_master_recv failed with %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"code set status: %02x\n"

	.comm	_ZILOG_STATUS_OK,4,2            ## @ZILOG_STATUS_OK
	.comm	_ZILOG_STATUS_SET,4,2           ## @ZILOG_STATUS_SET
L_.str.2:                               ## @.str.2
	.asciz	"unexpected IR TX response %02x\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ZILOG_SEND,4,2                 ## @ZILOG_SEND
L_.str.3:                               ## @.str.3
	.asciz	"i2c_master_send failed with %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"send command sent\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
L_.str.5:                               ## @.str.5
	.asciz	"NAK expected: i2c_master_send failed with %d (try %d)\n"

L_.str.6:                               ## @.str.6
	.asciz	"IR TX chip never got ready: last i2c_master_send failed with %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"unexpected IR TX response #2: %02x\n"

L_.str.8:                               ## @.str.8
	.asciz	"transmit complete\n"

	.no_dead_strip	_zilog_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zilog_tx
_zilog_tx:                              ; @zilog_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x19, [x0]
	mov	w8, #4
	str	w8, [sp, #24]
	add	x3, sp, #24
	bl	_zilog_ir_format
	mov	x21, x0
	cbnz	w0, LBB0_17
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_17
; %bb.2:
Lloh3:
	adrp	x8, _ZILOG_UIR_END@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ZILOG_UIR_END@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	bl	_send_data_block
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	w0, [x19, #16]
	add	x1, sp, #32
	mov	w2, #1
	bl	_i2c_master_recv
	mov	x21, x0
	ldr	x0, [x19, #8]
	cmp	w21, #1
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [sp, #32]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w2, [sp, #32]
Lloh8:
	adrp	x23, _ZILOG_STATUS_OK@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ZILOG_STATUS_OK@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh10:
	adrp	x9, _ZILOG_STATUS_SET@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ZILOG_STATUS_SET@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w2, w8
	b.ne	LBB0_11
; %bb.5:
Lloh13:
	adrp	x8, _ZILOG_SEND@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ZILOG_SEND@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #32]
	ldr	w0, [x19, #16]
	add	x1, sp, #32
	mov	w2, #2
	bl	_i2c_master_send
	mov	x21, x0
	ldr	x0, [x19, #8]
	cmp	w21, #2
	b.ne	LBB0_13
; %bb.6:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	mov	w24, #1
Lloh18:
	adrp	x25, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh19:
	ldr	x25, [x25, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh20:
	adrp	x22, l_.str.5@PAGE
Lloh21:
	add	x22, x22, l_.str.5@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	bl	_set_current_state
	mov	w0, #50
	bl	_msecs_to_jiffies
	bl	_schedule_timeout
	ldr	w0, [x19, #16]
	add	x1, sp, #32
	mov	w2, #1
	bl	_i2c_master_send
	cmp	w0, #1
	b.eq	LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x21, x0
	ldr	x0, [x19, #8]
	stp	x21, x24, [sp]
	mov	x1, x22
	bl	_dev_dbg
	add	w24, w24, #1
	cmp	w24, #21
	b.ne	LBB0_7
; %bb.9:
	ldr	x0, [x19, #8]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_16
LBB0_11:
	ldr	x0, [x19, #8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	bl	_dev_err
	b	LBB0_15
LBB0_13:
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	mov	x2, x21
	bl	_dev_err
	tbnz	w21, #31, LBB0_16
LBB0_15:
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_17:
	ldr	x8, [sp, #40]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.18:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_19:
	ldr	w0, [x19, #16]
	add	x1, sp, #32
	mov	w2, #1
	bl	_i2c_master_recv
	cmp	w0, #1
	b.ne	LBB0_22
; %bb.20:
	ldr	w2, [sp, #32]
	ldr	w8, [x23]
	ldr	x0, [x19, #8]
	cmp	w2, w8
	b.ne	LBB0_23
; %bb.21:
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_dbg
	mov	x21, x20
	b	LBB0_16
LBB0_22:
	ldr	x0, [x19, #8]
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	b	LBB0_12
LBB0_23:
Lloh40:
	adrp	x1, l_.str.7@PAGE
Lloh41:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_12
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_ZILOG_UIR_END,4,2              ; @ZILOG_UIR_END
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_master_recv failed with %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"code set status: %02x\n"

	.comm	_ZILOG_STATUS_OK,4,2            ; @ZILOG_STATUS_OK
	.comm	_ZILOG_STATUS_SET,4,2           ; @ZILOG_STATUS_SET
l_.str.2:                               ; @.str.2
	.asciz	"unexpected IR TX response %02x\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ZILOG_SEND,4,2                 ; @ZILOG_SEND
l_.str.3:                               ; @.str.3
	.asciz	"i2c_master_send failed with %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"send command sent\n"

	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
l_.str.5:                               ; @.str.5
	.asciz	"NAK expected: i2c_master_send failed with %d (try %d)\n"

l_.str.6:                               ; @.str.6
	.asciz	"IR TX chip never got ready: last i2c_master_send failed with %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"unexpected IR TX response #2: %02x\n"

l_.str.8:                               ; @.str.8
	.asciz	"transmit complete\n"

	.no_dead_strip	_zilog_tx
.subsections_via_symbols
