xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void error(const char *message) {
  printf("Error: %s\n", message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
struct semaphore {
  int dummy;
};

/* Variables and functions */
int futex_down_timeout(struct semaphore *, int /*<<< orphan*/ *);
int futex_down(struct semaphore *sem) { return futex_down_timeout(sem, NULL); }


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

x86 assembly (clang, -O2):
<futex_down>:
xor    %esi,%esi
jmp    1030 <futex_down_timeout@plt>

LLVM IR (-O0):
%struct.semaphore = type { i32 }
define i32 @futex_down(%struct.semaphore* %0) {
%2 = alloca %struct.semaphore*
store %struct.semaphore* %0, %struct.semaphore** %2
%3 = load %struct.semaphore*, %struct.semaphore** %2
%4 = call i32 @futex_down_timeout(%struct.semaphore* %3, i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.semaphore = type { i32 }
define i32 @futex_down(%struct.semaphore* %0) {
%2 = tail call i32 @futex_down_timeout(%struct.semaphore* %0, i32* null)
ret i32 %2
}
void foo4b() {}


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

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

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

LLVM IR (-O2):
define void @foo4b() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kernel_main();
void _start() { kernel_main(); }


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

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

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

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @kernel_main()
ret void
}
/* Variables and functions */
float bp_sw_Score2Bits(int);
float bp_sw_std_score_to_his(int score) { return bp_sw_Score2Bits(score); }


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

x86 assembly (clang, -O2):
<bp_sw_std_score_to_his>:
jmp    1030 <bp_sw_Score2Bits@plt>

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

LLVM IR (-O2):
define float @bp_sw_std_score_to_his(i32 %0) {
%2 = tail call float @bp_sw_Score2Bits(i32 %0)
ret float %2
}
kyakka(s) char *s;
{ printf("%s\n", s); }


x86 assembly (clang, -O0):
<kyakka>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kyakka>:
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @kyakka(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @kyakka(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret i32 undef
}
int op_ne(int a, int b) { return (a != b); }


x86 assembly (clang, -O0):
<op_ne>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ne>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @op_ne(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 = icmp ne i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_ne(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(int n) {
  if (n) {
    bar();
  } else {
    while (1) {
    }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1131 <foo+0x21>
mov    $0x0,%al
call   1030 <bar@plt>
jmp    113b <foo+0x2b>
jmp    1136 <foo+0x26>
jmp    1136 <foo+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
je     1120 <foo+0x10>
xor    %eax,%eax
jmp    1030 <bar@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <foo+0x10>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @bar()
br label %9
7: ; preds = %1
br label %8
8: ; preds = %7, %8
br label %8
9: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @bar()
ret void
5: ; preds = %1, %5
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void sigpipeHandler(int s) {
  (void)s;
  (void)printf("%s\n", "got a sigpipe");
  cleanup();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<sigpipeHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <cleanup@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sigpipeHandler>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <cleanup@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"got a sigpipe\00"
@EXIT_FAILURE = global i32 0
define void @sigpipeHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @cleanup()
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"got a sigpipe\00"
@EXIT_FAILURE = global i32 0
define void @sigpipeHandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @cleanup()
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
float float_sum(float f1, float f2) { return f1 + f2; }


x86 assembly (clang, -O0):
<float_sum>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_sum>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @float_sum(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
int push_at_end(struct link_node *head, int val) { return 1; }


x86 assembly (clang, -O0):
<push_at_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_at_end>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.link_node = type opaque
define i32 @push_at_end(%struct.link_node* %0, i32 %1) {
%3 = alloca %struct.link_node*
%4 = alloca i32
store %struct.link_node* %0, %struct.link_node** %3
store i32 %1, i32* %4
ret i32 1
}

LLVM IR (-O2):
%struct.link_node = type opaque
define i32 @push_at_end(%struct.link_node* nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprint_hex(int /*<<< orphan*/, unsigned char const *, int);
int /*<<< orphan*/ stdout;
void print_hex(const unsigned char *buf, int length) {
  fprint_hex(stdout, buf, length);
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <fprint_hex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprint_hex@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_hex(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprint_hex(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_hex(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprint_hex(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int foo();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("[BEGIN] env-DYLD_FALLBACK_LIBRARY_PATH\n");
  if (foo() == 42)
    printf("[PASS] env-DYLD_FALLBACK_LIBRARY_PATH\n");
  else
    printf("[FAIL] env-DYLD_FALLBACK_LIBRARY_PATH\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x2a,%eax
jne    115c <main+0x3c>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <main+0x48>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x2a,%eax
lea    0xf0f(%rip),%rax
lea    0xee2(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"[BEGIN] env-DYLD_FALLBACK_LIBRARY_PATH\0A\00"
@.str.1 = [39 x i8] c"[PASS] env-DYLD_FALLBACK_LIBRARY_PATH\0A\00"
@.str.2 = [39 x i8] c"[FAIL] env-DYLD_FALLBACK_LIBRARY_PATH\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @foo()
%4 = icmp eq i32 %3, 42
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@str = [39 x i8] c"[BEGIN] env-DYLD_FALLBACK_LIBRARY_PATH\00"
@str.3 = [38 x i8] c"[FAIL] env-DYLD_FALLBACK_LIBRARY_PATH\00"
@str.4 = [38 x i8] c"[PASS] env-DYLD_FALLBACK_LIBRARY_PATH\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @foo()
%3 = icmp eq i32 %2, 42
%4 = select i1 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @str.3, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_bit_false(int /*<<< orphan*/ volatile *, int);
int /*<<< orphan*/ set_bit_true(int /*<<< orphan*/ volatile *, int);
void set_led_blue(volatile uint8_t *buffer) {
  set_bit_true(buffer, 1);
  set_bit_true(buffer, 3);
  set_bit_false(buffer, 2);
}


x86 assembly (clang, -O0):
<set_led_blue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <set_bit_true@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1040 <set_bit_true@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <set_bit_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led_blue>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <set_bit_true@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <set_bit_true@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
pop    %rbx
jmp    1030 <set_bit_false@plt>

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

LLVM IR (-O2):
define void @set_led_blue(i32* %0) {
%2 = tail call i32 @set_bit_true(i32* %0, i32 1)
%3 = tail call i32 @set_bit_true(i32* %0, i32 3)
%4 = tail call i32 @set_bit_false(i32* %0, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
void swap_int32(void *a, void *b) {
  do {
    int32_t temp = *(int32_t *)a;
    *(int32_t *)a = *(int32_t *)b;
    *(int32_t *)b = temp;
  } while (0);
}


x86 assembly (clang, -O0):
<swap_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_int32>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap_int32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to i32*
store i32 %12, i32* %14
%15 = load i32, i32* %5
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i32*
store i32 %15, i32* %17
br label %18
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @swap_int32(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
store i32 %4, i32* %5
ret void
}
void ff_hevc_put_hevc_epel_v64_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v64_12_sse4() {
ret void
}
unsigned long strlen(const char *buf) {
  unsigned long len = 0;
  while (*buf++)
    ++len;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <strlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int get_data();
int get_int(int highbyte) {
  int lowbyte;
  if (highbyte == 0)
    highbyte = get_data();
  lowbyte = get_data();
  return (highbyte & 040 ? -(((highbyte & 037) << 6) | (lowbyte & 077))
                         : (((highbyte & 037) << 6) | (lowbyte & 077)));
}


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112f <get_int+0x1f>
mov    $0x0,%al
call   1030 <get_data@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_data@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1165 <get_int+0x55>
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
shl    $0x6,%ecx
mov    -0x8(%rbp),%eax
and    $0x3f,%eax
or     %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <get_int+0x69>
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
shl    $0x6,%eax
mov    -0x8(%rbp),%ecx
and    $0x3f,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jne    1120 <get_int+0x10>
xor    %eax,%eax
call   1030 <get_data@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <get_data@plt>
mov    %ebx,%ecx
and    $0x1f,%ecx
shl    $0x6,%ecx
and    $0x3f,%eax
or     %ecx,%eax
mov    %eax,%ecx
neg    %ecx
test   $0x20,%bl
cmovne %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @get_data()
store i32 %7, i32* %2
br label %8
8: ; preds = %6, %1
%9 = call i32 (...) @get_data()
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = and i32 %10, 32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %8
%14 = load i32, i32* %2
%15 = and i32 %14, 31
%16 = shl i32 %15, 6
%17 = load i32, i32* %3
%18 = and i32 %17, 63
%19 = or i32 %16, %18
%20 = sub nsw i32 0, %19
br label %28
21: ; preds = %8
%22 = load i32, i32* %2
%23 = and i32 %22, 31
%24 = shl i32 %23, 6
%25 = load i32, i32* %3
%26 = and i32 %25, 63
%27 = or i32 %24, %26
br label %28
28: ; preds = %21, %13
%29 = phi i32 [ %20, %13 ], [ %27, %21 ]
ret i32 %29
}

LLVM IR (-O2):
define i32 @get_int(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @get_data()
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ %4, %3 ], [ %0, %1 ]
%7 = tail call i32 (...) @get_data()
%8 = and i32 %6, 32
%9 = icmp eq i32 %8, 0
%10 = shl i32 %6, 6
%11 = and i32 %10, 1984
%12 = and i32 %7, 63
%13 = or i32 %11, %12
%14 = sub nsw i32 0, %13
%15 = select i1 %9, i32 %13, i32 %14
ret i32 %15
}
void gdk_selection_owner_set() {}


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

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

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

LLVM IR (-O2):
define void @gdk_selection_owner_set() {
ret void
}
void main() { int noTestInt = 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
unsigned assemble_cfgbit(const unsigned x, const unsigned y) {
  return (y | (x << 8));
}


x86 assembly (clang, -O0):
<assemble_cfgbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assemble_cfgbit>:
mov    %edi,%eax
shl    $0x8,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @assemble_cfgbit(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = or i32 %3, %1
ret i32 %4
}
void test_fixture_teardown() {}


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

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

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

LLVM IR (-O2):
define void @test_fixture_teardown() {
ret void
}
/* Type definitions */
typedef scalar_t__ u_int;

/* Variables and functions */
u_int max(u_int a, u_int b) { return (a > b ? a : b); }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void fork_error() { perror("fork error"); }


x86 assembly (clang, -O0):
<fork_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <perror@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork_error>:
lea    0xee9(%rip),%rdi
jmp    1030 <perror@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"fork error\00"
define void @fork_error() {
%1 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"fork error\00"
define void @fork_error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rdv40_spiffs_mount();
scalar_t__ rdv40_spiffs_mounted();
int rdv40_spiffs_unmount();
int rdv40_spiffs_lazy_mount_rollback(int changed) {
  if (!changed)
    return 0;
  if (rdv40_spiffs_mounted())
    return rdv40_spiffs_unmount();
  return rdv40_spiffs_mount();
}


x86 assembly (clang, -O0):
<rdv40_spiffs_lazy_mount_rollback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <rdv40_spiffs_lazy_mount_rollback+0x21>
movl   $0x0,-0x4(%rbp)
jmp    117b <rdv40_spiffs_lazy_mount_rollback+0x4b>
mov    $0x0,%al
call   1030 <rdv40_spiffs_mounted@plt>
cmp    $0x0,%rax
je     1171 <rdv40_spiffs_lazy_mount_rollback+0x41>
mov    $0x0,%al
call   1040 <rdv40_spiffs_unmount@plt>
mov    %eax,-0x4(%rbp)
jmp    117b <rdv40_spiffs_lazy_mount_rollback+0x4b>
mov    $0x0,%al
call   1050 <rdv40_spiffs_mount@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdv40_spiffs_lazy_mount_rollback>:
test   %edi,%edi
je     114d <rdv40_spiffs_lazy_mount_rollback+0x1d>
push   %rax
xor    %eax,%eax
call   1030 <rdv40_spiffs_mounted@plt>
test   %rax,%rax
lea    0x8(%rsp),%rsp
je     1150 <rdv40_spiffs_lazy_mount_rollback+0x20>
xor    %eax,%eax
jmp    1040 <rdv40_spiffs_unmount@plt>
xor    %eax,%eax
ret
xor    %eax,%eax
jmp    1050 <rdv40_spiffs_mount@plt>

LLVM IR (-O0):
define i32 @rdv40_spiffs_lazy_mount_rollback(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %14
7: ; preds = %1
%8 = call i64 (...) @rdv40_spiffs_mounted()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @rdv40_spiffs_unmount()
store i32 %11, i32* %2
br label %14
12: ; preds = %7
%13 = call i32 (...) @rdv40_spiffs_mount()
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @rdv40_spiffs_lazy_mount_rollback(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 (...) @rdv40_spiffs_mounted()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @rdv40_spiffs_unmount()
br label %10
8: ; preds = %3
%9 = tail call i32 (...) @rdv40_spiffs_mount()
br label %10
10: ; preds = %1, %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int g5_get_number_of_pipelines();
int(g5_get_number_of_pipelines_)() { return g5_get_number_of_pipelines(); }


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

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

LLVM IR (-O0):
define i32 @g5_get_number_of_pipelines_() {
%1 = call i32 (...) @g5_get_number_of_pipelines()
ret i32 %1
}

LLVM IR (-O2):
define i32 @g5_get_number_of_pipelines_() {
%1 = tail call i32 (...) @g5_get_number_of_pipelines()
ret i32 %1
}
void move_parar() {}


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

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

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

LLVM IR (-O2):
define void @move_parar() {
ret void
}
float vcone(float a, float b) {
  float x = 3.141592 * a * a * b;
  return (x / 3);
}


x86 assembly (clang, -O0):
<vcone>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xead(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vcone>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
divss  0xedd(%rip),%xmm0
ret

LLVM IR (-O0):
define float @vcone(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fmul double 0x400921FAFC8B007A, %7
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fmul double %8, %10
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = fmul double %11, %13
%15 = fptrunc double %14 to float
store float %15, float* %5
%16 = load float, float* %5
%17 = fdiv float %16, 3.000000e+00
ret float %17
}

LLVM IR (-O2):
define float @vcone(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fmul double %3, 0x400921FAFC8B007A
%5 = fmul double %4, %3
%6 = fpext float %1 to double
%7 = fmul double %5, %6
%8 = fptrunc double %7 to float
%9 = fdiv float %8, 3.000000e+00
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSB_BITSET_clk_ctrl_on(unsigned char *data) {
  switch_on_bits(data, (0x80));
}


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

x86 assembly (clang, -O2):
<CTRL_REGSB_BITSET_clk_ctrl_on>:
mov    $0x80,%esi
jmp    1030 <switch_on_bits@plt>

LLVM IR (-O0):
define void @CTRL_REGSB_BITSET_clk_ctrl_on(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @switch_on_bits(i8* %3, i32 128)
ret void
}

LLVM IR (-O2):
define void @CTRL_REGSB_BITSET_clk_ctrl_on(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 128)
ret void
}
/* Variables and functions */
char *GetToken(int /*<<< orphan*/, char **);
double small_atof(char *);
char *get_float_token(double *f, char **last) {
  char *token = GetToken(0, last);
  if (token)
    *f = small_atof(token);
  return token;
}


x86 assembly (clang, -O0):
<get_float_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
call   1030 <GetToken@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115b <get_float_token+0x3b>
mov    -0x18(%rbp),%rdi
call   1040 <small_atof@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_float_token>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <GetToken@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1143 <get_float_token+0x23>
mov    %rbx,%rdi
call   1040 <small_atof@plt>
movsd  %xmm0,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @get_float_token(double* %0, i8** %1) {
%3 = alloca double*
%4 = alloca i8**
%5 = alloca i8*
store double* %0, double** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = call i8* @GetToken(i32 0, i8** %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call double @small_atof(i8* %11)
%13 = load double*, double** %3
store double %12, double* %13
br label %14
14: ; preds = %10, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @get_float_token(double* nocapture writeonly %0, i8** %1) {
%3 = tail call i8* @GetToken(i32 0, i8** %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call double @small_atof(i8* %3)
store double %6, double* %0
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
endGameMessage() {
  puts("\nThanks for playing The Message! I hope you enjoyed it!");
}


x86 assembly (clang, -O0):
<endGameMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endGameMessage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0AThanks for playing The Message! I hope you enjoyed it!\00"
define i32 @endGameMessage() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0AThanks for playing The Message! I hope you enjoyed it!\00"
define i32 @endGameMessage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeComparator(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000000);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000000);
}


x86 assembly (clang, -O0):
<GPIOPinTypeComparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeComparator>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeComparator(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 @GPIODirModeSet(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeComparator(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 0)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ezdCleanUp();
void closeWindow() { ezdCleanUp(); }


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

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

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

LLVM IR (-O2):
define void @closeWindow() {
%1 = tail call i32 (...) @ezdCleanUp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, unsigned char const *, size_t);
char *cryptocard_printchallenge(char s[16 * 2 + 1],
                                const unsigned char challenge[16], size_t len) {
  (void)memcpy(s, challenge, len);
  s[len] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<cryptocard_printchallenge>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cryptocard_printchallenge>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @cryptocard_printchallenge(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = getelementptr inbounds i8, i8* %11, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @cryptocard_printchallenge(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%5 = getelementptr inbounds i8, i8* %0, i64 %2
store i8 0, i8* %5
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m154setParamsMirror(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m206setParams8000(int /*<<< orphan*/, int /*<<< orphan*/);
void m154setParams8000(uint16_t addr, uint8_t val) {
  m206setParams8000(addr, val);
  m154setParamsMirror(addr, val);
}


x86 assembly (clang, -O0):
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 <m206setParams8000@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <m154setParamsMirror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <m206setParams8000@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <m154setParamsMirror@plt>

LLVM IR (-O0):
define void @m154setParams8000(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 @m206setParams8000(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @m154setParamsMirror(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @m154setParams8000(i32 %0, i32 %1) {
%3 = tail call i32 @m206setParams8000(i32 %0, i32 %1)
%4 = tail call i32 @m154setParamsMirror(i32 %0, i32 %1)
ret void
}
int gcd(int x, int y) {
  int t;
  while (y) {
    t = x;
    x = y;
    y = t % y;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <gcd+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int get_version_1();
int get_version_2();
int main(void) {
  if (get_version_1() != 104)
    return 1;
  if (get_version_2() != 104)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_version_1@plt>
cmp    $0x68,%eax
je     114b <main+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    116e <main+0x4e>
mov    $0x0,%al
call   1040 <get_version_2@plt>
cmp    $0x68,%eax
je     1167 <main+0x47>
movl   $0x2,-0x4(%rbp)
jmp    116e <main+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <get_version_1@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x68,%ecx
jne    1147 <main+0x27>
xor    %eax,%eax
call   1040 <get_version_2@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x68,%ecx
setne  %al
add    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_version_1()
%3 = icmp ne i32 %2, 104
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %10
5: ; preds = %0
%6 = call i32 (...) @get_version_2()
%7 = icmp ne i32 %6, 104
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 2, i32* %1
br label %10
9: ; preds = %5
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8, %4
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @get_version_1()
%2 = icmp eq i32 %1, 104
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 (...) @get_version_2()
%5 = icmp eq i32 %4, 104
%6 = select i1 %5, i32 0, i32 2
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
int mop_is_longopt(const char *arg) {
  return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] != '\0';
}


x86 assembly (clang, -O0):
<mop_is_longopt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1154 <mop_is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <mop_is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <mop_is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mop_is_longopt>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <mop_is_longopt+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <mop_is_longopt+0x1b>
cmpb   $0x2d,0x1(%rdi)
jne    111b <mop_is_longopt+0x1b>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @mop_is_longopt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %23
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %23
11: ; preds = %5
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 45
br i1 %16, label %17, label %23
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br label %23
23: ; preds = %17, %11, %5, %1
%24 = phi i1 [ false, %11 ], [ false, %5 ], [ false, %1 ], [ %22, %17 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @mop_is_longopt(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %6, %3, %1
%16 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %14, %10 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void aligned_free(void *p) { free(((void **)p)[-1]); }


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

x86 assembly (clang, -O2):
<aligned_free>:
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @aligned_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i8**
%5 = getelementptr inbounds i8*, i8** %4, i64 -1
%6 = load i8*, i8** %5
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @aligned_free(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @free(i8* %4)
ret void
}
void g_strerror() {}


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

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

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

LLVM IR (-O2):
define void @g_strerror() {
ret void
}
/* Type definitions */
struct timeval {
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
long random();
int /*<<< orphan*/ srandom(long);
void set_random_seed(int test) {
  struct timeval t;
  long int r;
  gettimeofday(&t, 0);
  srandom(t.tv_usec);
  if (test)
    srandom(0);
  r = random();
  srandom(r);
}


x86 assembly (clang, -O0):
<set_random_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    -0x10(%rbp),%rdi
call   1030 <srandom@plt>
cmpl   $0x0,-0x4(%rbp)
je     1162 <set_random_seed+0x32>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x0,%al
call   1050 <random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <srandom@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_random_seed>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    0x8(%rsp),%rdi
call   1030 <srandom@plt>
test   %ebx,%ebx
je     1158 <set_random_seed+0x28>
xor    %edi,%edi
call   1030 <srandom@plt>
xor    %eax,%eax
call   1050 <random@plt>
mov    %rax,%rdi
call   1030 <srandom@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define void @set_random_seed(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
%4 = alloca i64
store i32 %0, i32* %2
%5 = call i32 @gettimeofday(%struct.timeval* %3, i32 0)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%7 = load i64, i64* %6
%8 = call i32 @srandom(i64 %7)
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @srandom(i64 0)
br label %13
13: ; preds = %11, %1
%14 = call i64 (...) @random()
store i64 %14, i64* %4
%15 = load i64, i64* %4
%16 = call i32 @srandom(i64 %15)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define void @set_random_seed(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32 0)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%6 = load i64, i64* %5
%7 = call i32 @srandom(i64 %6)
%8 = icmp eq i32 %0, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @srandom(i64 0)
br label %11
11: ; preds = %9, %1
%12 = call i64 (...) @random()
%13 = call i32 @srandom(i64 %12)
ret void
}