	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mceusb_tx_ir
_mceusb_tx_ir:                          ## @mceusb_tx_ir
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	movq	_MCE_CMD_PORT_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_MCE_CMD_SETIRTXPORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_MCE_IRBUF_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%rbx), %eax
	movl	%eax, -52(%rbp)
	leaq	-60(%rbp), %rsi
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$12, %edx
	callq	_mce_command_out
	testl	%r14d, %r14d
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movl	%r14d, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_MCE_PACKET_SIZE@GOTPCREL(%rip), %r15
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	-96(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%r14,4), %eax
	movq	_MCE_TIME_UNIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	cmpl	%eax, %esi
	ja	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ecx, %edx
	callq	_mce_write
	xorl	%ecx, %ecx
	testl	%eax, %eax
	js	LBB0_8
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%ebx, %ebx
	je	LBB0_20
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, %eax
	cltd
	idivl	(%r15)
	testl	%edx, %edx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	(%r12), %eax
	decl	%eax
	cmpl	%eax, %ecx
	jl	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ecx, %edx
	callq	_mce_write
	xorl	%ecx, %ecx
	testl	%eax, %eax
	js	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	_MCE_IRDATA_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%ecx, %rdx
	incl	%ecx
	movl	%eax, (%r13,%rdx,4)
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	_MCE_MAX_PULSE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %edx
	movslq	%ecx, %rcx
	subl	%eax, %edx
	jbe	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	%eax, (%r13,%rcx,4)
	movl	%edx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%ebx, (%r13,%rcx,4)
	movl	%ebx, %eax
	xorl	%ebx, %ebx
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	xorl	%edx, %edx
	testb	$1, %r14b
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	_MCE_PULSE_BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=2
	orl	%edx, %eax
	movl	%eax, (%r13,%rcx,4)
	incl	%ecx
	cmpl	(%r12), %ecx
	jl	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	(%r15), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	jle	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	%esi, %edx
	cltq
	addl	%edx, (%r13,%rax,4)
	jmp	LBB0_18
LBB0_8:
	movl	%eax, %ecx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_1:
	xorl	%ecx, %ecx
LBB0_21:
	movq	_MCE_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_23
## %bb.22:
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	%esi, %edx
	cltq
	addl	%edx, (%r13,%rax,4)
LBB0_23:
	movq	_MCE_IRDATA_TRAILER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%ecx, %rdx
	incl	%ecx
	movl	%eax, (%r13,%rdx,4)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ecx, %edx
	callq	_mce_write
	testl	%eax, %eax
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	cmovsl	%eax, %ecx
LBB0_24:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	movl	%ecx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MCE_CMD_PORT_IR,4,2            ## @MCE_CMD_PORT_IR
	.comm	_MCE_CMD_SETIRTXPORTS,4,2       ## @MCE_CMD_SETIRTXPORTS
	.comm	_MCE_IRBUF_SIZE,4,2             ## @MCE_IRBUF_SIZE
	.comm	_MCE_TIME_UNIT,4,2              ## @MCE_TIME_UNIT
	.comm	_MCE_PACKET_SIZE,4,2            ## @MCE_PACKET_SIZE
	.comm	_MCE_IRDATA_HEADER,4,2          ## @MCE_IRDATA_HEADER
	.comm	_MCE_MAX_PULSE_LENGTH,4,2       ## @MCE_MAX_PULSE_LENGTH
	.comm	_MCE_PULSE_BIT,4,2              ## @MCE_PULSE_BIT
	.comm	_MCE_IRDATA_TRAILER,4,2         ## @MCE_IRDATA_TRAILER
	.no_dead_strip	_mceusb_tx_ir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mceusb_tx_ir
_mceusb_tx_ir:                          ; @mceusb_tx_ir
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x19, x2
	mov	x22, x1
	mov	x8, sp
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x20, [x0]
Lloh3:
	adrp	x8, _MCE_CMD_PORT_IR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCE_CMD_PORT_IR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MCE_CMD_SETIRTXPORTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MCE_CMD_SETIRTXPORTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-100]
Lloh9:
	adrp	x24, _MCE_IRBUF_SIZE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _MCE_IRBUF_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x20]
	stur	w8, [x29, #-92]
	sub	x1, x29, #100
	mov	x0, x20
	mov	w2, #12
	bl	_mce_command_out
Lloh13:
	adrp	x25, _MCE_PACKET_SIZE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MCE_PACKET_SIZE@GOTPAGEOFF]
	stur	w19, [x29, #-124]               ; 4-byte Folded Spill
	cbz	w19, LBB0_19
; %bb.1:
	mov	x26, #0
	mov	w2, #0
Lloh15:
	adrp	x28, _MCE_IRDATA_HEADER@GOTPAGE
Lloh16:
	ldr	x28, [x28, _MCE_IRDATA_HEADER@GOTPAGEOFF]
Lloh17:
	adrp	x23, _MCE_MAX_PULSE_LENGTH@GOTPAGE
Lloh18:
	ldr	x23, [x23, _MCE_MAX_PULSE_LENGTH@GOTPAGEOFF]
Lloh19:
	adrp	x27, _MCE_PULSE_BIT@GOTPAGE
Lloh20:
	ldr	x27, [x27, _MCE_PULSE_BIT@GOTPAGEOFF]
	mov	w8, w19
	stur	x8, [x29, #-112]                ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	ldur	x8, [x29, #-112]                ; 8-byte Folded Reload
	cmp	x26, x8
	b.eq	LBB0_20
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w8, [x22, x26, lsl #2]
Lloh21:
	adrp	x9, _MCE_TIME_UNIT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MCE_TIME_UNIT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w9, w8
	b.hi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	udiv	w19, w8, w9
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_mce_write
	tbnz	w0, #31, LBB0_23
; %bb.6:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	w2, #0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	cbz	w19, LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x25]
	sdiv	w9, w2, w8
	msub	w8, w9, w8, w2
	cbnz	w8, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x24]
	sub	w8, w8, #1
	cmp	w2, w8
	b.lt	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_mce_write
	tbnz	w0, #31, LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	w2, #0
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x28]
	str	w8, [x21, w2, sxtw #2]
	add	w8, w2, #1
	mov	x2, x8
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w9, [x23]
	sxtw	x8, w2
	subs	w10, w19, w9
	b.ls	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=2
	str	w9, [x21, x8, lsl #2]
	mov	x19, x10
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=2
	str	w19, [x21, x8, lsl #2]
	mov	x9, x19
	mov	w19, #0
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w10, [x27]
	tst	x26, #0x1
	csel	w10, w10, wzr, eq
	orr	w9, w9, w10
	str	w9, [x21, x8, lsl #2]
	add	w2, w8, #1
	ldr	w8, [x24]
	cmp	w2, w8
	b.lt	LBB0_7
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x25]
	sdiv	w9, w2, w8
	msub	w9, w9, w8, w2
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=2
	sub	w10, w2, w9
	sbfiz	x10, x10, #2, #32
	ldr	w11, [x21, x10]
	sub	w8, w9, w8
	add	w8, w8, w11
	str	w8, [x21, x10]
	b	LBB0_5
LBB0_19:
	mov	w2, #0
LBB0_20:
	ldr	w8, [x25]
	sdiv	w9, w2, w8
	msub	w9, w9, w8, w2
	cmp	w9, #1
	b.lt	LBB0_22
; %bb.21:
	sub	w10, w2, w9
	sbfiz	x10, x10, #2, #32
	ldr	w11, [x21, x10]
	sub	w8, w9, w8
	add	w8, w8, w11
	str	w8, [x21, x10]
LBB0_22:
Lloh24:
	adrp	x8, _MCE_IRDATA_TRAILER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MCE_IRDATA_TRAILER@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x8]
	add	w8, w2, #1
	str	w9, [x21, w2, sxtw #2]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x8
	bl	_mce_write
	cmp	w0, #0
	ldur	w8, [x29, #-124]                ; 4-byte Folded Reload
	csel	w0, w0, w8, lt
LBB0_23:
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MCE_CMD_PORT_IR,4,2            ; @MCE_CMD_PORT_IR
	.comm	_MCE_CMD_SETIRTXPORTS,4,2       ; @MCE_CMD_SETIRTXPORTS
	.comm	_MCE_IRBUF_SIZE,4,2             ; @MCE_IRBUF_SIZE
	.comm	_MCE_TIME_UNIT,4,2              ; @MCE_TIME_UNIT
	.comm	_MCE_PACKET_SIZE,4,2            ; @MCE_PACKET_SIZE
	.comm	_MCE_IRDATA_HEADER,4,2          ; @MCE_IRDATA_HEADER
	.comm	_MCE_MAX_PULSE_LENGTH,4,2       ; @MCE_MAX_PULSE_LENGTH
	.comm	_MCE_PULSE_BIT,4,2              ; @MCE_PULSE_BIT
	.comm	_MCE_IRDATA_TRAILER,4,2         ; @MCE_IRDATA_TRAILER
	.no_dead_strip	_mceusb_tx_ir
.subsections_via_symbols
