1;;! target = "x86_64" 2;;! test = "winch" 3(module 4 (func (export "while-") (param i64) (result i64) 5 (local i64) 6 (local.set 1 (i64.const 1)) 7 (block 8 (loop 9 (br_if 1 (i64.eqz (local.get 0))) 10 (local.set 1 (i64.mul (local.get 0) (local.get 1))) 11 (local.set 0 (i64.sub (local.get 0) (i64.const 1))) 12 (br 0) 13 ) 14 ) 15 (local.get 1) 16 ) 17) 18;; wasm[0]::function[0]: 19;; pushq %rbp 20;; movq %rsp, %rbp 21;; movq 8(%rdi), %r11 22;; movq 0x18(%r11), %r11 23;; addq $0x20, %r11 24;; cmpq %rsp, %r11 25;; ja 0x92 26;; 1c: movq %rdi, %r14 27;; subq $0x20, %rsp 28;; movq %rdi, 0x18(%rsp) 29;; movq %rsi, 0x10(%rsp) 30;; movq %rdx, 8(%rsp) 31;; movq $0, (%rsp) 32;; movl $1, %eax 33;; movq %rax, (%rsp) 34;; movq 8(%rsp), %rax 35;; cmpq $0, %rax 36;; movl $0, %eax 37;; sete %al 38;; testl %eax, %eax 39;; jne 0x85 40;; 5f: movq (%rsp), %rax 41;; movq 8(%rsp), %rcx 42;; imulq %rax, %rcx 43;; movq %rcx, (%rsp) 44;; movq 8(%rsp), %rax 45;; subq $1, %rax 46;; movq %rax, 8(%rsp) 47;; jmp 0x46 48;; 85: movq (%rsp), %rax 49;; addq $0x20, %rsp 50;; popq %rbp 51;; retq 52;; 92: ud2 53