	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpio_ir_tx
_gpio_ir_tx:                            ## @gpio_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$37, %rdi
	addl	%eax, %edi
	imull	(%r13), %edi
	movl	12(%r13), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIV_ROUND_CLOSEST
	movl	$100, %ecx
	subl	(%r13), %ecx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movslq	(%r14), %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$37, %rdi
	addl	%eax, %edi
	imull	%ecx, %edi
	movl	12(%r13), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %r15d
	leaq	4(%r13), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	movl	%eax, %r12d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %esi
	addl	$10, %esi
	movl	%ebx, %edi
	callq	_usleep_range
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%r12d, %r14d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %esi
	movl	%r12d, %edi
	callq	_ktime_add_us
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_ktime_get
	testb	$1, %bl
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ktime_us_delta
	movl	%eax, %ebx
	cmpl	$11, %eax
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_udelay
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	xorl	%eax, %eax
	callq	_ktime_get
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_ktime_before
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	8(%r13), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movl	%r14d, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ktime_add_ns
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	testl	%eax, %eax
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	%eax, %edi
	callq	_ndelay
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_ktime_add_ns
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	testl	%eax, %eax
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	%eax, %edi
	callq	_ndelay
	jmp	LBB0_14
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %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	_gpio_ir_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpio_ir_tx
_gpio_ir_tx:                            ; @gpio_ir_tx
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x26, [x0]
	ldr	w8, [x26]
Lloh0:
	adrp	x22, _NSEC_PER_SEC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NSEC_PER_SEC@GOTPAGEOFF]
	ldrsw	x9, [x22]
	mov	w23, #34079
	movk	w23, #20971, lsl #16
	mul	x9, x9, x23
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	mul	w0, w9, w8
	ldr	w1, [x26, #12]
	bl	_DIV_ROUND_CLOSEST
	mov	x21, x0
	ldr	w8, [x26]
	mov	w9, #100
	sub	w8, w9, w8
	ldrsw	x9, [x22]
	mul	x9, x9, x23
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	mul	w0, w9, w8
	ldr	w1, [x26, #12]
	bl	_DIV_ROUND_CLOSEST
	mov	x23, x0
	add	x22, x26, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	bl	_ktime_get
	cbz	w19, LBB0_15
; %bb.1:
	mov	x24, x0
	mov	x27, #0
	mov	w28, w19
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	add	w1, w25, #10
	mov	x0, x25
	bl	_usleep_range
	mov	x0, x22
	bl	_spin_lock_irqsave
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	cmp	x27, x28
	b.eq	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x25, x24
	ldr	w1, [x20, x27, lsl #2]
	mov	x0, x24
	bl	_ktime_add_us
	mov	x24, x0
	bl	_ktime_get
	mov	x1, x0
	tbnz	w27, #0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	bl	_ktime_get
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x1, x24
	bl	_ktime_before
	cbz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [x26, #8]
	mov	w1, #1
	bl	_gpiod_set_value
	mov	x0, x25
	mov	x1, x21
	bl	_ktime_add_ns
	mov	x25, x0
	bl	_ktime_get
	mov	x1, x0
	mov	x0, x25
	bl	_ktime_sub
	bl	_ktime_to_ns
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	bl	_ndelay
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [x26, #8]
	mov	w1, #0
	bl	_gpiod_set_value
	mov	x0, x25
	mov	x1, x23
	bl	_ktime_add_ns
	mov	x25, x0
	bl	_ktime_get
	mov	x1, x0
	mov	x0, x25
	bl	_ktime_sub
	bl	_ktime_to_ns
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	bl	_ndelay
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_ktime_us_delta
	mov	x25, x0
	cmp	w0, #11
	b.ge	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w25, #1
	b.lt	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_udelay
	b	LBB0_3
LBB0_15:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.no_dead_strip	_gpio_ir_tx
.subsections_via_symbols
