	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_rx51_tx
_ir_rx51_tx:                            ## @ir_rx51_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_WBUF_LEN@GOTPCREL(%rip), %r15
	cmpl	%edx, (%r15)
	jae	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_2:
	movl	%edx, %r14d
	movq	(%rdi), %rbx
	movq	(%rbx), %rdi
	leal	(,%r14,4), %edx
	callq	_memcpy
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	shrl	$31, %esi
	callq	_wait_event_interruptible
	movq	%rbx, %rdi
	callq	_init_timing_params
	cmpl	%r14d, (%r15)
	jbe	LBB0_4
## %bb.3:
	movl	%r14d, %eax
	movq	(%rbx), %rcx
	movl	$-1, (%rcx,%rax,4)
LBB0_4:
	movq	%rbx, %rdi
	callq	_ir_rx51_on
	movl	$1, 8(%rbx)
	leaq	16(%rbx), %r15
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_US_TO_NS
	movl	%eax, %edi
	callq	_ns_to_ktime
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_hrtimer_start
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	shrl	$31, %esi
	callq	_wait_event_interruptible
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WBUF_LEN,4,2                   ## @WBUF_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.no_dead_strip	_ir_rx51_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_rx51_tx
_ir_rx51_tx:                            ; @ir_rx51_tx
	.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
Lloh0:
	adrp	x21, _WBUF_LEN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WBUF_LEN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w2
	b.hs	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_5
LBB0_2:
	mov	x19, x2
	ldr	x20, [x0]
	ldr	x0, [x20]
	lsl	w2, w2, #2
	bl	_memcpy
	ldp	w8, w0, [x20, #8]
	lsr	w1, w8, #31
	bl	_wait_event_interruptible
	mov	x0, x20
	bl	_init_timing_params
	ldr	w8, [x21]
	cmp	w8, w19
	b.ls	LBB0_4
; %bb.3:
	ldr	x8, [x20]
	mov	w9, #-1
	str	w9, [x8, w19, uxtw #2]
LBB0_4:
	mov	x0, x20
	bl	_ir_rx51_on
	mov	w8, #1
	str	w8, [x20, #8]
	add	x21, x20, #16
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_US_TO_NS
	bl	_ns_to_ktime
	mov	x1, x0
Lloh5:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_hrtimer_start
	ldp	w8, w0, [x20, #8]
	lsr	w1, w8, #31
	bl	_wait_event_interruptible
LBB0_5:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WBUF_LEN,4,2                   ; @WBUF_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.no_dead_strip	_ir_rx51_tx
.subsections_via_symbols
