xunge/DecIR huggingface dataset:
float oito(float A) {
  float result = 0;
  while (A != 0) {
    result = result + (1 / A);
    A--;
  }
  return result;
}


x86 assembly (clang, -O0):
<oito>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    112d <oito+0x2d>
jp     112d <oito+0x2d>
jmp    115f <oito+0x5f>
movss  -0x8(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
divss  -0x4(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb0(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1111 <oito+0x11>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<oito>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    110a <oito+0xa>
jnp    1136 <oito+0x36>
xorps  %xmm2,%xmm2
movss  0xeeb(%rip),%xmm3
movss  0xee7(%rip),%xmm4
xorps  %xmm1,%xmm1
movaps %xmm3,%xmm5
divss  %xmm0,%xmm5
addss  %xmm5,%xmm1
addss  %xmm4,%xmm0
ucomiss %xmm2,%xmm0
jne    1120 <oito+0x20>
jp     1120 <oito+0x20>
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @oito(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
store float 0.000000e+00, float* %3
br label %4
4: ; preds = %7, %1
%5 = load float, float* %2
%6 = fcmp une float %5, 0.000000e+00
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load float, float* %3
%9 = load float, float* %2
%10 = fdiv float 1.000000e+00, %9
%11 = fadd float %8, %10
store float %11, float* %3
%12 = load float, float* %2
%13 = fadd float %12, -1.000000e+00
store float %13, float* %2
br label %4
14: ; preds = %4
%15 = load float, float* %3
ret float %15
}

LLVM IR (-O2):
define float @oito(float %0) {
%2 = fcmp une float %0, 0.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi float [ %7, %3 ], [ 0.000000e+00, %1 ]
%5 = phi float [ %8, %3 ], [ %0, %1 ]
%6 = fdiv float 1.000000e+00, %5
%7 = fadd float %4, %6
%8 = fadd float %5, -1.000000e+00
%9 = fcmp une float %8, 0.000000e+00
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi float [ 0.000000e+00, %1 ], [ %7, %3 ]
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ led_state_machine(long);
scalar_t__ millis();
int /*<<< orphan*/ usb_state_machine(long);
void handle_timer(void) {
  long currentMillis = (long)millis();
  led_state_machine(currentMillis);
  usb_state_machine(currentMillis);
}


x86 assembly (clang, -O0):
<handle_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <millis@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <led_state_machine@plt>
mov    -0x8(%rbp),%rdi
call   1050 <usb_state_machine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_timer>:
push   %rbx
xor    %eax,%eax
call   1040 <millis@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <led_state_machine@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <usb_state_machine@plt>

LLVM IR (-O0):
define void @handle_timer() {
%1 = alloca i64
%2 = call i64 (...) @millis()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @led_state_machine(i64 %3)
%5 = load i64, i64* %1
%6 = call i32 @usb_state_machine(i64 %5)
ret void
}

LLVM IR (-O2):
define void @handle_timer() {
%1 = tail call i64 (...) @millis()
%2 = tail call i32 @led_state_machine(i64 %1)
%3 = tail call i32 @usb_state_machine(i64 %1)
ret void
}
int fn1(int p1, int p2) { return p2 == 0 ? p1 : 1 % p2; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <fn1+0x1f>
mov    -0x4(%rbp),%edx
mov    %edx,-0xc(%rbp)
jmp    112b <fn1+0x2b>
mov    $0x1,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
mov    %edi,%eax
test   %esi,%esi
je     1111 <fn1+0x11>
mov    $0x1,%eax
xor    %edx,%edx
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @fn1(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %3
br label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = srem i32 1, %10
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ %8, %7 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @fn1(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = srem i32 1, %1
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ %0, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void summary() {
  printf("Reading from: \t%s\n", "sujet.data");
  printf("Writing to: \t%s(0,1,...)\n", "f");
  printf("Rejecting to: \t%s\n\n", "rejetes.data");
}


x86 assembly (clang, -O0):
<summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef1(%rip),%rsi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0xf03(%rip),%rsi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
lea    0xf06(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<summary>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef4(%rip),%rsi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
lea    0xf06(%rip),%rsi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    0xf09(%rip),%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Reading from: \09%s\0A\00"
@.str.1 = [11 x i8] c"sujet.data\00"
@.str.2 = [26 x i8] c"Writing to: \09%s(0,1,...)\0A\00"
@.str.3 = [2 x i8] c"f\00"
@.str.4 = [20 x i8] c"Rejecting to: \09%s\0A\0A\00"
@.str.5 = [13 x i8] c"rejetes.data\00"
define void @summary() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Reading from: \09%s\0A\00"
@.str.1 = [11 x i8] c"sujet.data\00"
@.str.2 = [26 x i8] c"Writing to: \09%s(0,1,...)\0A\00"
@.str.3 = [2 x i8] c"f\00"
@.str.4 = [20 x i8] c"Rejecting to: \09%s\0A\0A\00"
@.str.5 = [13 x i8] c"rejetes.data\00"
define void @summary() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ISR(int);
int /*<<< orphan*/ oosmos_RunStateMachines();
int /*<<< orphan*/ uartNew(int);
extern int main(void) {
  (void)uartNew(1);
  (void)uartNew(3);
  (void)uartNew(7);
  ISR(3);
  oosmos_RunStateMachines();
  ISR(7);
  oosmos_RunStateMachines();
  ISR(1);
  oosmos_RunStateMachines();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <uartNew@plt>
mov    $0x3,%edi
call   1030 <uartNew@plt>
mov    $0x7,%edi
call   1030 <uartNew@plt>
mov    $0x3,%edi
call   1040 <ISR@plt>
mov    $0x0,%al
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x7,%edi
call   1040 <ISR@plt>
mov    $0x0,%al
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x1,%edi
call   1040 <ISR@plt>
mov    $0x0,%al
call   1050 <oosmos_RunStateMachines@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <uartNew@plt>
mov    $0x3,%edi
call   1030 <uartNew@plt>
mov    $0x7,%edi
call   1030 <uartNew@plt>
mov    $0x3,%edi
call   1040 <ISR@plt>
xor    %eax,%eax
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x7,%edi
call   1040 <ISR@plt>
xor    %eax,%eax
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x1,%edi
call   1040 <ISR@plt>
xor    %eax,%eax
call   1050 <oosmos_RunStateMachines@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @uartNew(i32 1)
%3 = call i32 @uartNew(i32 3)
%4 = call i32 @uartNew(i32 7)
%5 = call i32 @ISR(i32 3)
%6 = call i32 (...) @oosmos_RunStateMachines()
%7 = call i32 @ISR(i32 7)
%8 = call i32 (...) @oosmos_RunStateMachines()
%9 = call i32 @ISR(i32 1)
%10 = call i32 (...) @oosmos_RunStateMachines()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @uartNew(i32 1)
%2 = tail call i32 @uartNew(i32 3)
%3 = tail call i32 @uartNew(i32 7)
%4 = tail call i32 @ISR(i32 3)
%5 = tail call i32 (...) @oosmos_RunStateMachines()
%6 = tail call i32 @ISR(i32 7)
%7 = tail call i32 (...) @oosmos_RunStateMachines()
%8 = tail call i32 @ISR(i32 1)
%9 = tail call i32 (...) @oosmos_RunStateMachines()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ String_Report();
void UI_Report(void) { String_Report(); }


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

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

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

LLVM IR (-O2):
define void @UI_Report() {
%1 = tail call i32 (...) @String_Report()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int);
void DoTuck(void) { InlineWords(2, 16, 18); }


x86 assembly (clang, -O0):
<DoTuck>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x10,%esi
mov    $0x12,%edx
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoTuck>:
mov    $0x2,%edi
mov    $0x10,%esi
mov    $0x12,%edx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoTuck() {
%1 = call i32 @InlineWords(i32 2, i32 16, i32 18)
ret void
}

LLVM IR (-O2):
define void @DoTuck() {
%1 = tail call i32 @InlineWords(i32 2, i32 16, i32 18)
ret void
}
int test_imm_47int32_mem(int *val) {
  return ((*val) & (0x47 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_47int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x47,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_47int32_mem>:
testb  $0x47,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_47int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 71
%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_47int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 71
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void MIDI_UART_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @MIDI_UART_RestoreConfig() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xreparent;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xreparent_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xreparent.serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xreparent_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xreparent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
char putchar(char);
int main() {
  char string[] = "Hello, there!\n";
  int x;
  x = 0;
  while (putchar(string[x]) != '\0')
    x++;
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
movsbl -0x13(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
movsbl %al,%eax
cmp    $0x0,%eax
je     1176 <main+0x66>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114e <main+0x3e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
test   %al,%al
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string = [15 x i8] c"Hello, there!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [15 x i8]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = call signext i8 @putchar(i8 signext %9)
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %5
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [15 x i8] c"Hello, there!\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* @__const.main.string, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = tail call signext i8 @putchar(i8 signext %4)
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
void this_looks_bad(char *in) {
  int bad = 0;
  ;
  char buf[64];
  strcpy(buf, in);
  if (bad == 0x1337) {
    printf("Oh no! It's not safe! The shell is open! You can read the flag "
           "now! Ahhhhhh\n");
    system("/bin/sh");
  } else {
    printf("Phew, I'm still safe\n");
  }
}


x86 assembly (clang, -O0):
<this_looks_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
cmpl   $0x1337,-0xc(%rbp)
jne    117a <this_looks_bad+0x4a>
lea    0xe9c(%rip),%rdi
call   1050 <printf@plt>
lea    0xedd(%rip),%rdi
call   1040 <system@plt>
jmp    1186 <this_looks_bad+0x56>
lea    0xed4(%rip),%rdi
call   1050 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<this_looks_bad>:
sub    $0x48,%rsp
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [77 x i8] c"Oh no! It's not safe! The shell is open! You can read the flag now! Ahhhhhh\0A\00"
@.str.1 = [8 x i8] c"/bin/sh\00"
@.str.2 = [22 x i8] c"Phew, I'm still safe\0A\00"
define void @this_looks_bad(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [64 x i8]
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 4919
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Phew, I'm still safe\00"
define void @this_looks_bad(i8* %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, float);
int /*<<< orphan*/ sscanf(char *, char *, float *);
float to1place(float a) {
  char *temp = (char *)malloc(20);
  float temp2;
  sprintf(temp, "%.1f", a);
  sscanf(temp, "%f", &temp2);
  return temp2;
}


x86 assembly (clang, -O0):
<to1place>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
lea    0xea5(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe9a(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to1place>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0x8(%rsp)
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
movss  0x8(%rsp),%xmm0
call   1050 <sprintf@plt>
lea    0xea1(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <sscanf@plt>
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.1f\00"
@.str.1 = [3 x i8] c"%f\00"
define float @to1place(float %0) {
%2 = alloca float
%3 = alloca i8*
%4 = alloca float
store float %0, float* %2
%5 = call i64 @malloc(i32 20)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = load float, float* %2
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load i8*, i8** %3
%11 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%12 = load float, float* %4
ret float %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.1f\00"
@.str.1 = [3 x i8] c"%f\00"
define float @to1place(float %0) {
%2 = alloca float
%3 = tail call i64 @malloc(i32 20)
%4 = inttoptr i64 %3 to i8*
%5 = bitcast float* %2 to i8*
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %0)
%7 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = load float, float* %2
ret float %8
}
/* Variables and functions */
int close(int);
int psf_fclose(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<psf_fclose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @psf_fclose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
char pro(char a) {
  if (a == 'J')
    a = '9' + 1;
  if (a == 'Q')
    a = '9' + 2;
  if (a == 'K')
    a = '9' + 3;
  if (a == 'A')
    a = '1';
  return a;
}


x86 assembly (clang, -O0):
<pro>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x4a,%eax
jne    111b <pro+0x1b>
movb   $0x3a,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x51,%eax
jne    112c <pro+0x2c>
movb   $0x3b,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x4b,%eax
jne    113d <pro+0x3d>
movb   $0x3c,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jne    114e <pro+0x4e>
movb   $0x31,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pro>:
cmp    $0x4a,%dil
mov    $0x3a,%eax
cmovne %edi,%eax
cmp    $0x51,%al
mov    $0x3b,%ecx
cmovne %eax,%ecx
cmp    $0x4b,%cl
mov    $0x3c,%edx
cmovne %ecx,%edx
cmp    $0x41,%dl
mov    $0x31,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @pro(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 74
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 58, i8* %2
br label %7
7: ; preds = %6, %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 81
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 59, i8* %2
br label %12
12: ; preds = %11, %7
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 75
br i1 %15, label %16, label %17
16: ; preds = %12
store i8 60, i8* %2
br label %17
17: ; preds = %16, %12
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 65
br i1 %20, label %21, label %22
21: ; preds = %17
store i8 49, i8* %2
br label %22
22: ; preds = %21, %17
%23 = load i8, i8* %2
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @pro(i8 signext %0) {
%2 = icmp eq i8 %0, 74
%3 = select i1 %2, i8 58, i8 %0
%4 = icmp eq i8 %3, 81
%5 = select i1 %4, i8 59, i8 %3
%6 = icmp eq i8 %5, 75
%7 = select i1 %6, i8 60, i8 %5
%8 = icmp eq i8 %7, 65
%9 = select i1 %8, i8 49, i8 %7
ret i8 %9
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showIPPortFilteringTable();
void cmdShowIpPortFiltering(int cmdType, struct cmd_arg *pCmdArg) {
  showIPPortFilteringTable();
}


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowIpPortFiltering(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showIPPortFilteringTable()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowIpPortFiltering(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showIPPortFilteringTable()
ret void
}
int isPrime(int n) {
  if (n == 2)
    return 1;
  if (n < 2)
    return 0;
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0)
      return 0;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    111d <isPrime+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    117b <isPrime+0x7b>
cmpl   $0x2,-0x8(%rbp)
jge    1133 <isPrime+0x33>
movl   $0x0,-0x4(%rbp)
jmp    117b <isPrime+0x7b>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1174 <isPrime+0x74>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1166 <isPrime+0x66>
movl   $0x0,-0x4(%rbp)
jmp    117b <isPrime+0x7b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <isPrime+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    $0x1,%ecx
cmp    $0x2,%edi
je     1135 <isPrime+0x35>
cmp    $0x2,%edi
jge    1113 <isPrime+0x13>
xor    %ecx,%ecx
jmp    1135 <isPrime+0x35>
cmp    $0x4,%edi
jb     1135 <isPrime+0x35>
mov    $0x2,%esi
nopl   (%rax)
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     110f <isPrime+0xf>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1120 <isPrime+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 2
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 4
br i1 %6, label %15, label %10
7: ; preds = %10
%8 = mul nsw i32 %14, %14
%9 = icmp sgt i32 %8, %0
br i1 %9, label %15, label %10
10: ; preds = %5, %7
%11 = phi i32 [ %14, %7 ], [ 2, %5 ]
%12 = srem i32 %0, %11
%13 = icmp eq i32 %12, 0
%14 = add nuw nsw i32 %11, 1
br i1 %13, label %15, label %7
15: ; preds = %7, %10, %5, %3, %1
%16 = phi i32 [ 1, %1 ], [ 0, %3 ], [ 1, %5 ], [ 1, %7 ], [ 0, %10 ]
ret i32 %16
}
int do_500() { return 500; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x1f4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x1f4,%eax
ret

LLVM IR (-O0):
define i32 @do_500() {
ret i32 500
}

LLVM IR (-O2):
define i32 @do_500() {
ret i32 500
}
/* Variables and functions */
int is_valid_in_Hop(size_t __tag) {
  switch (__tag) {
  case 628:
  case 629:
  case 630:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_valid_in_Hop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffd8c,%rax
sub    $0x2,%rax
ja     112d <is_valid_in_Hop+0x2d>
jmp    1121 <is_valid_in_Hop+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1134 <is_valid_in_Hop+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_in_Hop>:
add    $0xfffffffffffffd8c,%rdi
xor    %eax,%eax
cmp    $0x3,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_valid_in_Hop(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %6 [
i64 628, label %5
i64 629, label %5
i64 630, label %5
]
5: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_valid_in_Hop(i64 %0) {
%2 = add i64 %0, -628
%3 = icmp ult i64 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
void trs_print_end_msg(char *msg) {}


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

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

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

LLVM IR (-O2):
define void @trs_print_end_msg(i8* nocapture %0) {
ret void
}
int main() {
  unsigned int arg1 = 0x12345678;
  unsigned int arg2 = 0x9ABCDEF0;
  unsigned int out1 = 0;
  unsigned int out2 = 0;
  __asm__("xaddl %%eax, %%ecx" : "=a"(out1), "=c"(out2) : "a"(arg1), "c"(arg2));
  return (out1 == 0x9ABCDEF0) && (out2 == 0xACf13568);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x12345678,-0x8(%rbp)
movl   $0x9abcdef0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
xadd   %eax,%ecx
mov    %eax,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x9abcdef0,-0x10(%rbp)
mov    %al,-0x15(%rbp)
jne    1155 <main+0x55>
cmpl   $0xacf13568,-0x14(%rbp)
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x12345678,%eax
mov    $0x9abcdef0,%ecx
xadd   %eax,%ecx
xor    $0x9abcdef0,%eax
xor    $0xacf13568,%ecx
xor    %edx,%edx
or     %eax,%ecx
sete   %dl
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 305419896, i32* %2
store i32 -1698898192, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call { i32, i32 } asm "xaddl %eax, %ecx", "={ax},={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7)
%9 = extractvalue { i32, i32 } %8, 0
%10 = extractvalue { i32, i32 } %8, 1
store i32 %9, i32* %4
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, -1698898192
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, -1393478296
br label %16
16: ; preds = %13, %0
%17 = phi i1 [ false, %0 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call { i32, i32 } asm "xaddl %eax, %ecx", "={ax},={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i32 305419896, i32 -1698898192)
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = icmp eq i32 %2, -1698898192
%5 = icmp eq i32 %3, -1393478296
%6 = select i1 %4, i1 %5, i1 false
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ reportError(char *);
int target(FILE *stream) {
  char buf[10];
  size_t b = fread(buf, 7, 1, stream);
  if (b < 1) {
    reportError(buf);
    return -22;
  }
  if (b == 0)
    return -10;
  return b;
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x7,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x1,-0x28(%rbp)
jae    1167 <target+0x47>
lea    -0x1a(%rbp),%rdi
call   1040 <reportError@plt>
movl   $0xffffffea,-0x4(%rbp)
jmp    1185 <target+0x65>
cmpq   $0x0,-0x28(%rbp)
jne    117e <target+0x5e>
movl   $0xfffffff6,-0x4(%rbp)
jmp    1185 <target+0x65>
mov    -0x28(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
sub    $0x18,%rsp
mov    %rdi,%rcx
lea    0xe(%rsp),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
test   %rax,%rax
je     1145 <target+0x25>
add    $0x18,%rsp
ret
lea    0xe(%rsp),%rdi
call   1040 <reportError@plt>
mov    $0xffffffea,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @target(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [10 x i8]
%5 = alloca i64
store i32* %0, i32** %3
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%7 = load i32*, i32** %3
%8 = call i64 @fread(i8* %6, i32 7, i32 1, i32* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp ult i64 %9, 1
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%13 = call i32 @reportError(i8* %12)
store i32 -22, i32* %2
br label %21
14: ; preds = %1
%15 = load i64, i64* %5
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 -10, i32* %2
br label %21
18: ; preds = %14
%19 = load i64, i64* %5
%20 = trunc i64 %19 to i32
store i32 %20, i32* %2
br label %21
21: ; preds = %18, %17, %11
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @target(i32* nocapture %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i64 @fread(i8* %3, i32 7, i32 1, i32* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @reportError(i8* %3)
br label %10
8: ; preds = %1
%9 = trunc i64 %4 to i32
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ -22, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void hello(const char *name) {
  printf("say hello to %s\n", name);
  return;
}


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

x86 assembly (clang, -O2):
<hello>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"say hello to %s\0A\00"
define void @hello(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ casemap(int /*<<< orphan*/, int /*<<< orphan*/);
wint_t towlower(wint_t wc) { return casemap(wc, 0); }


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

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

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

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = tail call i32 @casemap(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void exit_with_help() {
  printf(
      "Usage: svm-predict [options] test_file model_file output_file\n"
      "options:\n"
      "  -b probability_estimates: whether to predict probability estimates, 0 "
      "or 1 (default 0); for one-class SVM only 0 is supported\n"
      "  -o: this is an open set problem. this will look for model files with "
      "names of the form <model_file>.<class>\n"
      "  -V  for more verbose output\n"
      "  -s output scores in bin format(1-2, 1-3, 1-4, 2-3) to "
      "outputfile(cannot be combined with -v or -t) \n"
      "  -t output totaled scores 1-2+1-3+1-4=1 ect to outputfile(cannot be "
      "combined with -s or -v) \n"
      "  -v output votes to outputfile(cannot be combined with -s or -t) \n");
  exit(1);
}


x86 assembly (clang, -O0):
<exit_with_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [603 x i8] c"Usage: svm-predict [options] test_file model_file output_file\0Aoptions:\0A -b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); for one-class SVM only 0 is supported\0A -o: this is an open set problem. this will look for model files with names of the form <model_file>.<class>\0A -V for more verbose output\0A -s output scores in bin format(1-2, 1-3, 1-4, 2-3) to outputfile(cannot be combined with -v or -t) \0A -t output totaled scores 1-2+1-3+1-4=1 ect to outputfile(cannot be combined with -s or -v) \0A -v output votes to outputfile(cannot be combined with -s or -t) \0A\00"
define void @exit_with_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([603 x i8], [603 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [602 x i8] c"Usage: svm-predict [options] test_file model_file output_file\0Aoptions:\0A -b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); for one-class SVM only 0 is supported\0A -o: this is an open set problem. this will look for model files with names of the form <model_file>.<class>\0A -V for more verbose output\0A -s output scores in bin format(1-2, 1-3, 1-4, 2-3) to outputfile(cannot be combined with -v or -t) \0A -t output totaled scores 1-2+1-3+1-4=1 ect to outputfile(cannot be combined with -s or -v) \0A -v output votes to outputfile(cannot be combined with -s or -t) \00"
define void @exit_with_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([602 x i8], [602 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ floyd(unsigned int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned n;
  printf("Enter a number:\n");
  scanf(" %u%*c", &n);
  floyd(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <floyd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <floyd@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c" %u%*c\00"
@str = [16 x i8] c"Enter a number:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @floyd(i32 %5)
ret i32 0
}
void XtAddCallbacks() {}


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

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

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

LLVM IR (-O2):
define void @XtAddCallbacks() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int powercap_sysfs_constraint_exists(char *, int /*<<< orphan*/ *, int,
                                     int /*<<< orphan*/);
int rapl_sysfs_constraint_exists(uint32_t zone, uint32_t sz, int is_sz,
                                 uint32_t constraint) {
  uint32_t zones[2];
  zones[0] = zone;
  zones[1] = sz;
  ;
  return powercap_sysfs_constraint_exists("intel-rapl", zones, (is_sz ? 2 : 1),
                                          constraint);
}


x86 assembly (clang, -O0):
<rapl_sysfs_constraint_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
mov    $0x2,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
mov    -0x10(%rbp),%ecx
lea    0xeaf(%rip),%rdi
call   1030 <powercap_sysfs_constraint_exists@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rapl_sysfs_constraint_exists>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
cmp    $0x1,%edx
mov    $0x2,%edx
sbb    $0x0,%edx
lea    0xed6(%rip),%rdi
mov    %rsp,%rsi
call   1030 <powercap_sysfs_constraint_exists@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @rapl_sysfs_constraint_exists(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [2 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%15 = load i32, i32* %7
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 2, i32 1
%19 = load i32, i32* %8
%20 = call i32 @powercap_sysfs_constraint_exists(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %14, i32 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @rapl_sysfs_constraint_exists(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = icmp eq i32 %2, 0
%10 = select i1 %9, i32 1, i32 2
%11 = call i32 @powercap_sysfs_constraint_exists(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %7, i32 %10, i32 %3)
ret i32 %11
}
void __attribute__((
    __warning__("curl_easy_getinfo expects a pointer to long for this info")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_getinfo_err_long(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_getinfo_err_long() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void GetModelSize(double *subjectSize) {}


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

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

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

LLVM IR (-O2):
define void @GetModelSize(double* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *_fatlegalize(int /*<<< orphan*/ const *, char *);
wchar_t *fatlegalizenamelong(const wchar_t *path) {
  return _fatlegalize(path, L"\"*:<>?\\|[]/");
}


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

x86 assembly (clang, -O2):
<fatlegalizenamelong>:
lea    0xee9(%rip),%rsi
jmp    1030 <_fatlegalize@plt>

LLVM IR (-O0):
@.str = [12 x i32] [i32 34, i32 42, i32 58, i32 60, i32 62, i32 63, i32 92, i32 124, i32 91, i32 93, i32 47, i32 0]
define i32* @fatlegalizenamelong(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32* @_fatlegalize(i32* %3, i8* bitcast ([12 x i32]* @.str to i8*))
ret i32* %4
}

LLVM IR (-O2):
@.str = [12 x i32] [i32 34, i32 42, i32 58, i32 60, i32 62, i32 63, i32 92, i32 124, i32 91, i32 93, i32 47, i32 0]
define i32* @fatlegalizenamelong(i32* %0) {
%2 = tail call i32* @_fatlegalize(i32* %0, i8* bitcast ([12 x i32]* @.str to i8*))
ret i32* %2
}
void ui_joystick_poll(void) {}


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

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

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

LLVM IR (-O2):
define void @ui_joystick_poll() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(int /*<<< orphan*/ *);
int fthread_mutex_lock_(pthread_mutex_t **theMutex) {
  return (pthread_mutex_lock(*theMutex));
}


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

x86 assembly (clang, -O2):
<fthread_mutex_lock_>:
mov    (%rdi),%rdi
jmp    1030 <pthread_mutex_lock@plt>

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

LLVM IR (-O2):
define i32 @fthread_mutex_lock_(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @pthread_mutex_lock(i32* %2)
ret i32 %3
}
void mailsasl_ref(void) {}


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

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

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

LLVM IR (-O2):
define void @mailsasl_ref() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void PrintName(const char *name, FILE *stream) {
  if (!name || !stream) {
    errno = EINVAL;
    return;
  }
  fprintf(stream, "My name is %s.\n", name);
}


x86 assembly (clang, -O0):
<PrintName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <PrintName+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    114d <PrintName+0x3d>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9a(%rip),%rax
mov    %ecx,(%rax)
jmp    1161 <PrintName+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintName>:
test   %rdi,%rdi
je     112f <PrintName+0x1f>
test   %rsi,%rsi
je     112f <PrintName+0x1f>
mov    %rdi,%rdx
lea    0xedc(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    0x2ea1(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
@.str = [16 x i8] c"My name is %s.\0A\00"
define void @PrintName(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32*, i32** %4
%9 = icmp ne i32* %8, null
br i1 %9, label %12, label %10
10: ; preds = %7, %2
%11 = load i32, i32* @EINVAL
store i32 %11, i32* @errno
br label %16
12: ; preds = %7
%13 = load i32*, i32** %4
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@.str = [16 x i8] c"My name is %s.\0A\00"
define void @PrintName(i8* %0, i32* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i32* %1, null
%5 = and i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
br label %10
8: ; preds = %2
%9 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %6
ret void
}