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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ writebyte(int);
int /*<<< orphan*/ writeword(short const);
void write_SOF0info(const short height, const short width) {
  writeword(0xFFC0);
  writeword(17);
  writebyte(8);
  writeword(height);
  writeword(width);
  writebyte(3);
  writebyte(1);
  writebyte(0x22);
  writebyte(0);
  writebyte(2);
  writebyte(0x11);
  writebyte(1);
  writebyte(3);
  writebyte(0x11);
  writebyte(1);
}


x86 assembly (clang, -O0):
<write_SOF0info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    $0xffffffc0,%edi
call   1030 <writeword@plt>
mov    $0x11,%edi
call   1030 <writeword@plt>
mov    $0x8,%edi
call   1040 <writebyte@plt>
movswl -0x2(%rbp),%edi
call   1030 <writeword@plt>
movswl -0x4(%rbp),%edi
call   1030 <writeword@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
mov    $0x22,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x2,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_SOF0info>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xffffffc0,%edi
call   1030 <writeword@plt>
mov    $0x11,%edi
call   1030 <writeword@plt>
mov    $0x8,%edi
call   1040 <writebyte@plt>
mov    %ebp,%edi
call   1030 <writeword@plt>
mov    %ebx,%edi
call   1030 <writeword@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
mov    $0x22,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x2,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <writebyte@plt>

LLVM IR (-O0):
define void @write_SOF0info(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call i32 @writeword(i16 signext -64)
%6 = call i32 @writeword(i16 signext 17)
%7 = call i32 @writebyte(i32 8)
%8 = load i16, i16* %3
%9 = call i32 @writeword(i16 signext %8)
%10 = load i16, i16* %4
%11 = call i32 @writeword(i16 signext %10)
%12 = call i32 @writebyte(i32 3)
%13 = call i32 @writebyte(i32 1)
%14 = call i32 @writebyte(i32 34)
%15 = call i32 @writebyte(i32 0)
%16 = call i32 @writebyte(i32 2)
%17 = call i32 @writebyte(i32 17)
%18 = call i32 @writebyte(i32 1)
%19 = call i32 @writebyte(i32 3)
%20 = call i32 @writebyte(i32 17)
%21 = call i32 @writebyte(i32 1)
ret void
}

LLVM IR (-O2):
define void @write_SOF0info(i16 signext %0, i16 signext %1) {
%3 = tail call i32 @writeword(i16 signext -64)
%4 = tail call i32 @writeword(i16 signext 17)
%5 = tail call i32 @writebyte(i32 8)
%6 = tail call i32 @writeword(i16 signext %0)
%7 = tail call i32 @writeword(i16 signext %1)
%8 = tail call i32 @writebyte(i32 3)
%9 = tail call i32 @writebyte(i32 1)
%10 = tail call i32 @writebyte(i32 34)
%11 = tail call i32 @writebyte(i32 0)
%12 = tail call i32 @writebyte(i32 2)
%13 = tail call i32 @writebyte(i32 17)
%14 = tail call i32 @writebyte(i32 1)
%15 = tail call i32 @writebyte(i32 3)
%16 = tail call i32 @writebyte(i32 17)
%17 = tail call i32 @writebyte(i32 1)
ret void
}