	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_reset_tuner_gpio          ## -- Begin function ivtv_reset_tuner_gpio
	.p2align	4, 0x90
_ivtv_reset_tuner_gpio:                 ## @ivtv_reset_tuner_gpio
	.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	_XC2028_TUNER_RESET@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
	movq	_IVTV_REG_GPIO_OUT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_read_reg
	movl	%eax, %ebx
	movq	(%r14), %rax
	movb	(%rax), %al
	btrl	%eax, %ebx
	movl	(%r15), %esi
	movl	%ebx, %edi
	callq	_write_reg
	movl	$1, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	movq	(%r14), %rax
	movb	(%rax), %al
	btsl	%eax, %ebx
	movl	(%r15), %esi
	movl	%ebx, %edi
	callq	_write_reg
	movl	$1, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XC2028_TUNER_RESET,4,2         ## @XC2028_TUNER_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Resetting tuner\n"

	.comm	_IVTV_REG_GPIO_OUT,4,2          ## @IVTV_REG_GPIO_OUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_reset_tuner_gpio          ; -- Begin function ivtv_reset_tuner_gpio
	.p2align	2
_ivtv_reset_tuner_gpio:                 ; @ivtv_reset_tuner_gpio
	.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	x8, _XC2028_TUNER_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XC2028_TUNER_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	ldr	x20, [x0]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_INFO
Lloh5:
	adrp	x21, _IVTV_REG_GPIO_OUT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _IVTV_REG_GPIO_OUT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_read_reg
	ldr	x8, [x20]
	ldr	w8, [x8]
	mov	w22, #1
	lsl	w8, w22, w8
	bic	w19, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_write_reg
	mov	w0, #1
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	ldr	x8, [x20]
	ldr	w8, [x8]
	lsl	w8, w22, w8
	orr	w0, w8, w19
	ldr	w1, [x21]
	bl	_write_reg
	mov	w0, #1
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
LBB0_2:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_XC2028_TUNER_RESET,4,2         ; @XC2028_TUNER_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Resetting tuner\n"

	.comm	_IVTV_REG_GPIO_OUT,4,2          ; @IVTV_REG_GPIO_OUT
.subsections_via_symbols
