xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) {
  return isdigit(c) || ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F'));
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <isxdigit+0x5d>
cmpl   $0x61,-0x4(%rbp)
jl     114e <isxdigit+0x3e>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <isxdigit+0x5d>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <isxdigit+0x57>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 102
br i1 %11, label %20, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 70
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9, %1
%21 = phi i1 [ true, %9 ], [ true, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ uart_poll_tx_byte(unsigned int, char const);
void uart_poll_tx_string(unsigned int uart, const char *msg) {
  while (*msg) {
    uart_poll_tx_byte(uart, *msg);
    msg++;
  }
}


x86 assembly (clang, -O0):
<uart_poll_tx_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <uart_poll_tx_string+0x3c>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <uart_poll_tx_byte@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <uart_poll_tx_string+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_poll_tx_string>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <uart_poll_tx_string+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <uart_poll_tx_byte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <uart_poll_tx_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @uart_poll_tx_string(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i32 @uart_poll_tx_byte(i32 %10, i8 signext %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @uart_poll_tx_string(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @uart_poll_tx_byte(i32 %0, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
void _destroy_multi_identifier_nodes_table(char **table) {
  int f;
  assert(table);
  for (f = 0; table[f]; f++)
    free(table[f]);
  free(table);
}


x86 assembly (clang, -O0):
<_destroy_multi_identifier_nodes_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <assert@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1170 <_destroy_multi_identifier_nodes_table+0x50>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <_destroy_multi_identifier_nodes_table+0x1e>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_destroy_multi_identifier_nodes_table>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <assert@plt>
mov    (%r14),%rdi
test   %rdi,%rdi
je     1151 <_destroy_multi_identifier_nodes_table+0x31>
lea    0x8(%r14),%rbx
nopw   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <_destroy_multi_identifier_nodes_table+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @_destroy_multi_identifier_nodes_table(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 (i8**, ...) bitcast (i32 (...)* @assert to i32 (i8**, ...)*)(i8** %4)
store i32 0, i32* %3
br label %6
6: ; preds = %19, %1
%7 = load i8**, i8*** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8*, i8** %7, i64 %9
%11 = load i8*, i8** %10
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %22
13: ; preds = %6
%14 = load i8**, i8*** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
br label %19
19: ; preds = %13
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %6
22: ; preds = %6
%23 = load i8**, i8*** %2
%24 = bitcast i8** %23 to i8*
ret void
}

LLVM IR (-O2):
define void @_destroy_multi_identifier_nodes_table(i8** %0) {
%2 = tail call i32 (i8**, ...) bitcast (i32 (...)* @assert to i32 (i8**, ...)*)(i8** %0)
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ 0, %1 ]
%7 = phi i8* [ %10, %5 ], [ %3, %1 ]
tail call void @free(i8* %7)
%8 = add nuw nsw i64 %6, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadMolecule(int);
int indigoReadFile(char const *);
__attribute__((visibility("default"))) int
indigoLoadMoleculeFromFile(const char *filename) {
  int source = indigoReadFile(filename);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadMolecule(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadMoleculeFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <indigoReadFile@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadMoleculeFromFile+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadMoleculeFromFile+0x47>
mov    -0x14(%rbp),%edi
call   1040 <indigoLoadMolecule@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadMoleculeFromFile>:
push   %rbp
push   %rbx
push   %rax
call   1030 <indigoReadFile@plt>
test   %eax,%eax
jle    1152 <indigoLoadMoleculeFromFile+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadMolecule@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadMoleculeFromFile+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadMoleculeFromFile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @indigoReadFile(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @indigoLoadMolecule(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @indigoLoadMoleculeFromFile(i8* %0) {
%2 = tail call i32 @indigoReadFile(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadMolecule(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Type definitions */
struct bstree_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_left(struct bstree_node *, struct bstree_node *);
int /*<<< orphan*/ set_right(struct bstree_node *, struct bstree_node *);
void set_child(struct bstree_node *child, struct bstree_node *node, int left) {
  if (left)
    set_left(child, node);
  else
    set_right(child, node);
}


x86 assembly (clang, -O0):
<set_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114f <set_child+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <set_left@plt>
jmp    115c <set_child+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <set_right@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_child>:
test   %edx,%edx
je     1129 <set_child+0x9>
jmp    1030 <set_left@plt>
jmp    1040 <set_right@plt>

LLVM IR (-O0):
%struct.bstree_node = type { i32 }
define void @set_child(%struct.bstree_node* %0, %struct.bstree_node* %1, i32 %2) {
%4 = alloca %struct.bstree_node*
%5 = alloca %struct.bstree_node*
%6 = alloca i32
store %struct.bstree_node* %0, %struct.bstree_node** %4
store %struct.bstree_node* %1, %struct.bstree_node** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load %struct.bstree_node*, %struct.bstree_node** %4
%11 = load %struct.bstree_node*, %struct.bstree_node** %5
%12 = call i32 @set_left(%struct.bstree_node* %10, %struct.bstree_node* %11)
br label %17
13: ; preds = %3
%14 = load %struct.bstree_node*, %struct.bstree_node** %4
%15 = load %struct.bstree_node*, %struct.bstree_node** %5
%16 = call i32 @set_right(%struct.bstree_node* %14, %struct.bstree_node* %15)
br label %17
17: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
%struct.bstree_node = type { i32 }
define void @set_child(%struct.bstree_node* %0, %struct.bstree_node* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @set_left(%struct.bstree_node* %0, %struct.bstree_node* %1)
br label %9
7: ; preds = %3
%8 = tail call i32 @set_right(%struct.bstree_node* %0, %struct.bstree_node* %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int sscanf(char const *, char *, int *, int *);
void parse_time(const char formatted_time[], int *hours, int *minutes) {
  int scan_res;
  scan_res = sscanf(formatted_time, " %d.%d", hours, minutes);
  assert(scan_res == 2);
}


x86 assembly (clang, -O0):
<parse_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeb9(%rip),%rsi
call   1040 <sscanf@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_time>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xed2(%rip),%rsi
call   1040 <sscanf@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [7 x i8] c" %d.%d\00"
define void @parse_time(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = call i32 @sscanf(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %9, i32* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, 2
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" %d.%d\00"
define void @parse_time(i8* nocapture %0, i32* %1, i32* %2) {
%4 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret void
}
int sleep_monitor_get_pretty(int *pretty_group, int type) {}


x86 assembly (clang, -O0):
<sleep_monitor_get_pretty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_monitor_get_pretty>:
ret

LLVM IR (-O0):
define i32 @sleep_monitor_get_pretty(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @sleep_monitor_get_pretty(i32* nocapture readnone %0, i32 %1) {
ret i32 undef
}
void lcd_init() { return; }


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
ret

LLVM IR (-O0):
define void @lcd_init() {
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
extern void print_array(int a[], int n) {
  for (int i = 0; i < n; i++) {
    printf("%d, ", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
void foo_internal(void) {
  if (0) {
  }
  if (0) {
  }
}


x86 assembly (clang, -O0):
<foo_internal>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_internal>:
ret

LLVM IR (-O0):
define void @foo_internal() {
ret void
}

LLVM IR (-O2):
define void @foo_internal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setflowfill(int, int);
void j_setflowfill(int arg0, int arg1) { japi_setflowfill(arg0, arg1); }


x86 assembly (clang, -O0):
<j_setflowfill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <japi_setflowfill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_setflowfill>:
jmp    1030 <japi_setflowfill@plt>

LLVM IR (-O0):
define void @j_setflowfill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @japi_setflowfill(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setflowfill(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setflowfill(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ run(int);
int main() {
  int i;
  printf("\n%s\n# blocks\tGFLOPs/second\n",
         (0 == 1 ? "gcc" : (0 == 2 ? "llvm" : "")));
  for (i = 1; i <= 4; i++) {
    run(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xede(%rip),%rsi
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     1169 <main+0x49>
mov    -0x8(%rbp),%edi
call   1030 <run@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <main+0x29>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeec(%rip),%rsi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <run@plt>
mov    $0x2,%edi
call   1030 <run@plt>
mov    $0x3,%edi
call   1030 <run@plt>
mov    $0x4,%edi
call   1030 <run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0A%s\0A# blocks\09GFLOPs/second\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %2
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 4
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @run(i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A%s\0A# blocks\09GFLOPs/second\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @run(i32 1)
%3 = tail call i32 @run(i32 2)
%4 = tail call i32 @run(i32 3)
%5 = tail call i32 @run(i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
void print_version(void) {
  printf("beecut v%d.%d.%d - "
         "by Marius Tolzmann <m@rius.berlin> 2009-2016\n",
         0, 4, 0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %ecx,%ecx
mov    $0x4,%edx
mov    %ecx,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"beecut v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2009-2016\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 0, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"beecut v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2009-2016\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 0, i32 4, i32 0)
ret void
}
unsigned foo1(unsigned a, unsigned b) {
  unsigned i, j, k;
  for (i = 0; i != a; i++) {
    j += 4 * b;
    k += 4 * a;
  }
  return j + k;
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1143 <foo1+0x43>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <foo1+0x11>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
ret

LLVM IR (-O0):
define i32 @foo1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %21, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32, i32* %4
%14 = mul i32 4, %13
%15 = load i32, i32* %6
%16 = add i32 %15, %14
store i32 %16, i32* %6
%17 = load i32, i32* %3
%18 = mul i32 4, %17
%19 = load i32, i32* %7
%20 = add i32 %19, %18
store i32 %20, i32* %7
br label %21
21: ; preds = %12
%22 = load i32, i32* %5
%23 = add i32 %22, 1
store i32 %23, i32* %5
br label %8
24: ; preds = %8
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = add i32 %25, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @foo1(i32 %0, i32 %1) {
ret i32 undef
}
void debugCheckPeriodic() {}


x86 assembly (clang, -O0):
<debugCheckPeriodic>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugCheckPeriodic>:
ret

LLVM IR (-O0):
define void @debugCheckPeriodic() {
ret void
}

LLVM IR (-O2):
define void @debugCheckPeriodic() {
ret void
}
/* Type definitions */
struct vector {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct vector *);
void vector_free(struct vector *vector) { free(vector); }


x86 assembly (clang, -O0):
<vector_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.vector = type { i32 }
define void @vector_free(%struct.vector* %0) {
%2 = alloca %struct.vector*
store %struct.vector* %0, %struct.vector** %2
%3 = load %struct.vector*, %struct.vector** %2
%4 = call i32 @free(%struct.vector* %3)
ret void
}

LLVM IR (-O2):
%struct.vector = type { i32 }
define void @vector_free(%struct.vector* nocapture %0) {
%2 = tail call i32 @free(%struct.vector* %0)
ret void
}
/* Variables and functions */
scalar_t__ jam_isdigit(char);
char jam_toupper(char);
int jam_hexchar(int ch) {
  int value;
  if (jam_isdigit((char)ch))
    value = (ch - '0');
  else
    value = (jam_toupper((char)ch) - 'A') + 10;
  return (value);
}


x86 assembly (clang, -O0):
<jam_hexchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <jam_isdigit@plt>
cmp    $0x0,%rax
je     114e <jam_hexchar+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1165 <jam_hexchar+0x45>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1040 <jam_toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jam_hexchar>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
movsbl %bl,%ebp
mov    %ebp,%edi
call   1030 <jam_isdigit@plt>
test   %rax,%rax
je     1139 <jam_hexchar+0x19>
add    $0xffffffd0,%ebx
jmp    1146 <jam_hexchar+0x26>
mov    %ebp,%edi
call   1040 <jam_toupper@plt>
movsbl %al,%ebx
add    $0xffffffc9,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @jam_hexchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = call i64 @jam_isdigit(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %3
br label %18
11: ; preds = %1
%12 = load i32, i32* %2
%13 = trunc i32 %12 to i8
%14 = call signext i8 @jam_toupper(i8 signext %13)
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 65
%17 = add nsw i32 %16, 10
store i32 %17, i32* %3
br label %18
18: ; preds = %11, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @jam_hexchar(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i64 @jam_isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = add nsw i32 %0, -48
br label %11
7: ; preds = %1
%8 = tail call signext i8 @jam_toupper(i8 signext %2)
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, -55
br label %11
11: ; preds = %7, %5
%12 = phi i32 [ %6, %5 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
scalar_t__ _si7021_getReg(int);
float getHum() { return 125. * (float)_si7021_getReg(0xF5) / 65536. - 6.; }


x86 assembly (clang, -O0):
<getHum>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf5,%edi
call   1030 <_si7021_getReg@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xecd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHum>:
push   %rax
mov    $0xf5,%edi
call   1030 <_si7021_getReg@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xed4(%rip),%xmm0
mulsd  0xed4(%rip),%xmm0
addsd  0xed4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @getHum() {
%1 = call i64 @_si7021_getReg(i32 245)
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = fmul double 1.250000e+02, %3
%5 = fdiv double %4, 6.553600e+04
%6 = fsub double %5, 6.000000e+00
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @getHum() {
%1 = tail call i64 @_si7021_getReg(i32 245)
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = fmul double %3, 1.250000e+02
%5 = fmul double %4, 0x3EF0000000000000
%6 = fadd double %5, -6.000000e+00
%7 = fptrunc double %6 to float
ret float %7
}
int f91(int n) {
  if (n <= 100) {
    return f91(f91(n + 11));
  } else
    return n - 10;
}


x86 assembly (clang, -O0):
<f91>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     113f <f91+0x2f>
mov    -0x8(%rbp),%edi
add    $0xb,%edi
call   1030 <f91@plt>
mov    %eax,%edi
call   1030 <f91@plt>
mov    %eax,-0x4(%rbp)
jmp    1148 <f91+0x38>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f91>:
push   %rax
mov    %edi,%eax
cmp    $0x64,%edi
jg     112f <f91+0x1f>
nopl   0x0(%rax,%rax,1)
add    $0xb,%eax
mov    %eax,%edi
call   1030 <f91@plt>
cmp    $0x65,%eax
jb     1120 <f91+0x10>
add    $0xfffffff6,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f91(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 11
%9 = call i32 @f91(i32 %8)
%10 = call i32 @f91(i32 %9)
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 10
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @f91(i32 %0) {
%2 = icmp slt i32 %0, 101
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, 11
%6 = tail call i32 @f91(i32 %5)
%7 = icmp ult i32 %6, 101
br i1 %7, label %3, label %8
8: ; preds = %3, %1
%9 = phi i32 [ %0, %1 ], [ %6, %3 ]
%10 = add nsw i32 %9, -10
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int nondet_uint();
int main() {
  unsigned int n = nondet_uint();
  unsigned int x = n, y = 0;
  while (x > 0) {
    x--;
    y++;
  }
  assert(y != n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <nondet_uint@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1167 <main+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <main+0x26>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nondet_uint@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @nondet_uint()
store i32 %5, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %10, %0
%8 = load i32, i32* %3
%9 = icmp ugt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add i32 %11, -1
store i32 %12, i32* %3
%13 = load i32, i32* %4
%14 = add i32 %13, 1
store i32 %14, i32* %4
br label %7
15: ; preds = %7
%16 = load i32, i32* %4
%17 = load i32, i32* %2
%18 = icmp ne i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_uint()
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  char buf[128] = {0};
  int len;
  fgets(buf, 128, stdin);
  len = strlen(buf);
  puts(buf);
  printf("len=%d\n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1060 <memset@plt>
lea    -0x90(%rbp),%rdi
mov    0x2e65(%rip),%rax
mov    (%rax),%edx
mov    $0x80,%esi
call   1070 <fgets@plt>
lea    -0x90(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x94(%rbp),%esi
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x2e6e(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe5b(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [8 x i8] c"len=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [128 x i8]* %2 to i8*
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 128, i32 %6)
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %3
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [8 x i8] c"len=%d\0A\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 128, i32 %3)
%5 = call i32 @strlen(i8* %2)
%6 = call i32 @puts(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(void const *, void const *);
int string_equals(const void *keyA, const void *keyB) {
  return strcmp(keyA, keyB) == 0;
}


x86 assembly (clang, -O0):
<string_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_equals>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_equals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_equals(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double gsw_rho(double, double, int);
double gsw_sigma1(double sa, double ct) {
  return (gsw_rho(sa, ct, 1000e0) - 1000e0);
}


x86 assembly (clang, -O0):
<gsw_sigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x3e8,%edi
call   1030 <gsw_rho@plt>
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_sigma1>:
push   %rax
mov    $0x3e8,%edi
call   1030 <gsw_rho@plt>
addsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @gsw_sigma1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @gsw_rho(double %5, double %6, i32 1000)
%8 = fsub double %7, 1.000000e+03
ret double %8
}

LLVM IR (-O2):
define double @gsw_sigma1(double %0, double %1) {
%3 = tail call double @gsw_rho(double %0, double %1, i32 1000)
%4 = fadd double %3, -1.000000e+03
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int espacos(char *s) {
  int i = 0;
  while (s[i] != '\0')
    if (!isspace(s[i++]))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<espacos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116d <espacos+0x5d>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1168 <espacos+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1174 <espacos+0x64>
jmp    1123 <espacos+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<espacos>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     113b <espacos+0x2b>
movsbl %al,%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <espacos+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @espacos(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = call i32 @isspace(i8 signext %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %13
store i32 0, i32* %2
br label %25
23: ; preds = %13
br label %5
24: ; preds = %5
store i32 1, i32* %2
br label %25
25: ; preds = %24, %22
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @espacos(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = add nuw i64 %3, 1
%9 = tail call i32 @isspace(i8 signext %5)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %7
%12 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %12
}
/* Type definitions */
struct option_a {
  int dummy;
};

/* Variables and functions */
int _getopt_internal_a(int, char *const *, char const *,
                       struct option_a const *, int *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int getopt_long_a(int argc, char *const *argv, const char *options,
                  const struct option_a *long_options, int *opt_index) {
  return _getopt_internal_a(argc, argv, options, long_options, opt_index, 0, 0);
}


x86 assembly (clang, -O0):
<getopt_long_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1030 <_getopt_internal_a@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_a>:
push   %rax
movl   $0x0,(%rsp)
xor    %r9d,%r9d
call   1030 <_getopt_internal_a@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.option_a = type { i32 }
define i32 @getopt_long_a(i32 %0, i8** %1, i8* %2, %struct.option_a* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option_a*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option_a* %3, %struct.option_a** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option_a*, %struct.option_a** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_internal_a(i32 %11, i8** %12, i8* %13, %struct.option_a* %14, i32* %15, i32 0, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option_a = type { i32 }
define i32 @getopt_long_a(i32 %0, i8** %1, i8* %2, %struct.option_a* %3, i32* %4) {
%6 = tail call i32 @_getopt_internal_a(i32 %0, i8** %1, i8* %2, %struct.option_a* %3, i32* %4, i32 0, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fd_w25q16dw_sleep();
void fd_hal_external_flash_sleep(void) { fd_w25q16dw_sleep(); }


x86 assembly (clang, -O0):
<fd_hal_external_flash_sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fd_w25q16dw_sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_hal_external_flash_sleep>:
xor    %eax,%eax
jmp    1030 <fd_w25q16dw_sleep@plt>

LLVM IR (-O0):
define void @fd_hal_external_flash_sleep() {
%1 = call i32 (...) @fd_w25q16dw_sleep()
ret void
}

LLVM IR (-O2):
define void @fd_hal_external_flash_sleep() {
%1 = tail call i32 (...) @fd_w25q16dw_sleep()
ret void
}
void free(void *ptr) {
  ptr = 0;
  return;
}


x86 assembly (clang, -O0):
<free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<free>:
ret

LLVM IR (-O0):
define void @free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %2
ret void
}

LLVM IR (-O2):
define void @free(i8* nocapture %0) {
ret void
}
char *BGBDT_BxON_EatWhite(char *s) {
  while (*s && (*s <= ' '))
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<BGBDT_BxON_EatWhite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <BGBDT_BxON_EatWhite+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <BGBDT_BxON_EatWhite+0x3d>
jmp    114e <BGBDT_BxON_EatWhite+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <BGBDT_BxON_EatWhite+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BGBDT_BxON_EatWhite>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <BGBDT_BxON_EatWhite+0x21>
cmp    $0x21,%cl
jl     1110 <BGBDT_BxON_EatWhite+0x10>
ret

LLVM IR (-O0):
define i8* @BGBDT_BxON_EatWhite(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 32
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @BGBDT_BxON_EatWhite(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = icmp slt i8 %4, 33
%7 = and i1 %5, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %2, label %9
9: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srai_pi32(int /*<<< orphan*/, int);
__m64 test74(__m64 a) { return _mm_srai_pi32(a, 3); }


x86 assembly (clang, -O0):
<test74>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <_mm_srai_pi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test74>:
mov    $0x3,%esi
jmp    1030 <_mm_srai_pi32@plt>

LLVM IR (-O0):
define i32 @test74(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_mm_srai_pi32(i32 %3, i32 3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @test74(i32 %0) {
%2 = tail call i32 @_mm_srai_pi32(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage() {
  fputs("Usage: lily [option] ...\n"
        "Options:\n"
        "-h             : Print this help and exit.\n"
        "-t             : Code is between <?lily ... ?> tags.\n"
        "                 Everything else is printed to stdout.\n"
        "                 By default, everything is treated as code.\n"
        "-s string      : The program is a string (end of options).\n"
        "-gstart N      : Initial # of objects allowed before a gc sweep.\n"
        "-gmul N        : (# allowed * N) when sweep can't free anything.\n"
        "file           : The program is the given filename.\n",
        stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [487 x i8] c"Usage: lily [option] ...\0AOptions:\0A-h : Print this help and exit.\0A-t : Code is between <?lily ... ?> tags.\0A Everything else is printed to stdout.\0A By default, everything is treated as code.\0A-s string : The program is a string (end of options).\0A-gstart N : Initial # of objects allowed before a gc sweep.\0A-gmul N : (# allowed * N) when sweep can't free anything.\0Afile : The program is the given filename.\0A\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([487 x i8], [487 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [487 x i8] c"Usage: lily [option] ...\0AOptions:\0A-h : Print this help and exit.\0A-t : Code is between <?lily ... ?> tags.\0A Everything else is printed to stdout.\0A By default, everything is treated as code.\0A-s string : The program is a string (end of options).\0A-gstart N : Initial # of objects allowed before a gc sweep.\0A-gmul N : (# allowed * N) when sweep can't free anything.\0Afile : The program is the given filename.\0A\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([487 x i8], [487 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
void *smalloc(size_t x) {
  void *p = malloc(x);
  if (!p)
    exit(-1);
  return p;
}


x86 assembly (clang, -O0):
<smalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <smalloc+0x2e>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     112d <smalloc+0xd>
pop    %rcx
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i8* @smalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @smalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %1
ret i8* %2
}