#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct object {
  int dummy;
};
struct dictionary {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ car(struct object *);
struct object *cdr(struct object *);
struct object *cons(int /*<<< orphan*/, struct object *);
int /*<<< orphan*/ z_eval(int /*<<< orphan*/, struct dictionary *);
struct object *z_evlis(struct object *exp, struct dictionary *env) {
  if (((exp) == NULL))
    return 0;
  return cons(z_eval(car(exp), env), z_evlis(cdr(exp), env));
}


x86 assembly (clang, -O0):
<z_evlis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1178 <z_evlis+0x28>
movq   $0x0,-0x8(%rbp)
jmp    11b3 <z_evlis+0x63>
mov    -0x10(%rbp),%rdi
call   1070 <car@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
call   1050 <z_eval@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cdr@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <z_evlis@plt>
mov    -0x1c(%rbp),%edi
mov    %rax,%rsi
call   1060 <cons@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_evlis>:
test   %rdi,%rdi
je     1191 <z_evlis+0x41>
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1070 <car@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1050 <z_eval@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <cdr@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <z_evlis@plt>
mov    %ebp,%edi
mov    %rax,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <cons@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.object = type { i32 }
%struct.dictionary = type { i32 }
define %struct.object* @z_evlis(%struct.object* %0, %struct.dictionary* %1) {
%3 = alloca %struct.object*
%4 = alloca %struct.object*
%5 = alloca %struct.dictionary*
store %struct.object* %0, %struct.object** %4
store %struct.dictionary* %1, %struct.dictionary** %5
%6 = load %struct.object*, %struct.object** %4
%7 = icmp eq %struct.object* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store %struct.object* null, %struct.object** %3
br label %19
9: ; preds = %2
%10 = load %struct.object*, %struct.object** %4
%11 = call i32 @car(%struct.object* %10)
%12 = load %struct.dictionary*, %struct.dictionary** %5
%13 = call i32 @z_eval(i32 %11, %struct.dictionary* %12)
%14 = load %struct.object*, %struct.object** %4
%15 = call %struct.object* @cdr(%struct.object* %14)
%16 = load %struct.dictionary*, %struct.dictionary** %5
%17 = call %struct.object* @z_evlis(%struct.object* %15, %struct.dictionary* %16)
%18 = call %struct.object* @cons(i32 %13, %struct.object* %17)
store %struct.object* %18, %struct.object** %3
br label %19
19: ; preds = %9, %8
%20 = load %struct.object*, %struct.object** %3
ret %struct.object* %20
}

LLVM IR (-O2):
%struct.object = type { i32 }
%struct.dictionary = type { i32 }
define %struct.object* @z_evlis(%struct.object* %0, %struct.dictionary* %1) {
%3 = icmp eq %struct.object* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi %struct.object* [ %11, %6 ], [ null, %2 ]
ret %struct.object* %5
6: ; preds = %2
%7 = tail call i32 @car(%struct.object* %0)
%8 = tail call i32 @z_eval(i32 %7, %struct.dictionary* %1)
%9 = tail call %struct.object* @cdr(%struct.object* %0)
%10 = tail call %struct.object* @z_evlis(%struct.object* %9, %struct.dictionary* %1)
%11 = tail call %struct.object* @cons(i32 %8, %struct.object* %10)
br label %4
}