xunge/DecIR huggingface dataset:
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hlist_del_init_rcu(struct hlist_node *);
void hash_del_rcu(struct hlist_node *node) { hlist_del_init_rcu(node); }


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

x86 assembly (clang, -O2):
<hash_del_rcu>:
jmp    1030 <hlist_del_init_rcu@plt>

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

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define void @hash_del_rcu(%struct.hlist_node* %0) {
%2 = tail call i32 @hlist_del_init_rcu(%struct.hlist_node* %0)
ret void
}
/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ shift_cipher(char *);
int /*<<< orphan*/ stdin;
int main() {
  char msg[80];
  while (fgets(msg, 80, stdin)) {
    shift_cipher(msg);
    printf("%s", msg);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
lea    -0x60(%rbp),%rdi
call   1030 <shift_cipher@plt>
lea    -0x60(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    0x2ea8(%rip),%r15
mov    (%r15),%edx
mov    %rsp,%rdi
mov    $0x50,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     1188 <main+0x58>
mov    %rsp,%rbx
lea    0xea1(%rip),%r14
nop
mov    %rbx,%rdi
call   1030 <shift_cipher@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1050 <fgets@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @fgets(i8* %4, i32 80, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%10 = call i32 @shift_cipher(i8* %9)
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* %2, i32 80, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = call i32 @shift_cipher(i8* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = load i32, i32* @stdin
%10 = call i64 @fgets(i8* %2, i32 80, i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}
struct F {
  float a, b;
  int c, d;
} ff() {
  return (struct F){1, 2, 3, 4};
}


x86 assembly (clang, -O0):
<ff>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3f800000,-0x10(%rbp)
movl   $0x40000000,-0xc(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0x4(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff>:
movaps 0xef9(%rip),%xmm0
movabs $0x400000003,%rax
ret

LLVM IR (-O0):
%struct.F = type { float, float, i32, i32 }
define { <2 x float>, i64 } @ff() {
%1 = alloca %struct.F
%2 = getelementptr inbounds %struct.F, %struct.F* %1, i32 0, i32 0
store float 1.000000e+00, float* %2
%3 = getelementptr inbounds %struct.F, %struct.F* %1, i32 0, i32 1
store float 2.000000e+00, float* %3
%4 = getelementptr inbounds %struct.F, %struct.F* %1, i32 0, i32 2
store i32 3, i32* %4
%5 = getelementptr inbounds %struct.F, %struct.F* %1, i32 0, i32 3
store i32 4, i32* %5
%6 = bitcast %struct.F* %1 to { <2 x float>, i64 }*
%7 = load { <2 x float>, i64 }, { <2 x float>, i64 }* %6
ret { <2 x float>, i64 } %7
}

LLVM IR (-O2):
define { <2 x float>, i64 } @ff() {
ret { <2 x float>, i64 } { <2 x float> <float 1.000000e+00, float 2.000000e+00>, i64 17179869187 }
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float num;
  scanf("%f", &num);
  printf("%0.2f", num / 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xeb4(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
divss  0xec0(%rip),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%0.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fdiv float %4, 5.000000e+00
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%0.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fdiv float %4, 5.000000e+00
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %5)
ret i32 0
}
/* Variables and functions */
int ap_do_command_only(int, int);
int ap_next(int session) { return (ap_do_command_only(session, 0xcc02)); }


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

x86 assembly (clang, -O2):
<ap_next>:
mov    $0xcc02,%esi
jmp    1030 <ap_do_command_only@plt>

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

LLVM IR (-O2):
define i32 @ap_next(i32 %0) {
%2 = tail call i32 @ap_do_command_only(i32 %0, i32 52226)
ret i32 %2
}
struct dma_client_channel *dma_channel_to_client(struct dma_channel *chan) {
  return (struct dma_client_channel *)chan;
}


x86 assembly (clang, -O0):
<dma_channel_to_client>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma_channel_to_client>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.dma_client_channel = type opaque
%struct.dma_channel = type opaque
define %struct.dma_client_channel* @dma_channel_to_client(%struct.dma_channel* %0) {
%2 = alloca %struct.dma_channel*
store %struct.dma_channel* %0, %struct.dma_channel** %2
%3 = load %struct.dma_channel*, %struct.dma_channel** %2
%4 = bitcast %struct.dma_channel* %3 to %struct.dma_client_channel*
ret %struct.dma_client_channel* %4
}

LLVM IR (-O2):
%struct.dma_client_channel = type opaque
%struct.dma_channel = type opaque
define %struct.dma_client_channel* @dma_channel_to_client(%struct.dma_channel* readnone %0) {
%2 = bitcast %struct.dma_channel* %0 to %struct.dma_client_channel*
ret %struct.dma_client_channel* %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void put_char_int(int c) { putchar(c); }


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

x86 assembly (clang, -O2):
<put_char_int>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @put_char_int(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret void
}
/* Variables and functions */
int PTHREAD_MUTEX_ERRORCHECK;
void test_PTHREAD_MUTEX_ERRORCHECK(void) {
  int dummy = PTHREAD_MUTEX_ERRORCHECK;
  (void)dummy;
}


x86 assembly (clang, -O0):
<test_PTHREAD_MUTEX_ERRORCHECK>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@PTHREAD_MUTEX_ERRORCHECK = global i32 0
define void @test_PTHREAD_MUTEX_ERRORCHECK() {
%1 = alloca i32
%2 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
@PTHREAD_MUTEX_ERRORCHECK = global i32 0
define void @test_PTHREAD_MUTEX_ERRORCHECK() {
ret void
}
/* Variables and functions */
int get_mark(char *);
int /*<<< orphan*/ sleep(int);
void wait_for_done_with_computation(char *fname) {
  int mark = 0;
  while (mark < 2) {
    mark = get_mark(fname);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<wait_for_done_with_computation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1158 <wait_for_done_with_computation+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <get_mark@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1133 <wait_for_done_with_computation+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_done_with_computation>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <get_mark@plt>
mov    %eax,%ebp
mov    $0x1,%edi
call   1040 <sleep@plt>
cmp    $0x2,%ebp
jl     1130 <wait_for_done_with_computation+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @wait_for_done_with_computation(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = call i32 @get_mark(i8* %8)
store i32 %9, i32* %3
%10 = call i32 @sleep(i32 1)
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @wait_for_done_with_computation(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @get_mark(i8* %0)
%4 = tail call i32 @sleep(i32 1)
%5 = icmp slt i32 %3, 2
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
void RTAvloGCPtrRemoveBestFit(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ set_tsk_thread_flag(struct task_struct *, int);
__attribute__((always_)) void set_tsk_need_resched(struct task_struct *tsk) {
  set_tsk_thread_flag(tsk, 3);
}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @set_tsk_need_resched(%struct.task_struct* %0) {
%2 = tail call i32 @set_tsk_thread_flag(%struct.task_struct* %0, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fuck(void *arg) { printf("fuck fuck!!!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"fuck fuck!!!\0A\00"
define void @fuck(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"fuck fuck!!!\00"
define void @fuck(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a = 2;
  int b = 3;
  int c = 4;
  printf("%d %d %d\n", a, b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, i32 4)
ret i32 0
}
int suspend_async(struct ThreadInfo *tinfo) { return -1; }


x86 assembly (clang, -O0):
<suspend_async>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ThreadInfo = type opaque
define i32 @suspend_async(%struct.ThreadInfo* %0) {
%2 = alloca %struct.ThreadInfo*
store %struct.ThreadInfo* %0, %struct.ThreadInfo** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.ThreadInfo = type opaque
define i32 @suspend_async(%struct.ThreadInfo* nocapture readnone %0) {
ret i32 -1
}
const char *osurandom_get_implementation(void) { return "getentropy"; }


x86 assembly (clang, -O0):
<osurandom_get_implementation>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<osurandom_get_implementation>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"getentropy\00"
define i8* @osurandom_get_implementation() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"getentropy\00"
define i8* @osurandom_get_implementation() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
int convertFtoC(int f) {
  int c;
  c = 0;
  c = (5.0 / 9.0) * (f - 32.0);
  return c;
}


x86 assembly (clang, -O0):
<convertFtoC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeed(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertFtoC>:
cvtsi2sd %edi,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @convertFtoC(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptosi double %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @convertFtoC(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptosi double %4 to i32
ret i32 %5
}
getOkFromSmtp(fd, response) int fd;
char *response;
{ return (getFromSmtp(fd, response) == 2) ? 1 : 0; }


x86 assembly (clang, -O0):
<getOkFromSmtp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <getFromSmtp@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getOkFromSmtp>:
push   %rax
xor    %eax,%eax
call   1030 <getFromSmtp@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @getOkFromSmtp(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @getFromSmtp to i32 (i32, i8*, ...)*)(i32 %0, i8* %1)
%4 = icmp eq i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ toupper(char);
int ucaseMatch(char a, char b) {
  if (toupper(a) == toupper(b))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ucaseMatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <toupper@plt>
mov    %rax,-0x10(%rbp)
movsbl -0x6(%rbp),%edi
call   1030 <toupper@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
jne    1156 <ucaseMatch+0x46>
movl   $0x1,-0x4(%rbp)
jmp    115d <ucaseMatch+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucaseMatch>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <toupper@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <toupper@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ucaseMatch(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = call i64 @toupper(i8 signext %6)
%8 = load i8, i8* %5
%9 = call i64 @toupper(i8 signext %8)
%10 = icmp eq i64 %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @ucaseMatch(i8 signext %0, i8 signext %1) {
%3 = tail call i64 @toupper(i8 signext %0)
%4 = tail call i64 @toupper(i8 signext %1)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void addps(instring, outstring, eps) char *instring;
char *outstring;
int eps;
{
  strcpy(outstring, instring);
  if (eps) {
    strcat(outstring, ".eps");
  } else {
    strcat(outstring, ".ps");
  }
}


x86 assembly (clang, -O0):
<addps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
cmpl   $0x0,-0x14(%rbp)
je     115f <addps+0x3f>
mov    -0x10(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1040 <strcat@plt>
jmp    116f <addps+0x4f>
mov    -0x10(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1040 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addps>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    %rbx,%rax
test   %ebp,%ebp
je     114e <addps+0x2e>
movb   $0x0,0x4(%rax)
movl   $0x7370652e,(%rax)
jmp    1154 <addps+0x34>
movl   $0x73702e,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c".eps\00"
@.str.1 = [4 x i8] c".ps\00"
define void @addps(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = call i8* @strcpy(i8* %7, i8* %8)
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i8* @strcat(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %18
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = call i8* @strcat(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %15, %12
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".eps\00"
define void @addps(i8* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i8* @strcpy(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
%5 = icmp eq i32 %2, 0
%6 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%7 = getelementptr i8, i8* %1, i64 %6
br i1 %5, label %9, label %8
8: ; preds = %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(5) %7, i8* align 1 dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5, i1 false)
br label %11
9: ; preds = %3
%10 = bitcast i8* %7 to i32*
store i32 7565358, i32* %10
br label %11
11: ; preds = %9, %8
ret void
}
float Sleef_erfcf_u15(float x) { return __builtin_erfcf(x); }


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

x86 assembly (clang, -O2):
<Sleef_erfcf_u15>:
jmp    1030 <erfcf@plt>

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

LLVM IR (-O2):
define float @Sleef_erfcf_u15(float %0) {
%2 = tail call float @erfcf(float %0)
ret float %2
}
double geocen(x)
double x;
{
  double r;
  r = atan((1.0 - (1.0 / 298.256)) * tan(x));
  return (r);
}


x86 assembly (clang, -O0):
<geocen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <atan@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geocen>:
push   %rax
call   1040 <tan@plt>
mulsd  0xed2(%rip),%xmm0
pop    %rax
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @geocen(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @tan(double %4)
%6 = fmul double 0x3FEFE4889E18A326, %5
%7 = call double @atan(double %6)
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @geocen(double %0) {
%2 = tail call double @tan(double %0)
%3 = fmul double %2, 0x3FEFE4889E18A326
%4 = tail call double @atan(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void exitError(char *string) {
  printf("[ERROR] %s", string);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exitError>:
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):
<exitError>:
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\00"
@EXIT_FAILURE = global i32 0
define void @exitError(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\00"
@EXIT_FAILURE = global i32 0
define void @exitError(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
}
/* Variables and functions */
int core1_swap(char *, int);
int U_EMRPOLYGON_swap(char *record, int torev) {
  return (core1_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYGON_swap>:
jmp    1030 <core1_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRPOLYGON_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core1_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void OnConnect() { printf("Connected.\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Connected.\0A\00"
define void @OnConnect() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Connected.\00"
define void @OnConnect() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void warn_incomplete() { printf("Incomplete expression.\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Incomplete expression.\0A\00"
define void @warn_incomplete() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Incomplete expression.\00"
define void @warn_incomplete() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int slog(double);
int carefulSlog(double val) {
  if (val < 0.0000001)
    val = 0.0000001;
  return slog(val);
}


x86 assembly (clang, -O0):
<carefulSlog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    113d <carefulSlog+0x2d>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <slog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carefulSlog>:
movsd  0xee8(%rip),%xmm1
maxsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    1030 <slog@plt>

LLVM IR (-O0):
define i32 @carefulSlog(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0x3E7AD7F29ABCAF48
br i1 %4, label %5, label %6
5: ; preds = %1
store double 0x3E7AD7F29ABCAF48, double* %2
br label %6
6: ; preds = %5, %1
%7 = load double, double* %2
%8 = call i32 @slog(double %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @carefulSlog(double %0) {
%2 = fcmp olt double %0, 0x3E7AD7F29ABCAF48
%3 = select i1 %2, double 0x3E7AD7F29ABCAF48, double %0
%4 = tail call i32 @slog(double %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void *_sbrk(intptr_t increment) {
  _exit(-1);
  return NULL;
}


x86 assembly (clang, -O0):
<_sbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_sbrk>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i8* @_sbrk(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define noalias i8* @_sbrk(i64 %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ memcmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
bool isValidPattern(uint8_t firstBytes[], uint8_t patternOne[],
                    uint8_t patternTwo[]) {
  if ((memcmp(patternOne, firstBytes, 4) == 0) ||
      (memcmp(patternTwo, firstBytes, 4) == 0))
    return true;
  return false;
}


x86 assembly (clang, -O0):
<isValidPattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     115c <isValidPattern+0x4c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1168 <isValidPattern+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <isValidPattern+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidPattern>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     114c <isValidPattern+0x3c>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
jmp    1151 <isValidPattern+0x41>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @isValidPattern(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%8 = load i32*, i32** %6
%9 = load i32*, i32** %5
%10 = call i64 @memcmp(i32* %8, i32* %9, i32 4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %3
%13 = load i32*, i32** %7
%14 = load i32*, i32** %5
%15 = call i64 @memcmp(i32* %13, i32* %14, i32 4)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12, %3
store i32 1, i32* %4
br label %19
18: ; preds = %12
store i32 0, i32* %4
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @isValidPattern(i32* %0, i32* %1, i32* %2) {
%4 = tail call i64 @memcmp(i32* %1, i32* %0, i32 4)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @memcmp(i32* %2, i32* %0, i32 4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 1, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_vsnprintf() {
  printf("NOT IMPLEMENTED:"
         "pa_vsnprintf"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"NOT IMPLEMENTED:pa_vsnprintf\0A\00"
define i32 @pa_vsnprintf() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [29 x i8] c"NOT IMPLEMENTED:pa_vsnprintf\00"
define i32 @pa_vsnprintf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void USB_OTG_BSP_EnableInterrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @USB_OTG_BSP_EnableInterrupt() {
ret void
}
void avformat_init_output() {}


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

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

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

LLVM IR (-O2):
define void @avformat_init_output() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Fatal(char *, char *);
void tl_yyerror(char *s1) { Fatal(s1, (char *)0); }


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

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

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

LLVM IR (-O2):
define void @tl_yyerror(i8* %0) {
%2 = tail call i32 @Fatal(i8* %0, i8* null)
ret void
}
/* Type definitions */
typedef unsigned long time_t;

/* Variables and functions */
int /*<<< orphan*/ time(unsigned long *);
unsigned long quicktime_current_time(void) {
  time_t t;
  time(&t);
  return (t + (66 * 31536000) + 1468800);
}


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

x86 assembly (clang, -O2):
<quicktime_current_time>:
push   %rax
mov    %rsp,%rdi
call   1030 <time@plt>
mov    $0x7c25b080,%eax
add    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @quicktime_current_time() {
%1 = alloca i64
%2 = call i32 @time(i64* %1)
%3 = load i64, i64* %1
%4 = add i64 %3, 2081376000
%5 = add i64 %4, 1468800
ret i64 %5
}

LLVM IR (-O2):
define i64 @quicktime_current_time() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @time(i64* %1)
%4 = load i64, i64* %1
%5 = add i64 %4, 2082844800
ret i64 %5
}
/* Variables and functions */
long LONG_MAX;
long LSHIFTR(long i, long s) { return (i >> s) & (LONG_MAX >> (s - 1)); }


x86 assembly (clang, -O0):
<LSHIFTR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sar    %cl,%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%rdx
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
sar    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSHIFTR>:
mov    %rsi,%rcx
sar    %cl,%rdi
mov    0x2ed3(%rip),%rax
mov    (%rax),%rax
lea    -0x1(%rsi),%ecx
sar    %cl,%rax
and    %rdi,%rax
ret

LLVM IR (-O0):
@LONG_MAX = global i64 0
define i64 @LSHIFTR(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 = ashr i64 %5, %6
%8 = load i64, i64* @LONG_MAX
%9 = load i64, i64* %4
%10 = sub nsw i64 %9, 1
%11 = ashr i64 %8, %10
%12 = and i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
@LONG_MAX = global i64 0
define i64 @LSHIFTR(i64 %0, i64 %1) {
%3 = ashr i64 %0, %1
%4 = load i64, i64* @LONG_MAX
%5 = add nsw i64 %1, -1
%6 = ashr i64 %4, %5
%7 = and i64 %6, %3
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
char strncatSafe(char *dest, char *src, int destSize) {
  if (strlen(dest) + strlen(src) + 1 > destSize) {
    return 0;
  }
  strcat(dest, src);
  return 1;
}


x86 assembly (clang, -O0):
<strncatSafe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cmp    -0x1c(%rbp),%eax
jle    1164 <strncatSafe+0x44>
movb   $0x0,-0x1(%rbp)
jmp    1175 <strncatSafe+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcat@plt>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncatSafe>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %ebp,%eax
cmp    %r15d,%eax
jge    1155 <strncatSafe+0x35>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
mov    $0x1,%al
jmp    1157 <strncatSafe+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @strncatSafe(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = call i32 @strlen(i8* %8)
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %9, %11
%13 = add nsw i32 %12, 1
%14 = load i32, i32* %7
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %3
store i8 0, i8* %4
br label %21
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = load i8*, i8** %6
%20 = call i32 @strcat(i8* %18, i8* %19)
store i8 1, i8* %4
br label %21
21: ; preds = %17, %16
%22 = load i8, i8* %4
ret i8 %22
}

LLVM IR (-O2):
define signext i8 @strncatSafe(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @strlen(i8* %1)
%6 = add nsw i32 %5, %4
%7 = icmp slt i32 %6, %2
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 @strcat(i8* %0, i8* %1)
br label %10
10: ; preds = %3, %8
%11 = phi i8 [ 1, %8 ], [ 0, %3 ]
ret i8 %11
}
/* Type definitions */
typedef int u_long;
struct svc_req {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
u_long *ejecutartarea_1_svc(u_long *argp, struct svc_req *rqstp) {
  static u_long result;
  result = *argp / 8 * 2 + 9 - 6;
  printf("Soy el servidor y realice la siguiente operacion aritmetica, "
         "entrada/8*2+6-9), que fue asignada a la salida\n");
  return &result;
}


x86 assembly (clang, -O0):
<ejecutartarea_1_svc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
add    $0x9,%eax
sub    $0x6,%eax
mov    %eax,0x2eef(%rip)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0x2edc(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ejecutartarea_1_svc>:
push   %rbx
mov    (%rdi),%eax
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x3,%ecx
lea    (%rcx,%rcx,1),%eax
add    $0x3,%eax
mov    %eax,0x2f02(%rip)
lea    0x2efb(%rip),%rbx
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@ejecutartarea_1_svc.result = internal global i32 0
@.str = [109 x i8] c"Soy el servidor y realice la siguiente operacion aritmetica, entrada/8*2+6-9), que fue asignada a la salida\0A\00"
define i32* @ejecutartarea_1_svc(i32* %0, %struct.svc_req* %1) {
%3 = alloca i32*
%4 = alloca %struct.svc_req*
store i32* %0, i32** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 8
%8 = mul nsw i32 %7, 2
%9 = add nsw i32 %8, 9
%10 = sub nsw i32 %9, 6
store i32 %10, i32* @ejecutartarea_1_svc.result
%11 = call i32 @printf(i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0))
ret i32* @ejecutartarea_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@ejecutartarea_1_svc.result = internal global i32 0
@str = [108 x i8] c"Soy el servidor y realice la siguiente operacion aritmetica, entrada/8*2+6-9), que fue asignada a la salida\00"
define i32* @ejecutartarea_1_svc(i32* nocapture %0, %struct.svc_req* nocapture readnone %1) {
%3 = load i32, i32* %0
%4 = sdiv i32 %3, 8
%5 = shl nsw i32 %4, 1
%6 = add nsw i32 %5, 3
store i32 %6, i32* @ejecutartarea_1_svc.result
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @str, i64 0, i64 0))
ret i32* @ejecutartarea_1_svc.result
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *s_malloc0(size_t size) {
  if (size == 0)
    return NULL;
  void *ptr = malloc(size);
  if (ptr)
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<s_malloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <s_malloc0+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1173 <s_malloc0+0x53>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116b <s_malloc0+0x4b>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_malloc0>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <s_malloc0+0x28>
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1148 <s_malloc0+0x28>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
jmp    114b <s_malloc0+0x2b>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @s_malloc0(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i64, i64* %3
%16 = call i32 @memset(i8* %14, i32 0, i64 %15)
br label %17
17: ; preds = %13, %8
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @s_malloc0(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %0)
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %1 ], [ %4, %6 ], [ null, %3 ]
ret i8* %9
}
/* Variables and functions */
float __nv_fadd_rz(float, float);
float __fadd_rz(float __a, float __b) { return __nv_fadd_rz(__a, __b); }


x86 assembly (clang, -O0):
<__fadd_rz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fadd_rz@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fadd_rz>:
jmp    1030 <__nv_fadd_rz@plt>

LLVM IR (-O0):
define float @__fadd_rz(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 = call float @__nv_fadd_rz(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__fadd_rz(float %0, float %1) {
%3 = tail call float @__nv_fadd_rz(float %0, float %1)
ret float %3
}
/* Variables and functions */
int flog_get_level();
int flog_is_error_enabled() { return 4 >= flog_get_level(); }


x86 assembly (clang, -O0):
<flog_is_error_enabled>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <flog_get_level@plt>
mov    %eax,%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flog_is_error_enabled>:
push   %rax
xor    %eax,%eax
call   1030 <flog_get_level@plt>
xor    %ecx,%ecx
cmp    $0x5,%eax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @flog_is_error_enabled() {
%1 = call i32 (...) @flog_get_level()
%2 = icmp sge i32 4, %1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @flog_is_error_enabled() {
%1 = tail call i32 (...) @flog_get_level()
%2 = icmp slt i32 %1, 5
%3 = zext i1 %2 to i32
ret i32 %3
}
int test_imm_F6uint8_reg(unsigned char val) {
  return ((val) & (-0xF6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F6uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff0a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F6uint8_reg>:
test   $0xa,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F6uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -246
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_F6uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 10
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}