	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function headset_ramp
_headset_ramp:                          ## @headset_ramp
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movq	_TWL4030_REG_HS_GAIN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_twl4030_read_reg_cache
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	_TWL4030_REG_HS_POPN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_twl4030_read_reg_cache
	movl	%eax, %ebx
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	cmpq	$0, 8(%r13)
	je	LBB0_5
## %bb.2:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$1, %edi
	callq	*%rax
LBB0_5:
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_6:
	movq	_TWL4030_VMID_EN@GOTPCREL(%rip), %rax
	orb	(%rax), %bl
	movzbl	%bl, %r12d
	movq	_TWL4030_REG_HS_POPN_SET@GOTPCREL(%rip), %rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_twl4030_write
	movq	_TWL4030_REG_HS_GAIN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	-41(%rbp), %edx                 ## 1-byte Folded Reload
	movq	%r14, %rdi
	callq	_twl4030_write
	movq	_TWL4030_RAMP_EN@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ebx
	orq	%r12, %rbx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_twl4030_write
	movq	_TWL4030_RAMP_DELAY@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	andl	%ebx, %eax
	andl	$-4, %eax
	leaq	l___const.headset_ramp.ramp_base(%rip), %rcx
	movl	(%rax,%rcx), %eax
	xorl	%edx, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	divl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_mdelay
	testq	%r13, %r13
	jne	LBB0_9
	jmp	LBB0_12
LBB0_4:
	movq	_TWL4030_EXTMUTE@GOTPCREL(%rip), %rax
	orb	(%rax), %bl
	movq	_TWL4030_REG_HS_POPN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	callq	_twl4030_write
	testl	%r12d, %r12d
	jne	LBB0_6
LBB0_7:
	movq	_TWL4030_RAMP_EN@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	notb	%al
	andb	%al, %bl
	movq	_TWL4030_REG_HS_POPN_SET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movzbl	%bl, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_twl4030_write
	movq	_TWL4030_RAMP_DELAY@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	andl	%ebx, %eax
	andl	$252, %eax
	leaq	l___const.headset_ramp.ramp_base(%rip), %rcx
	movl	(%rax,%rcx), %eax
	xorl	%edx, %edx
	divl	(%r15)
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_mdelay
	movq	_TWL4030_MODULE_AUDIO_VOICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	andb	$-16, %cl
	movq	_TWL4030_REG_HS_GAIN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movzbl	%cl, %esi
	callq	_twl4030_i2c_write_u8
	movq	_TWL4030_VMID_EN@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	notb	%al
	andb	%al, %bl
	movl	(%r12), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	callq	_twl4030_write
	testq	%r13, %r13
	je	LBB0_12
LBB0_9:
	cmpq	$0, 8(%r13)
	je	LBB0_12
## %bb.10:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.13:
	xorl	%edi, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_TWL4030_EXTMUTE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	notb	%al
	andb	%al, %bl
	movq	_TWL4030_REG_HS_POPN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_twl4030_write                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.headset_ramp.ramp_base
l___const.headset_ramp.ramp_base:
	.long	524288                          ## 0x80000
	.long	1048576                         ## 0x100000
	.long	2097152                         ## 0x200000
	.long	4194304                         ## 0x400000
	.long	8388608                         ## 0x800000
	.long	16777216                        ## 0x1000000
	.long	33554432                        ## 0x2000000
	.long	67108864                        ## 0x4000000

	.comm	_TWL4030_REG_HS_GAIN_SET,4,2    ## @TWL4030_REG_HS_GAIN_SET
	.comm	_TWL4030_REG_HS_POPN_SET,4,2    ## @TWL4030_REG_HS_POPN_SET
	.comm	_TWL4030_EXTMUTE,1,0            ## @TWL4030_EXTMUTE
	.comm	_TWL4030_VMID_EN,1,0            ## @TWL4030_VMID_EN
	.comm	_TWL4030_RAMP_EN,1,0            ## @TWL4030_RAMP_EN
	.comm	_TWL4030_RAMP_DELAY,1,0         ## @TWL4030_RAMP_DELAY
	.comm	_TWL4030_MODULE_AUDIO_VOICE,4,2 ## @TWL4030_MODULE_AUDIO_VOICE
	.no_dead_strip	_headset_ramp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function headset_ramp
_headset_ramp:                          ; @headset_ramp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldp	x25, x8, [x0]
	ldr	x23, [x8]
Lloh0:
	adrp	x26, _TWL4030_REG_HS_GAIN_SET@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TWL4030_REG_HS_GAIN_SET@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_twl4030_read_reg_cache
	mov	x20, x0
Lloh2:
	adrp	x24, _TWL4030_REG_HS_POPN_SET@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TWL4030_REG_HS_POPN_SET@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_twl4030_read_reg_cache
	mov	x22, x0
	cbz	x23, LBB0_4
; %bb.1:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.3:
	mov	w0, #1
	blr	x8
LBB0_4:
	cbz	w21, LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _TWL4030_VMID_EN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TWL4030_VMID_EN@GOTPAGEOFF]
	ldrb	w8, [x8]
	orr	w21, w8, w22
	ldr	w1, [x24]
	and	w2, w21, #0xff
	mov	x0, x19
	bl	_twl4030_write
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x20
	bl	_twl4030_write
Lloh6:
	adrp	x8, _TWL4030_RAMP_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TWL4030_RAMP_EN@GOTPAGEOFF]
	ldrb	w8, [x8]
	orr	w20, w8, w21
	ldr	w1, [x24]
	and	w2, w20, #0xff
	mov	x0, x19
	bl	_twl4030_write
Lloh8:
	adrp	x8, _TWL4030_RAMP_DELAY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TWL4030_RAMP_DELAY@GOTPAGEOFF]
	ldrb	w8, [x8]
	and	w8, w8, w20
Lloh10:
	adrp	x9, l___const.headset_ramp.ramp_base@PAGE
Lloh11:
	add	x9, x9, l___const.headset_ramp.ramp_base@PAGEOFF
	and	x8, x8, #0xfc
	ldr	w8, [x9, x8]
	ldr	w9, [x25]
	udiv	w8, w8, w9
	add	w0, w8, #1
	bl	_mdelay
	cbnz	x23, LBB0_8
	b	LBB0_11
LBB0_6:
Lloh12:
	adrp	x8, _TWL4030_EXTMUTE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TWL4030_EXTMUTE@GOTPAGEOFF]
	ldrb	w8, [x8]
	orr	w22, w8, w22
	ldr	w1, [x24]
	and	w2, w22, #0xff
	mov	x0, x19
	bl	_twl4030_write
	cbnz	w21, LBB0_5
LBB0_7:
Lloh14:
	adrp	x8, _TWL4030_RAMP_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TWL4030_RAMP_EN@GOTPAGEOFF]
	ldrb	w8, [x8]
	bic	w21, w22, w8
	ldr	w1, [x24]
	and	w2, w21, #0xff
	mov	x0, x19
	bl	_twl4030_write
Lloh16:
	adrp	x8, _TWL4030_RAMP_DELAY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TWL4030_RAMP_DELAY@GOTPAGEOFF]
	ldrb	w8, [x8]
	and	w8, w8, w21
Lloh18:
	adrp	x9, l___const.headset_ramp.ramp_base@PAGE
Lloh19:
	add	x9, x9, l___const.headset_ramp.ramp_base@PAGEOFF
	and	x8, x8, #0xfc
	ldr	w8, [x9, x8]
	ldr	w9, [x25]
	udiv	w8, w8, w9
	add	w0, w8, #1
	bl	_mdelay
Lloh20:
	adrp	x8, _TWL4030_MODULE_AUDIO_VOICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TWL4030_MODULE_AUDIO_VOICE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w2, [x26]
	and	w1, w20, #0xf0
	bl	_twl4030_i2c_write_u8
Lloh23:
	adrp	x8, _TWL4030_VMID_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TWL4030_VMID_EN@GOTPAGEOFF]
	ldrb	w8, [x8]
	bic	w20, w21, w8
	ldr	w1, [x24]
	and	w2, w20, #0xff
	mov	x0, x19
	bl	_twl4030_write
	cbz	x23, LBB0_11
LBB0_8:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x1, [x23]
	cbz	x1, LBB0_12
; %bb.10:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	br	x1
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh25:
	adrp	x8, _TWL4030_EXTMUTE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TWL4030_EXTMUTE@GOTPAGEOFF]
	ldrb	w8, [x8]
	eor	w8, w8, #0xff
	and	w2, w20, w8
	ldr	w1, [x24]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_twl4030_write
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.headset_ramp.ramp_base
l___const.headset_ramp.ramp_base:
	.long	524288                          ; 0x80000
	.long	1048576                         ; 0x100000
	.long	2097152                         ; 0x200000
	.long	4194304                         ; 0x400000
	.long	8388608                         ; 0x800000
	.long	16777216                        ; 0x1000000
	.long	33554432                        ; 0x2000000
	.long	67108864                        ; 0x4000000

	.comm	_TWL4030_REG_HS_GAIN_SET,4,2    ; @TWL4030_REG_HS_GAIN_SET
	.comm	_TWL4030_REG_HS_POPN_SET,4,2    ; @TWL4030_REG_HS_POPN_SET
	.comm	_TWL4030_EXTMUTE,1,0            ; @TWL4030_EXTMUTE
	.comm	_TWL4030_VMID_EN,1,0            ; @TWL4030_VMID_EN
	.comm	_TWL4030_RAMP_EN,1,0            ; @TWL4030_RAMP_EN
	.comm	_TWL4030_RAMP_DELAY,1,0         ; @TWL4030_RAMP_DELAY
	.comm	_TWL4030_MODULE_AUDIO_VOICE,4,2 ; @TWL4030_MODULE_AUDIO_VOICE
	.no_dead_strip	_headset_ramp
.subsections_via_symbols
