	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_ir_tx
_pwm_ir_tx:                             ## @pwm_ir_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movq	8(%rbx), %r12
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	imull	%eax, %edi
	movl	$100, %esi
	callq	_DIV_ROUND_CLOSEST
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_pwm_config
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.1:
	movl	%eax, %ebx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%r14, %r13
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	testb	$1, %r14b
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_pwm_enable
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_pwm_disable
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15,%r14,4), %esi
	movl	%ebx, %edi
	callq	_ktime_add_us
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ktime_us_delta
	testq	%rax, %rax
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rsi
	addq	$10, %rsi
	movq	%rax, %rdi
	callq	_usleep_range
	jmp	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	callq	_pwm_disable
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.no_dead_strip	_pwm_ir_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_ir_tx
_pwm_ir_tx:                             ; @pwm_ir_tx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	ldr	x23, [x0]
	ldr	x21, [x23, #8]
Lloh0:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x23]
	bl	_DIV_ROUND_CLOSEST
	mov	x22, x0
	ldr	w8, [x23, #4]
	mul	w0, w8, w0
	mov	w1, #100
	bl	_DIV_ROUND_CLOSEST
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_pwm_config
	bl	_ktime_get
	cbz	w19, LBB0_8
; %bb.1:
	mov	x22, x0
	mov	x23, #0
	mov	w24, w19
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x24, x23
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	tbnz	w23, #0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_pwm_enable
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_pwm_disable
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20, x23, lsl #2]
	mov	x0, x22
	bl	_ktime_add_us
	mov	x22, x0
	bl	_ktime_get
	mov	x1, x0
	mov	x0, x22
	bl	_ktime_us_delta
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x0, #10
	bl	_usleep_range
	b	LBB0_2
LBB0_8:
	mov	x0, x21
	bl	_pwm_disable
	mov	x0, x19
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.no_dead_strip	_pwm_ir_tx
.subsections_via_symbols
