.section __TEXT,__text,regular,pure_instructions
.build_version macos, 10, 14 sdk_version 10, 14
.globl _garbageCollection ## -- Begin function garbageCollection
.p2align 4, 0x90
_garbageCollection: ## @garbageCollection
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl 8(%rax), %ecx
movl %ecx, -4(%rbp)
movl $0, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl -8(%rbp), %ecx
cmpl 8(%rax), %ecx
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movq (%rax), %rax
movslq -8(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq _free
movl -4(%rbp), %edx
addl $-1, %edx
movl %edx, -4(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_4:
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, %rdi
callq _free
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl -4(%rbp), %ecx
movl %ecx, 8(%rax)
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _safeMallocFunction ## -- Begin function safeMallocFunction
.p2align 4, 0x90
_safeMallocFunction: ## @safeMallocFunction
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %esi
imull -8(%rbp), %esi
movslq %esi, %rdi
callq _malloc
movq ___garbageCollector__@GOTPCREL(%rip), %rdi
movq %rax, -16(%rbp)
cmpl $0, 8(%rdi)
jne LBB1_2
## %bb.1:
movl $8, %edi
callq _malloc
movq ___garbageCollector__@GOTPCREL(%rip), %rdi
movq %rax, (%rdi)
jmp LBB1_3
LBB1_2:
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movq (%rax), %rcx
movl 8(%rax), %edx
addl $1, %edx
movslq %edx, %rax
shlq $3, %rax
movq %rcx, %rdi
movq %rax, %rsi
callq _realloc
movq ___garbageCollector__@GOTPCREL(%rip), %rcx
movq %rax, (%rcx)
LBB1_3:
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl 8(%rax), %ecx
addl $1, %ecx
movl %ecx, 8(%rax)
movq -16(%rbp), %rdx
movq (%rax), %rsi
movl 8(%rax), %ecx
subl $1, %ecx
movslq %ecx, %rax
movq %rdx, (%rsi,%rax,8)
movq -16(%rbp), %rax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _safeCallocFunction ## -- Begin function safeCallocFunction
.p2align 4, 0x90
_safeCallocFunction: ## @safeCallocFunction
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movslq -8(%rbp), %rdi
movslq -4(%rbp), %rsi
callq _calloc
movq ___garbageCollector__@GOTPCREL(%rip), %rsi
movq %rax, -16(%rbp)
cmpl $0, 8(%rsi)
jne LBB2_2
## %bb.1:
movl $8, %edi
callq _malloc
movq ___garbageCollector__@GOTPCREL(%rip), %rdi
movq %rax, (%rdi)
jmp LBB2_3
LBB2_2:
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movq (%rax), %rcx
movl 8(%rax), %edx
addl $1, %edx
movslq %edx, %rax
shlq $3, %rax
movq %rcx, %rdi
movq %rax, %rsi
callq _realloc
movq ___garbageCollector__@GOTPCREL(%rip), %rcx
movq %rax, (%rcx)
LBB2_3:
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl 8(%rax), %ecx
addl $1, %ecx
movl %ecx, 8(%rax)
movq -16(%rbp), %rdx
movq (%rax), %rsi
movl 8(%rax), %ecx
subl $1, %ecx
movslq %ecx, %rax
movq %rdx, (%rsi,%rax,8)
movq -16(%rbp), %rax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _safeReallocFunction ## -- Begin function safeReallocFunction
.p2align 4, 0x90
_safeReallocFunction: ## @safeReallocFunction
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl $0, -28(%rbp)
LBB3_1: ## =>This Inner Loop Header: Depth=1
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl -28(%rbp), %ecx
cmpl 8(%rax), %ecx
jge LBB3_6
## %bb.2: ## in Loop: Header=BB3_1 Depth=1
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movq (%rax), %rax
movslq -28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -8(%rbp), %rax
jne LBB3_4
## %bb.3: ## in Loop: Header=BB3_1 Depth=1
movq -8(%rbp), %rdi
movl -16(%rbp), %eax
imull -12(%rbp), %eax
movslq %eax, %rsi
callq _realloc
movq ___garbageCollector__@GOTPCREL(%rip), %rsi
movq %rax, -24(%rbp)
movq -24(%rbp), %rax
movq (%rsi), %rsi
movslq -28(%rbp), %rdi
movq %rax, (%rsi,%rdi,8)
LBB3_4: ## in Loop: Header=BB3_1 Depth=1
jmp LBB3_5
LBB3_5: ## in Loop: Header=BB3_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB3_1
LBB3_6:
movq -24(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _readSignal ## -- Begin function readSignal
.p2align 4, 0x90
_readSignal: ## @readSignal
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _scanf
movq -8(%rbp), %rsi
movl (%rsi), %esi
movl $4, %edi
movl %eax, -28(%rbp) ## 4-byte Spill
callq _safeCallocFunction
movq %rax, -16(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
callq _getchar
movb %al, %cl
movb %cl, -17(%rbp)
## %bb.2: ## in Loop: Header=BB4_1 Depth=1
movsbl -17(%rbp), %eax
cmpl $91, %eax
jne LBB4_1
## %bb.3:
movq -8(%rbp), %rax
cmpl $0, (%rax)
jle LBB4_9
## %bb.4:
movq -16(%rbp), %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _scanf
movl $1, -24(%rbp)
movl %eax, -32(%rbp) ## 4-byte Spill
LBB4_5: ## =>This Inner Loop Header: Depth=1
movl -24(%rbp), %eax
movq -8(%rbp), %rcx
cmpl (%rcx), %eax
jge LBB4_8
## %bb.6: ## in Loop: Header=BB4_5 Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
shlq $2, %rcx
addq %rcx, %rax
leaq L_.str.2(%rip), %rdi
movq %rax, %rsi
movb $0, %al
callq _scanf
movl %eax, -36(%rbp) ## 4-byte Spill
## %bb.7: ## in Loop: Header=BB4_5 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB4_5
LBB4_8:
jmp LBB4_9
LBB4_9:
jmp LBB4_10
LBB4_10: ## =>This Inner Loop Header: Depth=1
callq _getchar
movb %al, %cl
movb %cl, -17(%rbp)
## %bb.11: ## in Loop: Header=BB4_10 Depth=1
movsbl -17(%rbp), %eax
cmpl $93, %eax
jne LBB4_10
## %bb.12:
movq -16(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _printSignal ## -- Begin function printSignal
.p2align 4, 0x90
_printSignal: ## @printSignal
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl -4(%rbp), %esi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
cmpl $0, -4(%rbp)
movl %eax, -24(%rbp) ## 4-byte Spill
jle LBB5_6
## %bb.1:
movq -16(%rbp), %rax
movl (%rax), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -20(%rbp)
movl %eax, -28(%rbp) ## 4-byte Spill
LBB5_2: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -4(%rbp), %eax
jge LBB5_5
## %bb.3: ## in Loop: Header=BB5_2 Depth=1
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl %eax, -32(%rbp) ## 4-byte Spill
## %bb.4: ## in Loop: Header=BB5_2 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB5_2
LBB5_5:
jmp LBB5_6
LBB5_6:
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
movl %eax, -36(%rbp) ## 4-byte Spill
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _map ## -- Begin function map
.p2align 4, 0x90
_map: ## @map
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl %edx, -20(%rbp)
movl %ecx, -24(%rbp)
movl -20(%rbp), %esi
movl $4, %edi
callq _safeMallocFunction
movq %rax, -32(%rbp)
movl $0, -36(%rbp)
LBB6_1: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB6_4
## %bb.2: ## in Loop: Header=BB6_1 Depth=1
movq -8(%rbp), %rax
movq -16(%rbp), %rcx
movslq -36(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movl -24(%rbp), %esi
callq *%rax
movq -32(%rbp), %rcx
movslq -36(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
## %bb.3: ## in Loop: Header=BB6_1 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB6_1
LBB6_4:
movq -32(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _displace ## -- Begin function displace
.p2align 4, 0x90
_displace: ## @displace
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl %ecx, -20(%rbp)
movl -16(%rbp), %esi
movl $4, %edi
callq _safeCallocFunction
movq %rax, -32(%rbp)
movl -20(%rbp), %ecx
movl %ecx, -36(%rbp)
LBB7_1: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %eax
movl -12(%rbp), %ecx
addl -20(%rbp), %ecx
cmpl %ecx, %eax
jge LBB7_4
## %bb.2: ## in Loop: Header=BB7_1 Depth=1
movq -8(%rbp), %rax
movl -36(%rbp), %ecx
subl -20(%rbp), %ecx
movslq %ecx, %rdx
movl (%rax,%rdx,4), %ecx
movq -32(%rbp), %rax
movslq -36(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
## %bb.3: ## in Loop: Header=BB7_1 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB7_1
LBB7_4:
movq -32(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _product ## -- Begin function product
.p2align 4, 0x90
_product: ## @product
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %esi
imull -8(%rbp), %esi
movl %esi, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _multiply ## -- Begin function multiply
.p2align 4, 0x90
_multiply: ## @multiply
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movq -8(%rbp), %rsi
movl -12(%rbp), %edx
movl -16(%rbp), %ecx
leaq _product(%rip), %rdi
callq _map
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _addAtCurrentDepth ## -- Begin function addAtCurrentDepth
.p2align 4, 0x90
_addAtCurrentDepth: ## @addAtCurrentDepth
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl %edx, -20(%rbp)
movl %ecx, -24(%rbp)
movl %r8d, -28(%rbp)
movq -16(%rbp), %rdi
movl -20(%rbp), %esi
movl -24(%rbp), %edx
movl -28(%rbp), %ecx
callq _displace
movq %rax, -40(%rbp)
movl $0, -44(%rbp)
LBB10_1: ## =>This Inner Loop Header: Depth=1
movl -44(%rbp), %eax
cmpl -24(%rbp), %eax
jge LBB10_4
## %bb.2: ## in Loop: Header=BB10_1 Depth=1
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -8(%rbp), %rax
movslq -44(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
## %bb.3: ## in Loop: Header=BB10_1 Depth=1
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB10_1
LBB10_4:
movq -8(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _applyFilter ## -- Begin function applyFilter
.p2align 4, 0x90
_applyFilter: ## @applyFilter
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl %edx, -20(%rbp)
movl %ecx, -24(%rbp)
movq -8(%rbp), %rsi
movq (%rsi), %rdi
movl -20(%rbp), %esi
movq -16(%rbp), %rax
movl (%rax), %edx
callq _multiply
xorl %ecx, %ecx
movq %rax, -32(%rbp)
movq -32(%rbp), %rdi
movl -20(%rbp), %esi
movl -20(%rbp), %edx
addl -24(%rbp), %edx
subl $1, %edx
callq _displace
movq %rax, -40(%rbp)
movl $1, -44(%rbp)
LBB11_1: ## =>This Inner Loop Header: Depth=1
movl -44(%rbp), %eax
cmpl -24(%rbp), %eax
jge LBB11_4
## %bb.2: ## in Loop: Header=BB11_1 Depth=1
movq -8(%rbp), %rax
movq (%rax), %rdi
movl -20(%rbp), %esi
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq _multiply
movq %rax, -32(%rbp)
movq -40(%rbp), %rdi
movq -32(%rbp), %rsi
movl -20(%rbp), %edx
movl -20(%rbp), %r8d
addl -24(%rbp), %r8d
subl $1, %r8d
movl -44(%rbp), %r9d
movl %r8d, %ecx
movl %r9d, %r8d
callq _addAtCurrentDepth
movq %rax, -40(%rbp)
## %bb.3: ## in Loop: Header=BB11_1 Depth=1
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB11_1
LBB11_4:
movq -40(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq ___garbageCollector__@GOTPCREL(%rip), %rax
movl $0, -4(%rbp)
movl $0, 8(%rax)
movl $0, -8(%rbp)
movl $0, -12(%rbp)
leaq L_.str.1(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
movl -8(%rbp), %esi
movl $8, %edi
movl %eax, -60(%rbp) ## 4-byte Spill
callq _safeMallocFunction
movq %rax, -40(%rbp)
movl -8(%rbp), %esi
movl $4, %edi
callq _safeMallocFunction
movq %rax, -48(%rbp)
movl $0, -52(%rbp)
LBB12_1: ## =>This Inner Loop Header: Depth=1
movl -52(%rbp), %eax
cmpl -8(%rbp), %eax
jge LBB12_4
## %bb.2: ## in Loop: Header=BB12_1 Depth=1
movq -48(%rbp), %rax
movslq -52(%rbp), %rcx
shlq $2, %rcx
addq %rcx, %rax
movq %rax, %rdi
callq _readSignal
movq -40(%rbp), %rcx
movslq -52(%rbp), %rdi
movq %rax, (%rcx,%rdi,8)
## %bb.3: ## in Loop: Header=BB12_1 Depth=1
movl -52(%rbp), %eax
addl $1, %eax
movl %eax, -52(%rbp)
jmp LBB12_1
LBB12_4:
leaq -12(%rbp), %rdi
callq _readSignal
movq %rax, -24(%rbp)
movq -40(%rbp), %rax
movq (%rax), %rsi
movl -12(%rbp), %edx
movq -48(%rbp), %rax
movl (%rax), %ecx
leaq -24(%rbp), %rdi
callq _applyFilter
movq %rax, -32(%rbp)
movl -12(%rbp), %ecx
movq -48(%rbp), %rax
addl (%rax), %ecx
subl $1, %ecx
movl %ecx, -12(%rbp)
movl $1, -56(%rbp)
LBB12_5: ## =>This Inner Loop Header: Depth=1
movl -56(%rbp), %eax
cmpl -8(%rbp), %eax
jge LBB12_8
## %bb.6: ## in Loop: Header=BB12_5 Depth=1
movq -40(%rbp), %rax
movslq -56(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -12(%rbp), %edx
movq -48(%rbp), %rax
movslq -56(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq -32(%rbp), %rdi
callq _applyFilter
movq %rax, -32(%rbp)
movl -12(%rbp), %ecx
movq -48(%rbp), %rax
movslq -56(%rbp), %rsi
addl (%rax,%rsi,4), %ecx
subl $1, %ecx
movl %ecx, -12(%rbp)
## %bb.7: ## in Loop: Header=BB12_5 Depth=1
movl -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB12_5
LBB12_8:
movl -12(%rbp), %edi
movq -32(%rbp), %rsi
callq _printSignal
callq _garbageCollection
xorl %eax, %eax
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.comm ___garbageCollector__,16,3 ## @__garbageCollector__
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d:"
L_.str.1: ## @.str.1
.asciz "%d"
L_.str.2: ## @.str.2
.asciz ",%d"
L_.str.3: ## @.str.3
.asciz "%d: ["
L_.str.4: ## @.str.4
.asciz "]\n"
.subsections_via_symbols